Asentum

Run a Node

Run Your Own RPC Endpoint

Public, private or local, with an optional HTTPS domain · Estimated read time: 6 minutes

Accurate as of node 0.6.81.

TL;DR

Every Asentum node already runs an RPC on port 8545. If you run a validator on a VPS, it is a public RPC today at http://<server-ip>:8545. You decide who can reach it:

asentum-validator rpc status                           # show the current setting
asentum-validator rpc public                           # anyone can reach 8545 (the default)
asentum-validator rpc private 203.0.113.7,198.51.100.4  # only these IPs
asentum-validator rpc local                            # nobody from outside

Changing it never affects block production or rewards. For browser wallets and dapps, put a domain with HTTPS in front of it using Caddy (see Use a domain with HTTPS).

What the RPC serves

Port 8545 serves two kinds of requests:

  • Ethereum-style JSON-RPC with POST /. See the JSON-RPC Reference.
  • REST routes, for example GET /v3/heads, GET /chain, POST /view, POST /tx, GET /receipts/<hash> and GET /balance/<address>.

CORS is open (Access-Control-Allow-Origin: *), so a website can call your RPC directly from the browser.

VPS validators

If you installed with the VPS one-liner, the node listens on 0.0.0.0:8545 and the installer opens 8545 in ufw. So your validator is already a public RPC at:

http://<server-ip>:8545

That is the public access mode. You can keep it, limit it to a few IPs, or close it to the outside.

Choose access at install

The installer reads ASENTUM_RPC_ACCESS. It takes one of three values:

ValueWho can reach port 8545
publicAnyone. This is the default and matches how installs have always worked.
privateOnly the IPs you list in ASENTUM_RPC_ALLOW, separated by commas.
localNobody from outside. Tools on the server itself still work.

Add the variables in front of bash, the same way you pass other installer options. A private RPC for one IP:

curl -fsSL https://explorer.asentum.com/install/validator | ASENTUM_RPC_ACCESS=private ASENTUM_RPC_ALLOW=203.0.113.7 bash

No outside access at all:

curl -fsSL https://explorer.asentum.com/install/validator | ASENTUM_RPC_ACCESS=local bash

You can combine these with other options, for example ASENTUM_IMPORT_KEY_HEX=ask to install with a wallet you already have.

Change access later

Already running? Use the rpc subcommand of asentum-validator:

asentum-validator rpc status
asentum-validator rpc public
asentum-validator rpc private 203.0.113.7,198.51.100.4
asentum-validator rpc local

status shows the current mode and the allowed IPs. The other three switch modes and update the firewall for you.

This never affects block production or rewards. Validators talk to each other on port 9000, which stays locked to the network's core nodes whatever you choose here. The node's own tools use the RPC from the server itself, so they keep working in local mode.

If asentum-validator rpc is not recognised, your copy of the command is older than this page. Run asentum-validator self-update first (see Update only the command).

Operator app

The node inside the Operator desktop app serves its RPC on 127.0.0.1 only, on port 9545. You can use it from the same computer, for scripts, the CLI, the SDK or a dapp you run locally:

curl -s http://127.0.0.1:9545/chain

It is not reachable from other machines. You could set up your own SSH tunnel for remote use, but we do not recommend it: home connections change IP and drop, and laptops go to sleep. If you want an RPC other people or other machines can rely on, run it on a VPS.

Use a domain with HTTPS

Browser wallets and dapps need HTTPS. A page loaded over https:// is not allowed to call a plain http:// address, so http://<server-ip>:8545 will be blocked. Caddy fixes this in a few minutes and gets the certificate for you.

  1. At your DNS provider, add an A record for your RPC name (for example rpc.example.com) pointing at the server IP.
  2. Install Caddy on the server:
    sudo apt install -y debian-keyring debian-archive-keyring apt-transport-https curl
    curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | sudo gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg
    curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | sudo tee /etc/apt/sources.list.d/caddy-stable.list
    sudo apt update && sudo apt install -y caddy
  3. Put this in /etc/caddy/Caddyfile, with your own name:
    rpc.example.com {
      reverse_proxy 127.0.0.1:8545
    }
  4. Open ports 80 and 443 and reload Caddy:
    sudo ufw allow 80,443/tcp
    sudo systemctl reload caddy

Caddy requests the certificate on its own once the DNS record points at the server. Your RPC is now at https://rpc.example.com.

Then close port 8545 to the outside, so Caddy is the only public way in:

asentum-validator rpc local

Caddy runs on the same server and reaches the node at 127.0.0.1:8545, so it keeps working.

Before you go public

●

Read this before sharing your RPC

  • The RPC shares CPU with your validator. Heavy public traffic can make your node miss blocks and votes, and that costs you rewards.
  • Size it for the load. A 2 vCPU validator is fine for personal or light use. For a busy public endpoint, run a separate node that does not validate.
  • Add rate limits. The node itself does very little rate limiting. For a public endpoint, add per-IP limits, for example Cloudflare in front of your domain or a Caddy rate-limit plugin.
  • It serves your node's view of the chain. That means recent state and blocks, not full history like the explorer keeps.

Point your wallet at your own node

Once your RPC is up, your wallets can use it instead of the public one. Each one checks the address before saving: it must answer as chain 1423 and report a current block height.

  • Asentum Wallet extension: Settings, Network RPC, paste your https address, Save. Chrome asks once for permission to talk to that address.
  • Telegram wallet: Settings, Network (RPC), Use my own RPC, then send the https address.
  • Apps with the Connect Wallet button (Auras, the explorer, social and others): open the wallet menu, Network, Change.

Your transactions are only ever sent through the RPC you chose. If your node stops answering, the wallet tells you and offers to switch back to the public RPC; it never quietly sends a transaction somewhere else. Reset to default is always one click away.

Check it works

From another machine, ask for the chain head:

curl -s https://rpc.example.com/v3/heads
curl -s http://<server-ip>:8545/chain

Compare the height with the one on the explorer. If yours is close, your node is synced and your RPC is serving current data.

If a request from outside times out, run asentum-validator rpc status and check that your IP is allowed, or that you are going through the domain when the mode is local.

Read next