> For the complete documentation index, see [llms.txt](https://evmdocs.acala.network/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://evmdocs.acala.network/network/network-setup/connecting-to-a-public-network-with-local-rpc-node.md).

# 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
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
