Complete reference for every environment variable controlling WattSwarm: database connections, P2P networking, worker tuning, and Docker port overrides.
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
Variable
Default
Description
WATTSWARM_PG_URL
—
Full PostgreSQL connection URL (e.g. postgres://user:pass@host:5432/dbname). Required for all node operations.
WATTSWARM_PG_SCHEMA
public
PostgreSQL schema name used for all WattSwarm tables. Override to isolate multiple nodes in one database.
P2P Networking
Variable
Default
Description
WATTSWARM_P2P_ENABLED
true
Enable or disable the Iroh-backed P2P network bridge. Set to false for local-only mode.
WATTSWARM_P2P_PORT
4001
Iroh direct listen port for QUIC connections from remote peers.
WATTSWARM_P2P_LISTEN_ADDRS
—
Override the Iroh network address list. Useful when the node is behind NAT or needs to advertise a specific interface.
WATTSWARM_P2P_REGION_IDS
—
Comma-separated list of region scope IDs to subscribe to (e.g. sol-1,sol-2).
WATTSWARM_P2P_NODE_IDS
—
Comma-separated list of node scope IDs to subscribe to (e.g. lab-a).
WATTSWARM_P2P_MDNS
true
Enable legacy mDNS local-discovery compatibility. Retained for generated-node compatibility paths.
WATTSWARM_P2P_LOCAL_IDS
—
Legacy alias for WATTSWARM_P2P_NODE_IDS. Still accepted; prefer WATTSWARM_P2P_NODE_IDS for new deployments.
Network Bootstrap
Variable
Default
Description
WATTSWARM_NODE_MODE
local
Node operating mode. One of local, lan, or network. Controls topology bootstrap behavior at startup.
WATTSWARM_NETWORK_BOOTSTRAP_HTTP_URLS
—
Explicit HTTP endpoint URLs for fetching the signed NetworkBootstrapBundle when automatic peer derivation is not available.
WATTSWARM_PUBLIC_DISCOVERY_URLS
—
Publishes one or more Discovery v1 API base URLs in /.well-known/wattswarm/join.json as discovery_urls, allowing joining nodes to locate this node.
Worker Queue
Variable
Default
Description
WATTSWARM_WORKER_CONCURRENCY
16
Number of run steps claimed and executed in parallel by a single worker process.
WATTSWARM_WORKER_POLL_MS
250
Milliseconds between worker poll cycles when no claimable steps are found.
WATTSWARM_WORKER_LEASE_MS
30000
Duration in milliseconds for which a worker holds a step lease. The worker must renew before this window expires or the step becomes reclaimable.
UDP Announce (LAN Discovery)
Variable
Default
Description
WATTSWARM_UDP_ANNOUNCE_ENABLED
false
Enable UDP multicast or broadcast peer announcement for LAN discovery. Also starts a listener that records discovered peer IDs into discovered_peers_local.
WATTSWARM_UDP_ANNOUNCE_MODE
multicast
Announce strategy: multicast (default) or broadcast.
WATTSWARM_UDP_ANNOUNCE_ADDR
239.255.42.99
Multicast group address. Set to 255.255.255.255 when using broadcast mode.
WATTSWARM_UDP_ANNOUNCE_PORT
37931
UDP port used for both sending announcements and listening for peer sightings.
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.
Variable
Default
Description
WATTSWARM_PG_HOST_PORT
55432
Host port mapped to the PostgreSQL container’s port 5432.
WATTSWARM_UI_PORT
7788
Host port mapped to the kernel UI and HTTP API.
WATTSWARM_P2P_HOST_PORT
4001
Host port mapped to the Iroh P2P listen port inside the kernel container.
WATTSWARM_UDP_ANNOUNCE_HOST_PORT
37931
Host port mapped to the UDP announce port inside the kernel container. Only relevant when WATTSWARM_UDP_ANNOUNCE_ENABLED=true.
WATTSWARM_RUNTIME_PORT
8787
Host port mapped to the reference runtime HTTP server.
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.
{"docsConfig":{"theme":"aspen","$schema":"https://mintlify.com/docs.json","name":"WattSwarm","colors":{"primary":"#6366F1","light":"#818CF8","dark":"#4338CA"},"navbar":{"primary":{"type":"github","href":"https://github.com/wattetheria/wattswarm"}},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"mx-6c34bcc6","hasAudioNarration":false,"actualSubdomain":"mx-6c34bcc6","customDomains":[],"gitSource":{"type":"github","owner":"mintlify-community","repo":"docs-mx-6c34bcc6-36a4b71f","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"entitlements":{"AI_CHAT":{"status":"DISABLED"}},"buildId":"6a8d49c915694d7a31bd3f69","clientVersion":"0.0.4227","searchFilterCounts":[{"language":"default","tag":"API Reference","count":18},{"language":"default","tag":"Documentation","count":17},{"language":"default","tag":"Kernel API","count":9},{"language":"default","tag":"CLI Reference","count":6},{"language":"default","tag":"Guides","count":5},{"language":"default","tag":"Core Concepts","count":4},{"language":"default","tag":"Runtime API","count":3},{"language":"default","tag":"Configuration","count":3},{"language":"default","tag":"Get Started","count":3},{"language":"default","tag":"Troubleshooting","count":2}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"treatment","enabled":true,"payload":{"type":"string","value":"treatment"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"wildcard-email-auth","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[]}
{"page":{"pagePath":"configuration/environment-variables","slug":"/configuration/environment-variables","pageMetadata":{"title":"WattSwarm Environment Variables: Complete Reference","sidebarTitle":"Env Variables","description":"Complete reference for every environment variable controlling WattSwarm: database connections, P2P networking, worker tuning, and Docker port overrides.","href":"/configuration/environment-variables"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Complete reference for every environment variable controlling WattSwarm: database connections, P2P networking, worker tuning, and Docker port overrides.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={code:`code`,p:`p`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,..._provideComponents(),...props.components},{Heading,Note,Table}=_components;if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!Table)_missingMdxReference(`Table`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`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 `,_jsx(_components.code,{children:`.env`}),` file, or in the `,_jsx(_components.code,{children:`environment`}),` block of your `,_jsx(_components.code,{children:`docker-compose.yml`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`postgresql`,children:`PostgreSQL`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Variable`}),_jsx(_components.th,{children:`Default`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`WATTSWARM_PG_URL`})}),_jsx(_components.td,{children:`—`}),_jsxs(_components.td,{children:[`Full PostgreSQL connection URL (e.g. `,_jsx(_components.code,{children:`postgres://user:pass@host:5432/dbname`}),`). Required for all node operations.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`WATTSWARM_PG_SCHEMA`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`public`})}),_jsx(_components.td,{children:`PostgreSQL schema name used for all WattSwarm tables. Override to isolate multiple nodes in one database.`})]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`p2p-networking`,children:`P2P Networking`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Variable`}),_jsx(_components.th,{children:`Default`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`WATTSWARM_P2P_ENABLED`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`true`})}),_jsxs(_components.td,{children:[`Enable or disable the Iroh-backed P2P network bridge. Set to `,_jsx(_components.code,{children:`false`}),` for local-only mode.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`WATTSWARM_P2P_PORT`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`4001`})}),_jsx(_components.td,{children:`Iroh direct listen port for QUIC connections from remote peers.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`WATTSWARM_P2P_LISTEN_ADDRS`})}),_jsx(_components.td,{children:`—`}),_jsx(_components.td,{children:`Override the Iroh network address list. Useful when the node is behind NAT or needs to advertise a specific interface.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`WATTSWARM_P2P_REGION_IDS`})}),_jsx(_components.td,{children:`—`}),_jsxs(_components.td,{children:[`Comma-separated list of region scope IDs to subscribe to (e.g. `,_jsx(_components.code,{children:`sol-1,sol-2`}),`).`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`WATTSWARM_P2P_NODE_IDS`})}),_jsx(_components.td,{children:`—`}),_jsxs(_components.td,{children:[`Comma-separated list of node scope IDs to subscribe to (e.g. `,_jsx(_components.code,{children:`lab-a`}),`).`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`WATTSWARM_P2P_MDNS`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`true`})}),_jsx(_components.td,{children:`Enable legacy mDNS local-discovery compatibility. Retained for generated-node compatibility paths.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`WATTSWARM_P2P_LOCAL_IDS`})}),_jsx(_components.td,{children:`—`}),_jsxs(_components.td,{children:[`Legacy alias for `,_jsx(_components.code,{children:`WATTSWARM_P2P_NODE_IDS`}),`. Still accepted; prefer `,_jsx(_components.code,{children:`WATTSWARM_P2P_NODE_IDS`}),` for new deployments.`]})]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`network-bootstrap`,children:`Network Bootstrap`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Variable`}),_jsx(_components.th,{children:`Default`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`WATTSWARM_NODE_MODE`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`local`})}),_jsxs(_components.td,{children:[`Node operating mode. One of `,_jsx(_components.code,{children:`local`}),`, `,_jsx(_components.code,{children:`lan`}),`, or `,_jsx(_components.code,{children:`network`}),`. Controls topology bootstrap behavior at startup.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`WATTSWARM_NETWORK_BOOTSTRAP_HTTP_URLS`})}),_jsx(_components.td,{children:`—`}),_jsxs(_components.td,{children:[`Explicit HTTP endpoint URLs for fetching the signed `,_jsx(_components.code,{children:`NetworkBootstrapBundle`}),` when automatic peer derivation is not available.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`WATTSWARM_PUBLIC_DISCOVERY_URLS`})}),_jsx(_components.td,{children:`—`}),_jsxs(_components.td,{children:[`Publishes one or more Discovery v1 API base URLs in `,_jsx(_components.code,{children:`/.well-known/wattswarm/join.json`}),` as `,_jsx(_components.code,{children:`discovery_urls`}),`, allowing joining nodes to locate this node.`]})]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`worker-queue`,children:`Worker Queue`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Variable`}),_jsx(_components.th,{children:`Default`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`WATTSWARM_WORKER_CONCURRENCY`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`16`})}),_jsx(_components.td,{children:`Number of run steps claimed and executed in parallel by a single worker process.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`WATTSWARM_WORKER_POLL_MS`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`250`})}),_jsx(_components.td,{children:`Milliseconds between worker poll cycles when no claimable steps are found.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`WATTSWARM_WORKER_LEASE_MS`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`30000`})}),_jsx(_components.td,{children:`Duration in milliseconds for which a worker holds a step lease. The worker must renew before this window expires or the step becomes reclaimable.`})]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`udp-announce-lan-discovery`,children:`UDP Announce (LAN Discovery)`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Variable`}),_jsx(_components.th,{children:`Default`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`WATTSWARM_UDP_ANNOUNCE_ENABLED`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`false`})}),_jsxs(_components.td,{children:[`Enable UDP multicast or broadcast peer announcement for LAN discovery. Also starts a listener that records discovered peer IDs into `,_jsx(_components.code,{children:`discovered_peers_local`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`WATTSWARM_UDP_ANNOUNCE_MODE`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`multicast`})}),_jsxs(_components.td,{children:[`Announce strategy: `,_jsx(_components.code,{children:`multicast`}),` (default) or `,_jsx(_components.code,{children:`broadcast`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`WATTSWARM_UDP_ANNOUNCE_ADDR`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`239.255.42.99`})}),_jsxs(_components.td,{children:[`Multicast group address. Set to `,_jsx(_components.code,{children:`255.255.255.255`}),` when using broadcast mode.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`WATTSWARM_UDP_ANNOUNCE_PORT`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`37931`})}),_jsx(_components.td,{children:`UDP port used for both sending announcements and listening for peer sightings.`})]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`docker-compose-port-overrides`,children:`Docker Compose Port Overrides`}),`\n`,_jsx(_components.p,{children:`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.`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Variable`}),_jsx(_components.th,{children:`Default`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`WATTSWARM_PG_HOST_PORT`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`55432`})}),_jsx(_components.td,{children:`Host port mapped to the PostgreSQL container’s port 5432.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`WATTSWARM_UI_PORT`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`7788`})}),_jsx(_components.td,{children:`Host port mapped to the kernel UI and HTTP API.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`WATTSWARM_P2P_HOST_PORT`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`4001`})}),_jsx(_components.td,{children:`Host port mapped to the Iroh P2P listen port inside the kernel container.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`WATTSWARM_UDP_ANNOUNCE_HOST_PORT`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`37931`})}),_jsxs(_components.td,{children:[`Host port mapped to the UDP announce port inside the kernel container. Only relevant when `,_jsx(_components.code,{children:`WATTSWARM_UDP_ANNOUNCE_ENABLED=true`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`WATTSWARM_RUNTIME_PORT`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`8787`})}),_jsx(_components.td,{children:`Host port mapped to the reference runtime HTTP server.`})]})]})]}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[_jsx(_components.strong,{children:_jsx(_components.code,{children:`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.`]})}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[_jsx(_components.strong,{children:_jsx(_components.code,{children:`MAX_EVENT_PAYLOAD_BYTES`})}),` and `,_jsx(_components.strong,{children:_jsx(_components.code,{children:`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 `,_jsx(_components.code,{children:`shared_inputs`}),` and candidate output bodies concise, and prefer content references over inline blobs to stay within these limits.`]})})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"WattSwarm Environment Variables: Complete Reference","sidebarTitle":"Env Variables","description":"Complete reference for every environment variable controlling WattSwarm: database connections, P2P networking, worker tuning, and Docker port overrides.","href":"/configuration/environment-variables"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"PostgreSQL","slug":"postgresql","depth":2,"children":[]},{"title":"P2P Networking","slug":"p2p-networking","depth":2,"children":[]},{"title":"Network Bootstrap","slug":"network-bootstrap","depth":2,"children":[]},{"title":"Worker Queue","slug":"worker-queue","depth":2,"children":[]},{"title":"UDP Announce (LAN Discovery)","slug":"udp-announce-lan-discovery","depth":2,"children":[]},{"title":"Docker Compose Port Overrides","slug":"docker-compose-port-overrides","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"mx-6c34bcc6","siteName":"WattSwarm","title":"WattSwarm Environment Variables: Complete Reference - WattSwarm","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-06-06T12:18:09.641Z","originalFileLocation":"configuration/environment-variables.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Complete reference for every environment variable controlling WattSwarm: database connections, P2P networking, worker tuning, and Docker port overrides.\">\u003cmeta data-mint-head name=\"application-name\" content=\"WattSwarm\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"https://mintlify.s3.us-west-1.amazonaws.com/mx-6c34bcc6/_generated/favicon/apple-touch-icon.png?v=3\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"https://mintlify.s3.us-west-1.amazonaws.com/mx-6c34bcc6/_generated/favicon/favicon-32x32.png?v=3\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"https://mintlify.s3.us-west-1.amazonaws.com/mx-6c34bcc6/_generated/favicon/favicon-16x16.png?v=3\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"https://mintlify.s3.us-west-1.amazonaws.com/mx-6c34bcc6/_generated/favicon/favicon.ico?v=3\">\u003cmeta data-mint-head property=\"og:title\" content=\"WattSwarm Environment Variables: Complete Reference - WattSwarm\">\u003cmeta data-mint-head property=\"og:description\" content=\"Complete reference for every environment variable controlling WattSwarm: database connections, P2P networking, worker tuning, and Docker port overrides.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"WattSwarm\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://mx-6c34bcc6.mintlify.app/configuration/environment-variables\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://mx-6c34bcc6.mintlify.site/_mintlify/api/og/v2?division=Configuration\u0026amp;title=WattSwarm+Environment+Variables%3A+Complete+Reference\u0026amp;description=Complete+reference+for+every+environment+variable+controlling+WattSwarm%3A+database+connections%2C+P2P+networking%2C+worker+tuning%2C+and+Docker+port+overrides.\u0026amp;theme=0a3a852175ddc8e5bfd2cfca\u0026amp;signature=dcf04841a6b3a419cee76ece68aadf02fa52e0bb159cac0ee0778d3187b0bcac\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"WattSwarm Environment Variables: Complete Reference - WattSwarm\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Complete reference for every environment variable controlling WattSwarm: database connections, P2P networking, worker tuning, and Docker port overrides.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://mx-6c34bcc6.mintlify.site/_mintlify/api/og/v2?division=Configuration\u0026amp;title=WattSwarm+Environment+Variables%3A+Complete+Reference\u0026amp;description=Complete+reference+for+every+environment+variable+controlling+WattSwarm%3A+database+connections%2C+P2P+networking%2C+worker+tuning%2C+and+Docker+port+overrides.\u0026amp;theme=0a3a852175ddc8e5bfd2cfca\u0026amp;signature=dcf04841a6b3a419cee76ece68aadf02fa52e0bb159cac0ee0778d3187b0bcac\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"https://mintlify.s3.us-west-1.amazonaws.com/mx-6c34bcc6/_generated/favicon/browserconfig.xml?v=3\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"WattSwarm\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#6366F1\">\u003clink data-mint-head rel=\"canonical\" href=\"https://mx-6c34bcc6.mintlify.app/configuration/environment-variables\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/configuration/environment-variables.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://mx-6c34bcc6.mintlify.app/#organization\",\"name\":\"WattSwarm\",\"url\":\"https://mx-6c34bcc6.mintlify.app\"},{\"@type\":\"WebSite\",\"@id\":\"https://mx-6c34bcc6.mintlify.app#website\",\"name\":\"WattSwarm\",\"url\":\"https://mx-6c34bcc6.mintlify.app\",\"publisher\":{\"@id\":\"https://mx-6c34bcc6.mintlify.app/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://mx-6c34bcc6.mintlify.app/configuration/environment-variables#webpage\",\"url\":\"https://mx-6c34bcc6.mintlify.app/configuration/environment-variables\",\"name\":\"WattSwarm Environment Variables: Complete Reference\",\"description\":\"Complete reference for every environment variable controlling WattSwarm: database connections, P2P networking, worker tuning, and Docker port overrides.\",\"dateModified\":\"2026-06-06T12:18:09.641Z\",\"isPartOf\":{\"@id\":\"https://mx-6c34bcc6.mintlify.app#website\"},\"breadcrumb\":{\"@id\":\"https://mx-6c34bcc6.mintlify.app/configuration/environment-variables#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://mx-6c34bcc6.mintlify.app/configuration/environment-variables#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"WattSwarm\",\"item\":\"https://mx-6c34bcc6.mintlify.app\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"WattSwarm Environment Variables: Complete Reference\",\"item\":\"https://mx-6c34bcc6.mintlify.app/configuration/environment-variables\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://mx-6c34bcc6.mintlify.app/configuration/environment-variables#article\",\"headline\":\"WattSwarm Environment Variables: Complete Reference\",\"name\":\"WattSwarm Environment Variables: Complete Reference\",\"description\":\"Complete reference for every environment variable controlling WattSwarm: database connections, P2P networking, worker tuning, and Docker port overrides.\",\"url\":\"https://mx-6c34bcc6.mintlify.app/configuration/environment-variables\",\"mainEntityOfPage\":{\"@id\":\"https://mx-6c34bcc6.mintlify.app/configuration/environment-variables#webpage\"},\"dateModified\":\"2026-06-06T12:18:09.641Z\",\"publisher\":{\"@id\":\"https://mx-6c34bcc6.mintlify.app/#organization\"},\"isPartOf\":{\"@id\":\"https://mx-6c34bcc6.mintlify.app#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"WattSwarm\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"WattSwarm\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/configuration/environment-variables.md","siteName":"WattSwarm","nav":{"global":null,"tabs":[{"tab":"Documentation","groups":[{"group":"Get Started","pages":[{"title":"WattSwarm: Swarm Coordination Kernel for Agent Networks","sidebarTitle":"Introduction","href":"/introduction"},{"title":"WattSwarm Quickstart: Build and Run Your First Swarm Task","sidebarTitle":"Quickstart","href":"/quickstart"},{"title":"WattSwarm with Docker Compose: PostgreSQL to Kernel","sidebarTitle":"Docker","href":"/docker-quickstart"}]},{"group":"Core Concepts","pages":[{"title":"WattSwarm Architecture: Kernel, Nodes, and Executors","sidebarTitle":"Architecture","href":"/concepts/architecture"},{"title":"Task Lifecycle: From Submission to Finalized Decision","sidebarTitle":"Task Lifecycle","href":"/concepts/task-lifecycle"},{"title":"Nodes, Networks, and Orgs: WattSwarm P2P Topologies","sidebarTitle":"Nodes \u0026 Networks","href":"/concepts/nodes-and-networks"},{"title":"Knowledge Store: Decision Memory, Reuse, and Reputation","sidebarTitle":"Knowledge Store","href":"/concepts/knowledge-and-memory"}]},{"group":"Guides","pages":[{"title":"Run Your First WattSwarm Task End-to-End with the CLI","sidebarTitle":"First Task","href":"/guides/running-your-first-task"},{"title":"Orchestrate Multi-Agent Runs Using the WattSwarm Run Queue","sidebarTitle":"Multi-Agent Runs","href":"/guides/multi-agent-runs"},{"title":"Connect WattSwarm Nodes into a Shared P2P Network Grid","sidebarTitle":"Connecting Nodes","href":"/guides/connecting-nodes"},{"title":"Build a Custom Agent Runtime for WattSwarm Executors","sidebarTitle":"Build a Runtime","href":"/guides/building-a-runtime"},{"title":"Publish and Subscribe to Topic Message Feeds in WattSwarm","sidebarTitle":"Topic Messaging","description":"Use WattSwarm's p2p topic exchange to publish messages, subscribe nodes to feeds, and read paginated history across your agent network.","href":"/guides/topic-messaging"}]},{"group":"Configuration","pages":[{"title":"WattSwarm Environment Variables: Complete Reference","sidebarTitle":"Env Variables","href":"/configuration/environment-variables"},{"title":"WattSwarm startup_config.json: Fields and Examples","sidebarTitle":"Startup Config","description":"Learn how startup_config.json controls network mode, bootstrap contacts, gateway URLs, and the default executor runtime for a WattSwarm node.","href":"/configuration/startup-config"},{"title":"WattSwarm Network Modes: Local, LAN, and WAN Setup","sidebarTitle":"Network Modes","href":"/configuration/network-modes"}]},{"group":"Troubleshooting","pages":[{"title":"WattSwarm FAQ: Troubleshooting Common Operator Issues","sidebarTitle":"FAQ","href":"/troubleshooting/faq"},{"title":"WattSwarm Diagnostics: API, CLI, and Console Tools","sidebarTitle":"Diagnostics","href":"/troubleshooting/diagnostics"}]}]},{"tab":"API Reference","pages":[{"title":"API Reference","href":"/api/overview"}]}]},"basePath":"","title":"WattSwarm Environment Variables: Complete Reference - WattSwarm","deploymentId":"dpl_vSEmv961Ncyvz1psVwgUnTXQMSYk","buildId":"dpl_vSEmv961Ncyvz1psVwgUnTXQMSYk","dynamics":[],"chunks":[]}