Docs / Self-hosting / Environment variables Environment variables Every environment variable the Synq services read, with purpose, whether it is required and its default.
This page lists the names the code reads (found in apps, workers, packages and plugins), never values. Rules that apply everywhere:
Secrets are files, not values. Anything that holds key material is read from a file whose path is in a *_KEY_FILE variable. Keep those files outside the repository and outside the data directories they protect, with owner-only permissions.
Compose passes unset variables as empty strings. The code treats an empty string as unset where noted.
Mainnet is locked. SYNQ_ALLOW_MAINNET_BROADCAST must stay false. The bot refuses to start when it is true.
Flags written 0/1 accept exactly those strings.
"Required" means the service fails to start (or the feature stays off) without it.
Warning
Some variables below belong to the archived Monad-era integrations (marked legacy). They are listed because the code still reads them; none is needed for the Arc features.
Network and safety#
Variable Purpose Required Default SYNQ_ALLOW_MAINNET_BROADCASTAllows mainnet transactions. Must be false; the bot and workflow worker enforce it Optional falseSYNQ_MAINNET_CANARY_MAX_USDCap in USD for a guarded mainnet canary spend; 0 disables Optional none (disabled) SYNQ_NETWORKActive chain profile (local/anvil, sandbox/monad-testnet, proof/monad-mainnet). CI uses local/anvil; the bot sets it itself Optional sandbox/monad-testnet for the read-model serverSYNQ_ARC_TESTNET_RPC_URLPreferred Arc testnet RPC; the registry's public list is the fallback Optional Registry list SYNQ_ARC_RPC_URLArc RPC for the workspace, Deal Room, invoice and business features Optional Registry list SYNQ_ARC_MAINNET_RPC_URLArc mainnet RPC (read-only profile) Optional Registry list SYNQ_SEPOLIA_RPC_URL, SYNQ_BASE_SEPOLIA_RPC_URL, SYNQ_ARB_SEPOLIA_RPC_URLRPC for the Circle CCTP testnet source routes Optional Registry list
Bot (apps/demo/src/telegram.ts)#
Variable Purpose Required Default TELEGRAM_BOT_TOKENTelegram bot token Required none SYNQ_TELEGRAM_DATABASE_URLPostgres connection string Optional The local compose database synq_telegram_e2e SYNQ_API_HOSTAPI listen address Optional 127.0.0.1 (container sets 0.0.0.0)SYNQ_API_PORTAPI listen port Optional 3200 (container sets 3292)SYNQ_SKIP_INFRA1 skips starting local Docker infrastructureOptional unset (starts infra) SYNQ_TESTNET_KEY_FILEFile holding the testnet operator key Required for on-chain features A file in the home .synq directory SYNQ_KERNEL_AUDIT_KEY_FILEKernel audit-log integrity key file (at least 32 bytes) Optional (generated locally) Generated under the local state directory SYNQ_JOURNAL_KEY_FILEExecution journal integrity key file Optional (generated locally) Generated under the local state directory SYNQ_WEB_BASE_URLPublic web origin used in links and cards Optional http://localhost:3000 for business linksSYNQ_ORIGINExact web origin allowed for cookie sessions and passkeys Required when workspaces are enabled Local relying-party origin otherwise SYNQ_RP_IDWebAuthn relying party id (the web host name) Optional here; required by the /v1 server Local relying-party id SYNQ_WORKSPACES_ENABLED1 turns on workspaces (the web hub and iOS app backend)Optional off SYNQ_LEGACY_MONAD_FUNDS1 enables legacy group fund writes (archived Monad flow)Optional (legacy) off SYNQ_ASSISTANT_TZTime zone the fund assistant uses Optional Asia/Kolkata
Workspaces, vaults and Arc business#
Variable Purpose Required Default SYNQ_WORKSPACE_OPERATOR_KEY_FILEKey file of the dedicated operator account that submits vault and payout transactions Required for vault activation and payouts none SYNQ_WORKSPACE_GRANT_KEY_FILEKey file (HMAC) for Kernel grants in workspaces Required for vault activation and payouts none SYNQ_WORKSPACE_DAILY_GAS_WEIDaily gas budget the sponsor may spend on vault creation, in wei Optional 1000000000000000000SYNQ_WORKSPACE_CREATION_GAS_WEIMaximum gas cost reserved for creating one vault, in wei Optional 200000000000000000SYNQ_SCREENING_PROVIDERSanctions screening mode; OFAC_SDN_LIST_ONLY selects the labelled list-only screen. Empty means unavailable, which fails closed Optional unset SYNQ_SCREENING_API_KEYCredential for an external screening provider Optional none SYNQ_ARC_BUSINESS0 turns off the Arc business features unless workspaces are enabledOptional on SYNQ_ARC_BUSINESS_NAMEDisplay name of the business Optional Synq demo businessSYNQ_ARC_OWNEROwner address of the business vault (checked against the vault's owners on chain) Optional First owner of the vault SYNQ_ARC_VENDORSContractors, as comma-separated Name:0xAddress:verifiedAtUnix entries. Payable only while the vault allowlists them Optional none (contractor payments stay off) SYNQ_ARC_FLOOR_USDCOperating cash floor in USDC the council keeps Optional Built-in default floor SYNQ_ARC_EXPLORER_TX_URLExplorer transaction URL prefix for links in events Optional The Arc testnet explorer SYNQ_DEALROOM_LINK_KEYHex key that signs Deal Room links; enables the Deal Room Optional none (off) SYNQ_PAY_LINK_KEYHex key that signs invoice pay links; enables invoice checkout Optional none (off) SYNQ_MEMO_WATCHER1 starts the invoice Memo payment watcher in the API serverOptional off SYNQ_GITHUB_TOKENToken for verifying GitHub evidence in Deal Room milestones Optional unauthenticated requests SYNQ_GOVERNANCE_LOG_KEYHex MAC key (at least 32 bytes) for the delegation log Required where the delegation log is used none SYNQ_AMANE_AGENT_KEY_FILEKey file of Synq's Amane agent; must differ from the operator key Optional none (Amane off) SYNQ_AMANE_ACCOUNT_CODEHASHPinned code hash of the Amane account release Optional none (Amane off)
/v1 API server (apps/api/src/v1-server.ts)#
Variable Purpose Required Default SYNQ_DATABASE_URLPostgres connection string Required none SYNQ_PROFILEChain profile (local/anvil relaxes the Kernel requirements below) Optional sandbox/monad-testnetSYNQ_RP_IDWebAuthn relying party id Required none SYNQ_ORIGINWeb origin Required none SYNQ_API_ADMIN_TOKENAdmin bearer token (at least 32 characters) Required none SYNQ_API_HOST, SYNQ_API_PORTListen address and port Optional 127.0.0.1, 3200SYNQ_DEPLOYMENTS_DIRDirectory of contract deployment records Optional contracts/deploymentsSYNQ_EXECUTION_MODULEAddress of the execution module Optional none SYNQ_SEND_MANDATE_IDTrusted mandate id for the Send route Optional synq_sendSYNQ_RATE_LIMIT_CAPACITYToken-bucket capacity per client Optional 30SYNQ_RATE_LIMIT_REFILL_PER_SECONDToken-bucket refill rate Optional 1SYNQ_TRUST_PROXYFastify trustProxy setting (for example loopback and private ranges) so client addresses come from the proxy Optional none SYNQ_RM_DATABASE_URLRead-model Postgres Required unless local/anvil none SYNQ_RM_REDIS_URLRead-model Redis Required unless local/anvil none SYNQ_KERNEL_AUDIT_KEY_FILEKernel audit key file Required unless local/anvil none SYNQ_KERNEL_PLUGINS_FILEKernel plugin manifest file Required unless local/anvil none LITHIC_WEBHOOK_SECRETSecret for verifying Lithic webhooks at /v1/webhooks/lithic Optional none (route answers 404) TEMPORAL_ADDRESS, TEMPORAL_NAMESPACETemporal connection for workflow routes Optional 127.0.0.1:7233, default
Read-model server (apps/api/src/server.ts, corepack pnpm dev)#
Variable Purpose Required Default SYNQ_PORTListen port Optional 3000SYNQ_RM_DATABASE_URLPostgres Required none SYNQ_RM_REDIS_URLRedis Required none SYNQ_RM_SCHEMAPostgres schema name Optional synq_read_modelSYNQ_RM_REORG_WINDOWBlocks kept for reorg handling Optional 200SYNQ_DEPLOYMENTS_DIRDeployment records Optional contracts/deployments
Arc indexer (apps/api/src/arc-indexer.ts)#
Variable Purpose Required Default SYNQ_INDEXER_DATABASE_URLPostgres (falls back to DATABASE_URL) Required none DATABASE_URLFallback Postgres connection string Optional none SYNQ_ARC_INDEXER_WALLETSComma-separated wallets to watch Optional none SYNQ_ARC_INDEXER_START_BLOCKFirst block when the stream has no cursor Optional Current head SYNQ_ARC_INDEXER_CONFIRMATIONSExtra depth below the finalized block Optional 0SYNQ_ARC_INDEXER_BATCHBlocks per batch Optional 2000SYNQ_ARC_INDEXER_POLL_MSIdle poll interval Optional 2000SYNQ_ARC_INDEXER_STREAMStream id Optional arc-testnet:mainSYNQ_ARC_INDEXER_RECONCILE_EVERYBatches between wallet reconciliations Optional 30
Chat channels#
Variable Purpose Required Default SYNQ_TELEGRAM_MODEoff, webhook or pollOptional webhook when a token and webhook secret are set, poll with only a token, otherwise offTELEGRAM_WEBHOOK_SECRETSecret header for the Telegram webhook Required in webhook mode none SYNQ_TELEGRAM_ALL_MESSAGES1 answers every group message, not only mentionsOptional 0SYNQ_TELEGRAM_LOGIN_REQUIRED1 requires linked web login for Telegram usersOptional 0SYNQ_TELEGRAM_REQUIRE_CHAT_ADMIN1 requires a chat admin to link a groupOptional 1SYNQ_CHAT_LINK_PENDING_TTL_SECONDSLifetime of a pending chat link (min 60) Optional 86400SYNQ_CHANNEL_CARDS1 sends rich cardsOptional 1SYNQ_CARD_BANNERS1 adds banner art to cardsOptional 1SYNQ_CARD_THEMECard theme id Optional asciiSYNQ_CARD_LINK_KEYKey (at least 32 characters) that signs links in cards Optional none SYNQ_CARD_LINK_TTL_SECONDSCard link lifetime (300 to 604800) Optional 43200SYNQ_CHANNEL_NOTIFY_MSNotification pump interval (min 1000) Optional 5000SYNQ_CHANNEL_MEMORY1 turns on consented chat memoryOptional 0SYNQ_CHANNEL_MEMORY_PURGE_MSMemory purge interval (min 10000) Optional 600000SYNQ_EXPLORER_TX_URLExplorer prefix for chat receipts Optional A legacy Monad testnet explorer URL LINQ_API_KEY, LINQ_WEBHOOK_SECRET, LINQ_BASE_URLLinq messaging provider; the webhook secret enables it Optional none SYNQ_IMESSAGE_TRANSPORToff, bluebubbles or beeperOptional offSYNQ_IMESSAGE_ALLOWED_CHATSComma-separated allowlist; required whenever iMessage is on Required if on none SYNQ_IMESSAGE_BOT_HANDLE, SYNQ_IMESSAGE_MENTION_WORDSBot handle and mention words Optional none, synq SYNQ_IMESSAGE_WEBHOOK_TOKENToken for iMessage webhooks Optional none SYNQ_IMESSAGE_POLL_MSPoll interval (min 1000) Optional 3000BLUEBUBBLES_URL, BLUEBUBBLES_PASSWORDBlueBubbles server address and credential Optional http://127.0.0.1:1234, noneBEEPER_DESKTOP_URL, BEEPER_ACCESS_TOKENBeeper Desktop address and credential Optional http://localhost:23373, noneSYNQ_WHATSAPP_TOKEN, SYNQ_WHATSAPP_PHONE_NUMBER_ID, SYNQ_WHATSAPP_APP_SECRET, SYNQ_WHATSAPP_VERIFY_TOKEN (at least 16 characters), SYNQ_WHATSAPP_ALLOWED_WA_IDSWhatsApp Cloud API 1:1 chats; all five are required together, otherwise the channel is blocked Optional none SYNQ_WHATSAPP_GRAPH_VERSION, SYNQ_WHATSAPP_GRAPH_BASE_URLGraph API version and base URL overrides Optional Library defaults
Web app (apps/web)#
Variable Purpose Required Default SYNQ_API_ORIGINAPI origin that /api/v1, /v2, /v3 proxy to. Read at build time for production builds Optional http://127.0.0.1:3200 (the image build sets the bot's internal address)SYNQ_IOS_APP_IDApplication id published in the Apple app-site-association file for universal links Optional The project's registered app id PORTWeb server port in the container Optional 3100NODE_ENV, NEXT_TELEMETRY_DISABLEDStandard Next.js settings Optional production in images
Push notifications (APNs)#
All four are needed for push to work; if any is missing the sender reports APNS_NOT_CONFIGURED.
Variable Purpose Required Default SYNQ_APNS_KEY_FILEPath to the Apple .p8 signing key Required for push none SYNQ_APNS_KEY_IDKey id Required for push none SYNQ_APNS_TEAM_IDApple developer team id Required for push none SYNQ_APNS_TOPICApp bundle id Required for push none
Workflow worker and commerce#
Variable Purpose Required Default TEMPORAL_ADDRESSTemporal server host:port Optional 127.0.0.1:7233TEMPORAL_NAMESPACENamespace Optional defaultTEMPORAL_CLITemporal CLI binary for workflow:dev Optional temporalSYNQ_TQ_ECONOMIC, SYNQ_TQ_APPROVAL, SYNQ_TQ_STRATEGY, SYNQ_TQ_OPERATIONSTask queue names Optional synq-economic, synq-approval, synq-strategy, synq-operationsSYNQ_WORKFLOW_DEPLOYMENTWorker deployment name Optional synq-workflowsSYNQ_WORKFLOW_BUILD_IDWorker build id Optional none SYNQ_WORKFLOW_MANIFESTPath to the deployment manifest the worker loads Required in containers Dev derives it SYNQ_WORKFLOW_FAMILIESWhich task-queue families this worker serves Optional All SYNQ_WORKFLOW_WORKER_IDWorker identity Optional local-workflow-workerSYNQ_WORKFLOW_HEALTH_HOST, SYNQ_WORKFLOW_HEALTH_PORTHealth endpoint (GET /health); off unless a port is set Optional 127.0.0.1; container sets port 3300SYNQ_WORKFLOW_LOG_LEVELLog level Optional WARNSYNQ_WORKFLOW_DATABASE_URL, SYNQ_WORKFLOW_DEV_DIRDev server database and scratch directory Optional Local defaults SYNQ_DCA_POLICY_FILEJSON map of DCA policies per strategy Optional none SYNQ_ECONOMIC_GRANT_KEYHex key for the economic (commerce) Kernel authority Required for commerce execution none SYNQ_ECONOMIC_MANDATES_FILEMandates installed at start Optional none SYNQ_PROFILE_VAULT_KEYKey that seals gift codes and purchase secrets Required for gift and purchase flows none SYNQ_BITREFILL_APPROVALSkernel-grant routes Bitrefill approvals through Kernel grantsOptional off SYNQ_LITHIC_SIM_MERCHANTSimulated merchant for Lithic sandbox authorizations Optional none CROSSMINT_API_KEY, CROSSMINT_ENV, CROSSMINT_PAYMENT_CHAIN, CROSSMINT_PAYMENT_RECIPIENTSCrossmint staging purchases. CROSSMINT_ENV must be staging; recipients must be pinned Optional env staging LITHIC_API_KEY, LITHIC_ENVLithic virtual cards. LITHIC_ENV must be sandbox Optional sandboxBITREFILL_API_KEY or BITREFILL_API_ID with BITREFILL_API_SECRETBitrefill credentials Optional none RELOADLY_CLIENT_ID, RELOADLY_CLIENT_SECRET, RELOADLY_ENVReloadly gift cards; RELOADLY_ENV must be sandbox Optional sandboxSEARCHAPI_KEY, SERPAPI_KEYRead-only product search Optional none EBAY_CLIENT_ID, EBAY_CLIENT_SECRET, EBAY_ENVeBay search Optional SANDBOX unless EBAY_ENV=productionDUFFEL_TEST_TOKENDuffel test-mode token (duffel_test_...); live keys are refused Optional none SYNQ_X402_ARC_SELLER_URLArc x402 seller endpoint for paid data Optional none
Models and identity#
Variable Purpose Required Default OPENAI_API_KEY, OPENAI_BASE_URL, OPENAI_MODELOpenAI Chat Completions as the Brain reasoner Optional Plugin defaults QWEN_API_KEY (or DASHSCOPE_API_KEY), QWEN_BASE_URLQwen reasoner Optional Plugin defaults KIMI_API_KEY (or MOONSHOT_API_KEY), KIMI_BASE_URLKimi reasoner Optional https://api.moonshot.ai/v1 base URLMASTRA_TELEMETRY_DISABLEDDisables Mastra telemetry Optional unset DYNAMIC_API_KEY, DYNAMIC_ENVIRONMENT_IDDynamic wallet identity provider (DYNAMIC_ENVIRONMENT_ID must be a UUID) Optional none
Variable Purpose Required Default SYNQ_PERPL_API_KEY_FILE, SYNQ_PERPL_READ_KEY_FILE, SYNQ_PERPL_TRADE_KEY_FILEPerpl executor key files by scope (legacy) Optional none SYNQ_API_URLSynq API URL for the MetaMask plugin Optional http://127.0.0.1:3200SYNQ_MM_GROUPS, SYNQ_MM_JOURNAL_DIR, SYNQ_MM_SESSION_DIR, SYNQ_MM_MAX_CONTRIBUTION, SYNQ_MM_RPC_URLMetaMask Agent Wallet plugin settings (legacy Monad testnet) Optional Home-directory defaults SYNQ_DEMO_AMOUNT, SYNQ_KEEP_LOCAL_CHAIN, SYNQ_DEMO_DATABASE_URL, SYNQ_SEND_EVIDENCE_DIR, SYNQ_SEND_EXECUTION_MODE, SYNQ_P08_E2E_DATABASE_URL, SYNQ_E2E_TESTNET_DATABASE_URLDemo drivers (corepack pnpm demo, send demo, testnet e2e) Optional Local defaults
Container stack variables#
Used by infra/compose.aws.yaml and infra/compose.prod.yaml (the compose files themselves, not the services).
Variable Purpose Required Default POSTGRES_PASSWORDDatabase password for the stack Required none SYNQ_DOMAIN, SYNQ_ACME_EMAILPublic domain and the ACME contact for Caddy Required (aws stack) none SYNQ_SECRETS_DIRHost directory mounted read-only at /run/secrets/synq (prod stack) Optional ./secretsSYNQ_API_PUBLISH_PORT, SYNQ_WEB_PUBLISH_PORTLoopback ports the prod stack publishes Optional 3200, 3100
These are read by test suites and scripts, not by the services. They are listed so a clean machine can run everything.
Variable Purpose Default SYNQ_TEST_PG_BASEBase Postgres URL for integration suites; each suite adds its database name The compose Postgres on 127.0.0.1:55432 SYNQ_WORKSPACES_TEST_DATABASE_URL, SYNQ_DURABLE_TEST_DATABASE_URL, SYNQ_CROSS_TEST_DATABASE_URL, SYNQ_P11_TEST_DATABASE_URL, SYNQ_RISK_TEST_DATABASE_URL, SYNQ_HEDGE_TEST_DATABASE_URL, SYNQ_CHANNELS_DATABASE_URL, SYNQ_EXECUTION_DATABASE_URL, SYNQ_WORKSPACES_MIGRATION_DATABASE_URL and similarPer-suite database overrides SYNQ_TEST_PG_BASE plus a suite database nameSYNQ_RM_TEST_REDIS_URL, SYNQ_P06_TEST_REDIS_URLRedis for read-model and world-model tests Compose Redis on 127.0.0.1:56379 SYNQ_ANVIL_BINAnvil binary path anvil on the pathSYNQ_RM_FORK_TESTS1 enables the Envio fork tests (test:indexer)off SYNQ_LIVE_P08, SYNQ_LIVE_P09, SYNQ_P10_LIVE, SYNQ_ARC_LIVE_READSOpt-in switches for live-network tests off SYNQ_EVIDENCE_DIR, SYNQ_FUNDING_EVIDENCE_DIR, SYNQ_KEY_DIRWhere scripts write evidence and keep local keys Local directories
Edit this page on GitHub