Sovereign Polygon full node (Bor+Heimdall) deploy package for Hetzner dedicated
  • Shell 58.1%
  • Nix 41.9%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-08-17 14:24:59 +02:00
hosts/polygon-node feat: sovereign Polygon full node deploy package (Bor+Heimdall) for Hetzner dedicated 2026-08-17 14:24:59 +02:00
modules feat: sovereign Polygon full node deploy package (Bor+Heimdall) for Hetzner dedicated 2026-08-17 14:24:59 +02:00
scripts feat: sovereign Polygon full node deploy package (Bor+Heimdall) for Hetzner dedicated 2026-08-17 14:24:59 +02:00
flake.nix feat: sovereign Polygon full node deploy package (Bor+Heimdall) for Hetzner dedicated 2026-08-17 14:24:59 +02:00
README.md feat: sovereign Polygon full node deploy package (Bor+Heimdall) for Hetzner dedicated 2026-08-17 14:24:59 +02:00

polygon-node-deploy

Deploy a Polygon (Bor + Heimdall) mainnet full node — non-validator, read-only RPC — onto a Hetzner dedicated box. No secrets, no sops, no staking. The RPC (:8545) is tailnet-only by default and is meant to serve a "sovereign" verification endpoint for the VAKED token.

This package is self-contained: a minimal flake (nixpkgs + disko only, no private inputs) + the host config + provisioning/seed/status scripts. Everything below is copy-pasteable.


Requirements

  • A Hetzner dedicated box with ≥32 GB RAM and ≥6 TB fast storage (ideal: 2× 3.84 TB NVMe = 7.68 TB — the chainstate is ~5.7 TB and grows ~1 TB/yr)
  • A robot webservice user + password: robot.hetzner.com → user menu (top right) → Settings → "Web service and app settings"
    • If you'll order an auction box, also enable Ordering in the same settings page
  • A Linux/macOS machine with nix (flakes), git, ssh, curl and jq
  • Your SSH public key (~/.ssh/id_ed25519.pub, or set SSH_PUBKEY)

1 · Clone

git clone https://github.com/peterlodri-sec/polygon-node-deploy.git
cd polygon-node-deploy

2 · Provision an EXISTING box

export ROBOT_USER='<your-robot-webservice-user>'
export ROBOT_PASS='<your-robot-webservice-password>'
export SERVER_NUMBER='<server-number>'   # robot.hetzner.com → Servers
export SERVER_IP='<ipv4>'

./scripts/provision-polygon-robot.sh --order

The script will:

  1. Register your SSH key with the robot API,
  2. Boot the box into the rescue system (one-shot, expires in 60 min),
  3. Show the disk layout + NICs and pause for confirmation (verify nvme0n1+nvme1n1 and an en* NIC before answering y),
  4. Install NixOS via nixos-anywhere (kexec → disko mdadm RAID-0 → reboot).

2b · (alternative) Order a Server-Auction box

Requires Ordering enabled (see above). Prices are a Dutch auction — check --list, pick one:

./scripts/provision-polygon-robot.sh --list     # 7TB+ NVMe boxes, price-sorted
PRODUCT_ID=<id> ./scripts/provision-polygon-robot.sh --order

3 · Join the tailnet + seed

ssh root@<SERVER_IP>
tailscale up        # join your tailnet; the RPC :8545 is reachable there only

# copy the seed/status scripts onto the box, then run the seed
scp scripts/polygon-node-seed.sh scripts/polygon-node-status.sh root@<SERVER_IP>:/usr/local/bin/
ssh root@<SERVER_IP> polygon-node-seed.sh --snapshot   # snapshot = ~1-2 days to synced

4 · Watch sync, then start Bor

Heimdall must be fully synced before Bor starts:

curl -s localhost:26657/status | jq .result.sync_info.catching_up   # wait for false
systemctl start podman-polygon-bor.service
curl -s -X POST localhost:8545 -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","method":"eth_syncing","params":[],"id":1}'  # false == synced

5 · Status / verify

polygon-node-status.sh    # bor+heimdall sync, disk, VAKED totalSupply (expect 50 VAKED)

Notes

  • IPv6 is optional: the host boots IPv4-DHCP + Tailscale out of the box. To also configure IPv6, fill the Address at hosts/polygon-node/default.nix:44 with the box's /64 (robot API GET /server/{id} → subnets) and redeploy.
  • Reboots: Bor is autoStart = false (it must not start before Heimdall is caught up). Once the node is synced + stable, flip it to true in modules/polygon-node.nix (containers.polygon-bor.autoStart) so a reboot restarts it automatically.
  • Disk failure: the layout is mdadm RAID-0 (no redundancy — the chainstate is re-synced from a snapshot in 1–2 days). Recovery = re-provision via step 2 + seed.
  • Versions: bor 2.10.0, heimdall-v2 0.10.0, heimdall rest-server 1.0.3 (current multi-arch tags; the docs still pin stale ones).

the constellation · 0 + 1 · fine touch from within · vaked.dev