Skip to content

Commit 320ec69

Browse files
committed
docs(deploy): restructure .env.example files into consistent sections
1 parent 1e236c2 commit 320ec69

5 files changed

Lines changed: 252 additions & 265 deletions

File tree

‎mainnet/rpc/.env.example‎

Lines changed: 47 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,75 +1,75 @@
1-
# ─────────────────────────────────────────────────────────────────────────────
2-
# Orbinum Mainnet — public RPC node
3-
#
4-
# Copy to `.env` on the RPC VPS and fill in the values below:
5-
# cp .env.example .env
1+
# ═══ Orbinum Mainnet — public RPC ════════════════════════════════════════════
2+
# cp .env.example .env
63
#
74
# TLS: Caddy terminates HTTPS/WSS with a Cloudflare Origin Certificate. Drop
8-
# origin.pem / origin.key next to this file before starting. The DNS record
9-
# must be Proxied (orange cloud) in Cloudflare.
10-
# ─────────────────────────────────────────────────────────────────────────────
5+
# origin.pem / origin.key next to this file before starting, and set the DNS
6+
# record to Proxied (orange cloud).
7+
# ═════════════════════════════════════════════════════════════════════════════
8+
9+
# ─── Identity ────────────────────────────────────────────────────────────────
1110

12-
# Container image (override to pin a specific tag)
1311
ORBINUM_IMAGE=ghcr.io/orbinum/node:mainnet-latest
1412

15-
# Friendly name shown in telemetry. Use rpc-1 / rpc-2 / ... per node.
13+
# Shown in telemetry. Use rpc-1 / rpc-2 / ... per node.
1614
RPC_NAME=Orbinum-RPC-1
1715

18-
# Report to Orbinum's telemetry — https://telemetry.orbinum.network
16+
# libp2p node-key, hex 64 chars — unique per node.
17+
# openssl rand -hex 32
18+
RPC_NODE_KEY=
19+
20+
# Public domain. Caddy proxies HTTPS/WSS to localhost on RPC_PORT.
21+
RPC_DOMAIN=rpc-1.orbinum.io
22+
23+
# ─── Telemetry ───────────────────────────────────────────────────────────────
24+
25+
# https://telemetry.orbinum.network — on by default. Publishes name, version,
26+
# height, peer count, approximate location. Empty to opt out.
1927
#
20-
# On by default. Reporting publishes this node's name, version, block height,
21-
# peer count and approximate location; set this to empty to opt out.
28+
# Level 0 is the standard detail; higher levels add per-block chatter. RPCs stay
29+
# at 0 — they have no validator address to report.
2230
#
23-
# The trailing slash and the verbosity level are both required, and the whole
24-
# value must stay quoted — the node parses "<url> <level>" as one argument.
25-
# Level 0 is the standard detail level; higher levels add per-block chatter.
31+
# Keep it quoted and keep the trailing slash — the node parses "<url> <level>"
32+
# as one argument.
2633
TELEMETRY_URL=--telemetry-url "wss://telemetry.orbinum.io/submit/ 0"
2734

28-
# This RPC's libp2p node-key (hex, 64 chars). Generate with:
29-
# openssl rand -hex 32
30-
RPC_NODE_KEY=
35+
# ─── Peering ─────────────────────────────────────────────────────────────────
3136

32-
# Peers this node is allowed to talk to. Empty by default: a public RPC should
33-
# discover peers freely.
37+
# Empty by default: a public RPC should discover peers freely.
3438
#
3539
# Pin it during a recovery. The chainspec's bootNodes are the RPCs themselves,
3640
# so a freshly purged RPC discovers whatever is on the network — including a
37-
# third-party node still serving a dead fork, which it will happily sync from
38-
# because that chain is longer. Restricting it to your own validators for the
39-
# duration of the resync is what stops that; clear it again afterwards.
40-
#
41-
# RESERVED_NODES=--reserved-only --reserved-nodes /ip4/<validator-ip>/tcp/30333/p2p/<peer-id> --reserved-nodes /ip4/<validator-ip>/tcp/30333/p2p/<peer-id>
41+
# third-party node still serving a dead fork, which it will sync from because
42+
# that chain is longer. Restricting it to your own validators for the duration
43+
# of the resync is what stops that; clear it again afterwards.
44+
# RESERVED_NODES=--reserved-only --reserved-nodes /ip4/<validator-ip>/tcp/30333/p2p/<peer-id>
4245
RESERVED_NODES=
4346

44-
# Public domain for this RPC. Caddy proxies HTTPS/WSS to localhost on RPC_PORT.
45-
# Use rpc-1 / rpc-2 / ... per node.
46-
RPC_DOMAIN=rpc-1.orbinum.io
47+
# ─── Resources ───────────────────────────────────────────────────────────────
48+
# Caps for the node container, so a query flood can't starve the host (Caddy,
49+
# SSH, the OS). Always leave RAM and CPU for the host — never give the container
50+
# the full core count. Scale to your server.
4751

