Run a node
Configuration
The settings a node reads, and the one folder it keeps.
On this page
Settings
Set these as environment variables on the container.
| Setting | Default | What it does |
|---|---|---|
HOPBITS_DAILY_MB | 200 | The daily cap for measurement traffic, in whole MB. The lowest value is 1. A value above 200 is brought back to 200. |
HOPBITS_NETWORK_MODE | None | host or bridge: the Docker network the node runs on. |
HOPBITS_DISABLE_KINDS | None | Checks this node should not run, as a comma-separated list of http, tcp_connect and icmp_ping. At least one has to stay on. |
HOPBITS_AUTO_UPDATE | true | Set it to false and the node stops updating itself. |
HOPBITS_LOG_LEVEL | info | debug, info, warn or error. |
HOPBITS_ENROLL | None | An enrolment token. See Enrol a fleet. |
HOPBITS_GATEWAY | wss://api.hopbits.io/v1/node | Outbound TLS WebSocket gateway endpoint. Leave unset unless instructed otherwise. |
For example, a node with half the daily cap that leaves ping checks to others:
sudo docker run -d \
--name hopbits-agent \
--restart=always \
--cap-drop ALL \
--security-opt no-new-privileges:true \
--network host \
-e HOPBITS_NETWORK_MODE=host \
-e HOPBITS_DAILY_MB=100 \
-e HOPBITS_DISABLE_KINDS=icmp_ping \
-v hopbits-data:/var/lib/hopbits \
hopbits/agent:local
What the node keeps
Everything lives in /var/lib/hopbits inside the container. That folder is the hopbits-data volume.
| File | What it is |
|---|---|
node.key | The node's identity. The node ID comes from this key. |
state.json | What the node remembers between starts. |
traffic.json | How much of today's cap has been used. |
pending/ | Results the network has not confirmed yet, kept for up to 24 hours. |
jobs.log | The last 100 jobs the node ran. |