> For the complete documentation index, see [llms.txt](https://docs.blockxnet.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.blockxnet.com/dapp-developers/ethereum-json-rpc/running-the-server.md).

# Running the Server

### Enable Server <a href="#enable-server" id="enable-server"></a>

To enable RPC server use the following flag (set to true by default).

```bash
blockxd start --json-rpc.enable
```

### Defining Namespaces <a href="#defining-namespaces" id="defining-namespaces"></a>

`Eth`,`Net` and `Web3` namespaces are enabled by default. In order to enable other namespaces use flag `--json-rpc.api`.

```bash
blockxd start --json-rpc.api eth,txpool,personal,net,debug,web3,miner
```

### Set a Gas Cap <a href="#set-a-gas-cap" id="set-a-gas-cap"></a>

`eth_call` and `eth_estimateGas` define a global gas cap over rpc for DoS protection. You can override the default gas cap value of 25,000,000 by passing a custom value when starting the node:

```bash
# set gas cap to 85M
blockxd start --json-rpc.gas-cap 85000000000

# set gas cap to infinite (=0)
blockxd start --json-rpc.gas-cap 0
```

### CORS <a href="#cors" id="cors"></a>

If accessing the RPC from a browser, CORS will need to be enabled with the appropriate domain set. Otherwise, JavaScript calls are limit by the same-origin policy and requests will fail.

The CORS setting can be updated from the `app.toml`:

```
###############################################################################
###                           API Configuration                             ###
###############################################################################

[api]

# ...

# EnableUnsafeCORS defines if CORS should be enabled (unsafe - use it at your own risk).
enabled-unsafe-cors = true # default false
```


---

# 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://docs.blockxnet.com/dapp-developers/ethereum-json-rpc/running-the-server.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.
