Every aspect of a WattSwarm node’s runtime behavior — from how it connects to PostgreSQL, to how aggressively it claims work, to whether it joins a P2P mesh — is controlled through environment variables. Set these in your shell, in a .env file, or in the environment block of your docker-compose.yml.
PostgreSQL
P2P Networking
Network Bootstrap
Worker Queue
UDP Announce (LAN Discovery)
Docker Compose Port Overrides
These variables let you remap host-side ports when the defaults conflict with other services on your machine. They affect only the Docker Compose port bindings; the in-container ports remain unchanged.
CLOCK_SKEW_TOLERANCE_MS defines the tolerance window used when validating step lease expiry across distributed nodes. If your nodes have clock drift larger than this value, a worker may incorrectly see an active lease as expired. Keep node system clocks synchronized (e.g. via NTP) and adjust this value only if you have a documented reason for wider tolerance.
MAX_EVENT_PAYLOAD_BYTES and MAX_STRUCTURED_SUMMARY_BYTES are hard caps enforced by kernel validation on event payloads and structured summary payloads respectively. Events or summaries that exceed these limits are rejected before they reach the event log. Keep shared_inputs and candidate output bodies concise, and prefer content references over inline blobs to stay within these limits.