Run a full / RPC node
A full node stores the entire chain state and validates every block, but does not sign blocks. It can serve eth_* JSON-RPC and Cosmos RPC/REST publicly. Anyone can run one — no permission needed.
This page covers two paths:
- One-click Railway deploy — production-style, public HTTPS in minutes.
- Local devnet on your laptop — for iteration and contract dev.
Option 1 — Deploy on Railway
The repo's docker/ contains everything needed.
- Fork or use the repo.
- In Railway → New service → GitHub repo → this repo.
- Railway auto-detects
railway.jsonat the repo root and buildsdocker/Dockerfile. - Attach a Volume mounted at
/data. Without this, every redeploy wipes the chain (genesis regenerated, height resets to 0). - Settings → Networking → Generate Domain.
That generated domain serves four things behind one HTTPS port (via Caddy):
| Path | Backend | Use |
|---|---|---|
/ | EVM JSON-RPC :8545 | MetaMask / ethers / web3 |
/ws | EVM WebSocket :8546 | subscriptions, hardhat-network |
/rpc/* | CometBFT RPC :26657 | Cosmos clients / explorer |
/rest/* | Cosmos REST :1317 | LCD / explorer |
Joining the existing network
The default entrypoint generates a fresh single-node chain if the volume is empty. To join the existing public sanect network instead, set JOIN_NETWORK=true and the entrypoint handles everything automatically: fetching genesis, configuring peers, and state-syncing to the chain tip.
Join mainnet
JOIN_NETWORK=true
CHAIN_ID=sanect_7628-1
EVM_CHAIN_ID=7628
SEED_NODE_URL=https://rpc.sanect.com
MONIKER=my-sanect-node
HOMEDIR=/data/.sanectdJoin testnet
JOIN_NETWORK=true
CHAIN_ID=sanect_76287-1
EVM_CHAIN_ID=76287
SEED_NODE_URL=https://rpc.testnet.sanect.com
MONIKER=my-sanect-testnet-node
HOMEDIR=/data/.sanectdOn first boot with JOIN_NETWORK=true, the entrypoint:
- Generates a fresh validator key (unique per service).
- Fetches genesis from
$SEED_NODE_URL/rpc/genesis. - Wires
persistent_peersto point at the seed. - Configures state sync from the seed (trust height = current - 2000).
- Starts the node and syncs to tip.
Snapshot fast-start
For large chains (>100k blocks), you can speed up the initial sync by downloading a tarball snapshot. Set one of:
SNAPSHOT_MANIFEST_URL=https://sanect-snapshots.sanect.com/LATEST.json
# or an explicit URL:
# SNAPSHOT_URL=https://sanect-snapshots.sanect.com/sanect-42000.tar.lz4The entrypoint tries the snapshot first, falls back to state sync, and ultimately falls back to block sync from genesis if both fail.
Verify it's working
Once Railway shows the service "Active", check the logs for:
>>> Node up at block <N>. Running REST gateway self-test...
>>> REST SELF-TEST: OK (gRPC gateway serving — explorer will work)
>>> sanect | block=<N> | txs_in_block=0 | mempool_pending=0Then from anywhere:
curl https://<your-domain>/rpc/status | jq .result.sync_info.latest_block_heightOption 2 — Local devnet
Single command for laptop development:
# Prerequisites: Go 1.25+, jq, a C toolchain (CGO).
git clone https://github.com/cosmos/evm && cd evm && make install
export PATH=$PATH:$(go env GOPATH)/bin
git clone https://github.com/sanect/sanect-node
cd sanect-node
./scripts/localnet.shThis wipes ~/.sanectd and starts a single-validator chain at:
| Endpoint | URL |
|---|---|
| EVM JSON-RPC | http://localhost:8545 |
| Cosmos RPC | http://localhost:26657 |
| Cosmos REST | http://localhost:1317 |
Env overrides: CHAIN_ID, MONIKER, HOMEDIR, BASEFEE, LOGLEVEL, DENOM, DISPLAY. Set SETUP_ONLY=true to build genesis without starting.
Public RPC node = full node + a public domain
There's no separate "RPC node" mode — a full node already serves the JSON-RPC. Once it's reachable on the internet (Railway domain or your own DNS), it's a public RPC node. You can run many for load: see 1 → 50 validators on Railway §"RPC replicas".
Next step
→ Run a validator to also sign blocks and earn stake rewards.