# Connecting to a public network with local RPC node

Except from connecting to local development network, we can also run a local RPC node connecting to public networks.

```
npx @acala-network/eth-rpc-adapter@latest \
  --endpoint <node-endpoint-ws-url> \
  --subql <subquery-url>
```

Node endpoints and subquery urls can be found in [network configuration](/network/network-configuration.md).

For example to connect to acala mainnet:

```
npx @acala-network/eth-rpc-adapter@latest \
  --endpoint wss://acala-rpc.aca-api.network \
  --subql https://subql-query-acala.aca-api.network
```

Also checkout the help command for more details

```
npx @acala-network/eth-rpc-adapter@latest --help
```

{% hint style="info" %}
**If you wish to learn more about the RPC adapter, you can find more info in the** [**RPC adapter documentation**](https://github.com/AcalaNetwork/acala-evm-dev-docs/blob/master/tooling/rpc-adapter/running-the-rpc-adapter.md)**.**
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://evmdocs.acala.network/network/network-setup/connecting-to-a-public-network-with-local-rpc-node.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
