> ## Documentation Index
> Fetch the complete documentation index at: https://docs.utexo.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Connect to RLN Node

> Connect securely to your RGB Lightning Node via mTLS or API token.

Once your RLN node is in `RUNNING` status, you can connect to it using one of two methods: **mTLS** (certificate-based) or **API token** (bearer authentication).

## Option 1: Connect via mTLS

### 1. Access Node Connection Details

Navigate to the Connect page for your node:

```
https://www.thunderstack.org/{nodeId}/connect
```

This page displays the unique endpoint URL for your node, along with the private key and certificate required for the mTLS connection. These credentials are automatically generated for your session.

### 2. Obtain Connection Credentials

From the `/connect` page, download:

* **Private Key**: a `.key` file (e.g., `privateKey.key`) containing your private key
* **Certificate**: a `.pem` file (e.g., `certificate.pem`) containing your public key certificate
* **Endpoint URL**: formatted as `https://{userId}.thunderstack.org/nodes/{userId}/{nodeId}/`

<Warning>
  Store your private key in a secure location. Do not share it or commit it to version control.
</Warning>

### 3. Make a Request

Use the downloaded credentials with `curl`:

```bash theme={null}
curl --key /path/to/privateKey.key \
  --cert /path/to/certificate.pem \
  https://{userId}.thunderstack.org/nodes/{userId}/{nodeId}/
```

Replace the paths and endpoint with the values from your `/connect` page.

## Option 2: Connect via API Token

API token authentication is simpler to use for programmatic integrations.

```bash theme={null}
export CLOUD_API_TOKEN=<your_token>
curl -H 'Authorization: Bearer ${CLOUD_API_TOKEN}' \
  https://node-api.thunderstack.org/<user_id>/<node_id>
```

To obtain a `CLOUD_API_TOKEN`, see [Create API Token](/access-token-authorization/create-api-token).

<Info>
  Both mTLS and API token authentication give equivalent access to the node's REST API. mTLS is preferred in production environments where certificate-based trust is required.
</Info>