48-
# Resource caps for the node container, so a query flood can't starve the host.
49-
# Always leave some RAM and CPU for the host — never give the container the full
50-
# core count. Scale to match your server.
5152
RPC_MEM_LIMIT=6g
5253
RPC_CPUS=1.5
5354

54-
# ─── HOST ports ──────────────────────────────────────────────────────────────
55-
# This node runs with `network_mode: host`, so these flags bind DIRECTLY on the
56-
# host — there is no container port mapping in between. Changing a value here
57-
# moves the real listening socket.
55+
# ─── Ports ───────────────────────────────────────────────────────────────────
56+
# This stack runs `network_mode: host`, so these bind DIRECTLY on the host —
57+
# there is no container port mapping in between. Changing one moves the real
58+
# listening socket.
5859

59-
# P2P port. If you change it, open it in the firewall: it must stay publicly
60-
# reachable or this node gets no peers.
61-
# P2P_PORT=34105
60+
# Open it in the firewall: must stay publicly reachable or this node gets no
61+
# peers.
6262
P2P_PORT=30333
6363

64-
# RPC port the node listens on, and the port Caddy proxies to over loopback.
65-
# Both sides read this one variable, so they can never drift apart.
64+
# The port the node listens on AND the port Caddy proxies to over loopback —
65+
# both read this one variable, so they cannot drift apart.
6666
#
67-
# This is an internal port: public traffic arrives on 443 at RPC_DOMAIN and
68-
# Caddy forwards it here. Changing it does NOT change the public endpoint.
69-
# Keep it firewalled (`ufw deny <port>`) — clients must go through Caddy, which
70-
# is what applies the rate limits.
67+
# Internal only: public traffic arrives on 443 at RPC_DOMAIN and Caddy forwards
68+
# it here, so changing this does NOT change the public endpoint. Keep it
69+
# firewalled (`ufw deny <port>`) — clients must go through Caddy, which is what
70+
# applies the rate limits.
7171
RPC_PORT=9944
7272

73-
# Prometheus metrics port. With host networking this binds on the public NIC,
74-
# so keep it firewalled to the monitoring VPS only.
73+
# With host networking this binds on the public NIC — firewall it to the
74+
# monitoring VPS only.
7575
METRICS_PORT=9615

‎mainnet/validator/.env.example‎

Lines changed: 58 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,63 +1,79 @@
1-
# ─────────────────────────────────────────────────────────────────────────────
2-
# Orbinum Mainnet — VALIDATOR node
3-
#
4-
# Copy to `.env` on the validator VPS and fill in the values below:
5-
# cp .env.example .env
6-
# ─────────────────────────────────────────────────────────────────────────────
1+
# ═══ Orbinum Mainnet — VALIDATOR ═════════════════════════════════════════════
2+
# cp .env.example .env
3+
# ═════════════════════════════════════════════════════════════════════════════
4+
5+
# ─── Identity ────────────────────────────────────────────────────────────────
76

8-
# Container image (override to pin a specific tag)
97
ORBINUM_IMAGE=ghcr.io/orbinum/node:mainnet-latest
108

11-
# Friendly name shown in telemetry. Pick something identifiable.
9+
# Shown in telemetry. Pick something identifiable.
1210
VALIDATOR_NAME=Choose-Your-Validator-Name
1311

14-
# Report to Orbinum's telemetry — https://telemetry.orbinum.network
15-
#
16-
# On by default. Reporting publishes this node's name, version, block height,
17-
# peer count and approximate location; set this to empty to opt out.
12+
# libp2p node-key, hex 64 chars — unique per node.
13+
# openssl rand -hex 32
14+
VALIDATOR_NODE_KEY=
15+
16+
# ─── Telemetry ───────────────────────────────────────────────────────────────
17+
18+
# https://telemetry.orbinum.network — on by default. Publishes name, version,
19+
# height, peer count, approximate location. Empty to opt out.
1820
#
19-
# The trailing slash and the verbosity level are both required, and the whole
20-
# value must stay quoted — the node parses "<url> <level>" as one argument.
21+
# Validators use level 1, not 0: level 1 adds `afg.authority_set`, the only
22+
# message carrying the validator address the dashboard shows in Address.
2123
#
22-
# Validators report at level 1, where the node also sends `afg.authority_set`
23-
# — the only message carrying its validator address, which the dashboard shows
24-
# in the Address column. Level 0 omits it, so the column stays empty. The cost
25-
# is per-block chatter the dashboard discards. RPC nodes stay at 0: they have
26-
# no address to report.
24+
# Keep it quoted and keep the trailing slash — the node parses "<url> <level>"
25+
# as one argument.
2726
TELEMETRY_URL=--telemetry-url "wss://telemetry.orbinum.io/submit/ 1"
2827

