> For the complete documentation index, see [llms.txt](https://docs.lumia.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.lumia.org/build-on-lumia/environment/networks-and-rpc-setup.md).

# Networks and RPC setup

**Who this is for:** developers configuring a project (wallet, script, Hardhat/Truffle config, indexer) to talk to Lumia.

**Prerequisites:** none.

### Choosing a network

**Beam testnet** is where you build and test. It costs nothing to use once you have testnet tokens, and mistakes there don't touch real funds. Almost all development should target Beam until you're intentionally deploying for production use. **Mainnet** is the live network with real value: use it only once you've finished testing on Beam.

### Steps

{% stepper %}
{% step %}
**Decide mainnet or Beam**

Per the guidance above.
{% endstep %}

{% step %}
**Copy the RPC URL into your project's config**

Open [`/reference/networks`](https://app.gitbook.com/s/chmhPiVNAafGw48c4oU2/reference/networks-and-endpoints) and copy the RPC (HTTPS) URL for that network into your project's config as an environment variable, not a hardcoded literal, so you can swap networks without editing code.
{% endstep %}

{% step %}
**Copy the matching chain ID into the same config**

Wallet and SDK libraries frequently validate the RPC response's chain ID against what you configured; a mismatch here is one of the most common setup errors.
{% endstep %}

{% step %}
**Check for a WSS endpoint if your tooling needs one**

Check [`/reference/networks`](https://app.gitbook.com/s/chmhPiVNAafGw48c4oU2/reference/networks-and-endpoints) first.
{% endstep %}
{% endstepper %}

### Verify it worked

Call the RPC's `eth_chainId` method (directly with curl, or through whatever library you're using) and confirm the returned chain ID matches the value in [`/reference/networks`](https://app.gitbook.com/s/chmhPiVNAafGw48c4oU2/reference/networks-and-endpoints) for the network you intended.

```bash
curl -s -X POST -H "Content-Type: application/json" \
  --data '{"jsonrpc":"2.0","method":"eth_chainId","params":[],"id":1}' \
  "<RPC URL from /reference/networks>"
```

### Troubleshooting

<details>

<summary>Requests time out or connection refused</summary>

You're likely pointed at the retired network's RPC. Recheck against [`/reference/networks`](https://app.gitbook.com/s/chmhPiVNAafGw48c4oU2/reference/networks-and-endpoints).

</details>

<details>

<summary><code>eth_chainId</code> returns a value you didn't expect</summary>

Your config still has an old RPC URL cached from a previous project or tutorial; replace it with the current value from Reference rather than editing the hex by hand.

</details>

{% hint style="warning" %}
**Rate limiting on the public RPC.** If you're hitting limits, consider running your own node. See [`/run-a-node/rpc-node/overview`](https://app.gitbook.com/s/chmhPiVNAafGw48c4oU2/run-a-node/rpc-node/rpc-node-overview).
{% endhint %}