29-
# This validator's libp2p node-key (hex, 64 chars). Generate with:
30-
# openssl rand -hex 32
31-
VALIDATOR_NODE_KEY=
28+
# ─── Peering ─────────────────────────────────────────────────────────────────
3229

33-
# P2P bind address. The node binds 0.0.0.0 on P2P_PORT (below), auto-detects its
34-
# public address, and discovers the network through the bootNodes baked into
35-
# chainspec/mainnet-spec.json. Make sure that TCP port is open and publicly
36-
# reachable. Leave at 0.0.0.0 unless you bind to a specific interface.
30+
# Interface to bind. Leave 0.0.0.0 unless pinning to one interface.
3731
P2P_BIND=0.0.0.0
3832

33+
# Address peers should dial. Only needed when the node cannot auto-detect a
34+
# reachable one — e.g. a validator on a private VPC advertising its VPC IP.
35+
# PUBLIC_ADDR=--public-addr /ip4/10.0.0.20/tcp/30333
36+
PUBLIC_ADDR=
37+
38+
# Restricts who this node talks to. Empty = discover via chainspec bootNodes.
39+
#
40+
# Two uses: validators on a private network pin each other with --reserved-only
41+
# so they never gossip publicly; and during recovery it stops a purged node from
42+
# resyncing off a stranger serving a longer-but-dead fork.
43+
#
44+
# List every OTHER node this one should reach, not itself.
45+
# RESERVED_NODES=--reserved-only --reserved-nodes /ip4/10.0.0.21/tcp/30333/p2p/<peer-id>
46+
RESERVED_NODES=
47+
3948
# ─── Ports ───────────────────────────────────────────────────────────────────
40-
# P2P uses ONE value on both sides of the mapping. RPC only moves the HOST side
41-
# (the container keeps 9944), for validators that already use that port.
42-
43-
# P2P port. Used on BOTH sides of the port mapping and in --listen-addr, so the
44-
# node listens on it, advertises it, and the host publishes it — one value, no
45-
# way to drift. If you change it, open it in the firewall: it must stay publicly
46-
# reachable or this node gets no inbound peers.
47-
# P2P_PORT=34105
49+
# P2P and metrics use ONE value on both sides of their mapping, so the port the
50+
# node uses and the one the host publishes cannot drift. RPC moves only the host
51+
# side (the container keeps 9944).
52+
53+
# Open it in the firewall: must stay publicly reachable or no inbound peers.
4854
P2P_PORT=30333
4955

50-
# RPC port on the host. A local `curl` (author_rotateKeys) targets this one:
51-
# RPC_PORT=26722 → curl http://localhost:26722/
56+
# A local `curl` (author_rotateKeys) targets this one:
57+
# RPC_PORT=26722 → curl http://localhost:26722/
5258
RPC_PORT=9944
5359

54-
# WARNING: this node runs `--rpc-methods Unsafe`: author_rotateKeys and
55-
# author_insertKey take no authentication. Leave RPC_BIND at 127.0.0.1 —
56-
# NEVER 0.0.0.0 or a public IP.
60+
# WARNING: this node runs `--rpc-methods Unsafe`. author_rotateKeys and
61+
# author_insertKey take NO authentication — anyone who reaches the port can read
62+
# or overwrite your session keys.
63+
# Leave this at 127.0.0.1. NEVER 0.0.0.0 or a public IP.
5764
RPC_BIND=127.0.0.1
5865

59-
# Empty = RPC on loopback INSIDE the container only. Set it to --rpc-external
60-
# only if you need to reach it from the host; RPC_BIND is then the only thing
61-
# keeping it off the internet.
66+
# Empty = RPC on loopback INSIDE the container, which is the right default.
67+
# --rpc-external makes it listen on 0.0.0.0 there, leaving RPC_BIND as the only
68+
# thing keeping it off the internet.
6269
# RPC_EXTERNAL=--rpc-external
6370
RPC_EXTERNAL=
71+
72+
METRICS_PORT=9615
73+
74+
# Interface metrics are published on, for the monitoring VPS to scrape. The node
75+
# binds 0.0.0.0 inside the container, so this is what keeps the port off the
76+
# public NIC. Set it to THIS validator's private IP:
77+
# METRICS_BIND=10.0.0.20
78+
# The 127.0.0.1 default fails closed: forget it and nothing is exposed.
79+
METRICS_BIND=127.0.0.1

0 commit comments

Comments
 (0)