Synq
Skip to content
[ synq / docs ]Synq home

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.

Network and safety#

VariablePurposeRequiredDefault
SYNQ_ALLOW_MAINNET_BROADCASTAllows mainnet transactions. Must be false; the bot and workflow worker enforce itOptionalfalse
SYNQ_MAINNET_CANARY_MAX_USDCap in USD for a guarded mainnet canary spend; 0 disablesOptionalnone (disabled)
SYNQ_NETWORKActive chain profile (local/anvil, sandbox/monad-testnet, proof/monad-mainnet). CI uses local/anvil; the bot sets it itselfOptionalsandbox/monad-testnet for the read-model server
SYNQ_ARC_TESTNET_RPC_URLPreferred Arc testnet RPC; the registry's public list is the fallbackOptionalRegistry list
SYNQ_ARC_RPC_URLArc RPC for the workspace, Deal Room, invoice and business featuresOptionalRegistry list
SYNQ_ARC_MAINNET_RPC_URLArc mainnet RPC (read-only profile)OptionalRegistry list
SYNQ_SEPOLIA_RPC_URL, SYNQ_BASE_SEPOLIA_RPC_URL, SYNQ_ARB_SEPOLIA_RPC_URLRPC for the Circle CCTP testnet source routesOptionalRegistry list

Bot (apps/demo/src/telegram.ts)#

VariablePurposeRequiredDefault
TELEGRAM_BOT_TOKENTelegram bot tokenRequirednone
SYNQ_TELEGRAM_DATABASE_URLPostgres connection stringOptionalThe local compose database synq_telegram_e2e
SYNQ_API_HOSTAPI listen addressOptional127.0.0.1 (container sets 0.0.0.0)
SYNQ_API_PORTAPI listen portOptional3200 (container sets 3292)
SYNQ_SKIP_INFRA1 skips starting local Docker infrastructureOptionalunset (starts infra)
SYNQ_TESTNET_KEY_FILEFile holding the testnet operator keyRequired for on-chain featuresA 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 fileOptional (generated locally)Generated under the local state directory
SYNQ_WEB_BASE_URLPublic web origin used in links and cardsOptionalhttp://localhost:3000 for business links
SYNQ_ORIGINExact web origin allowed for cookie sessions and passkeysRequired when workspaces are enabledLocal relying-party origin otherwise
SYNQ_RP_IDWebAuthn relying party id (the web host name)Optional here; required by the /v1 serverLocal relying-party id
SYNQ_WORKSPACES_ENABLED1 turns on workspaces (the web hub and iOS app backend)Optionaloff
SYNQ_LEGACY_MONAD_FUNDS1 enables legacy group fund writes (archived Monad flow)Optional (legacy)off
SYNQ_ASSISTANT_TZTime zone the fund assistant usesOptionalAsia/Kolkata

Workspaces, vaults and Arc business#

VariablePurposeRequiredDefault
SYNQ_WORKSPACE_OPERATOR_KEY_FILEKey file of the dedicated operator account that submits vault and payout transactionsRequired for vault activation and payoutsnone
SYNQ_WORKSPACE_GRANT_KEY_FILEKey file (HMAC) for Kernel grants in workspacesRequired for vault activation and payoutsnone
SYNQ_WORKSPACE_DAILY_GAS_WEIDaily gas budget the sponsor may spend on vault creation, in weiOptional1000000000000000000
SYNQ_WORKSPACE_CREATION_GAS_WEIMaximum gas cost reserved for creating one vault, in weiOptional200000000000000000
SYNQ_SCREENING_PROVIDERSanctions screening mode; OFAC_SDN_LIST_ONLY selects the labelled list-only screen. Empty means unavailable, which fails closedOptionalunset
SYNQ_SCREENING_API_KEYCredential for an external screening providerOptionalnone
SYNQ_ARC_BUSINESS0 turns off the Arc business features unless workspaces are enabledOptionalon
SYNQ_ARC_BUSINESS_NAMEDisplay name of the businessOptionalSynq demo business
SYNQ_ARC_OWNEROwner address of the business vault (checked against the vault's owners on chain)OptionalFirst owner of the vault
SYNQ_ARC_VENDORSContractors, as comma-separated Name:0xAddress:verifiedAtUnix entries. Payable only while the vault allowlists themOptionalnone (contractor payments stay off)
SYNQ_ARC_FLOOR_USDCOperating cash floor in USDC the council keepsOptionalBuilt-in default floor
SYNQ_ARC_EXPLORER_TX_URLExplorer transaction URL prefix for links in eventsOptionalThe Arc testnet explorer
SYNQ_DEALROOM_LINK_KEYHex key that signs Deal Room links; enables the Deal RoomOptionalnone (off)
SYNQ_PAY_LINK_KEYHex key that signs invoice pay links; enables invoice checkoutOptionalnone (off)
SYNQ_MEMO_WATCHER1 starts the invoice Memo payment watcher in the API serverOptionaloff
SYNQ_GITHUB_TOKENToken for verifying GitHub evidence in Deal Room milestonesOptionalunauthenticated requests
SYNQ_GOVERNANCE_LOG_KEYHex MAC key (at least 32 bytes) for the delegation logRequired where the delegation log is usednone
SYNQ_AMANE_AGENT_KEY_FILEKey file of Synq's Amane agent; must differ from the operator keyOptionalnone (Amane off)
SYNQ_AMANE_ACCOUNT_CODEHASHPinned code hash of the Amane account releaseOptionalnone (Amane off)

/v1 API server (apps/api/src/v1-server.ts)#

VariablePurposeRequiredDefault
SYNQ_DATABASE_URLPostgres connection stringRequirednone
SYNQ_PROFILEChain profile (local/anvil relaxes the Kernel requirements below)Optionalsandbox/monad-testnet
SYNQ_RP_IDWebAuthn relying party idRequirednone
SYNQ_ORIGINWeb originRequirednone
SYNQ_API_ADMIN_TOKENAdmin bearer token (at least 32 characters)Requirednone
SYNQ_API_HOST, SYNQ_API_PORTListen address and portOptional127.0.0.1, 3200
SYNQ_DEPLOYMENTS_DIRDirectory of contract deployment recordsOptionalcontracts/deployments
SYNQ_EXECUTION_MODULEAddress of the execution moduleOptionalnone
SYNQ_SEND_MANDATE_IDTrusted mandate id for the Send routeOptionalsynq_send
SYNQ_RATE_LIMIT_CAPACITYToken-bucket capacity per clientOptional30
SYNQ_RATE_LIMIT_REFILL_PER_SECONDToken-bucket refill rateOptional1
SYNQ_TRUST_PROXYFastify trustProxy setting (for example loopback and private ranges) so client addresses come from the proxyOptionalnone
SYNQ_RM_DATABASE_URLRead-model PostgresRequired unless local/anvilnone
SYNQ_RM_REDIS_URLRead-model RedisRequired unless local/anvilnone
SYNQ_KERNEL_AUDIT_KEY_FILEKernel audit key fileRequired unless local/anvilnone
SYNQ_KERNEL_PLUGINS_FILEKernel plugin manifest fileRequired unless local/anvilnone
LITHIC_WEBHOOK_SECRETSecret for verifying Lithic webhooks at /v1/webhooks/lithicOptionalnone (route answers 404)
TEMPORAL_ADDRESS, TEMPORAL_NAMESPACETemporal connection for workflow routesOptional127.0.0.1:7233, default

Read-model server (apps/api/src/server.ts, corepack pnpm dev)#

VariablePurposeRequiredDefault
SYNQ_PORTListen portOptional3000
SYNQ_RM_DATABASE_URLPostgresRequirednone
SYNQ_RM_REDIS_URLRedisRequirednone
SYNQ_RM_SCHEMAPostgres schema nameOptionalsynq_read_model
SYNQ_RM_REORG_WINDOWBlocks kept for reorg handlingOptional200
SYNQ_DEPLOYMENTS_DIRDeployment recordsOptionalcontracts/deployments

Arc indexer (apps/api/src/arc-indexer.ts)#

VariablePurposeRequiredDefault
SYNQ_INDEXER_DATABASE_URLPostgres (falls back to DATABASE_URL)Requirednone
DATABASE_URLFallback Postgres connection stringOptionalnone
SYNQ_ARC_INDEXER_WALLETSComma-separated wallets to watchOptionalnone
SYNQ_ARC_INDEXER_START_BLOCKFirst block when the stream has no cursorOptionalCurrent head
SYNQ_ARC_INDEXER_CONFIRMATIONSExtra depth below the finalized blockOptional0
SYNQ_ARC_INDEXER_BATCHBlocks per batchOptional2000
SYNQ_ARC_INDEXER_POLL_MSIdle poll intervalOptional2000
SYNQ_ARC_INDEXER_STREAMStream idOptionalarc-testnet:main
SYNQ_ARC_INDEXER_RECONCILE_EVERYBatches between wallet reconciliationsOptional30

Chat channels#

VariablePurposeRequiredDefault
SYNQ_TELEGRAM_MODEoff, webhook or pollOptionalwebhook when a token and webhook secret are set, poll with only a token, otherwise off
TELEGRAM_WEBHOOK_SECRETSecret header for the Telegram webhookRequired in webhook modenone
SYNQ_TELEGRAM_ALL_MESSAGES1 answers every group message, not only mentionsOptional0
SYNQ_TELEGRAM_LOGIN_REQUIRED1 requires linked web login for Telegram usersOptional0
SYNQ_TELEGRAM_REQUIRE_CHAT_ADMIN1 requires a chat admin to link a groupOptional1
SYNQ_CHAT_LINK_PENDING_TTL_SECONDSLifetime of a pending chat link (min 60)Optional86400
SYNQ_CHANNEL_CARDS1 sends rich cardsOptional1
SYNQ_CARD_BANNERS1 adds banner art to cardsOptional1
SYNQ_CARD_THEMECard theme idOptionalascii
SYNQ_CARD_LINK_KEYKey (at least 32 characters) that signs links in cardsOptionalnone
SYNQ_CARD_LINK_TTL_SECONDSCard link lifetime (300 to 604800)Optional43200
SYNQ_CHANNEL_NOTIFY_MSNotification pump interval (min 1000)Optional5000
SYNQ_CHANNEL_MEMORY1 turns on consented chat memoryOptional0
SYNQ_CHANNEL_MEMORY_PURGE_MSMemory purge interval (min 10000)Optional600000
SYNQ_EXPLORER_TX_URLExplorer prefix for chat receiptsOptionalA legacy Monad testnet explorer URL
LINQ_API_KEY, LINQ_WEBHOOK_SECRET, LINQ_BASE_URLLinq messaging provider; the webhook secret enables itOptionalnone
SYNQ_IMESSAGE_TRANSPORToff, bluebubbles or beeperOptionaloff
SYNQ_IMESSAGE_ALLOWED_CHATSComma-separated allowlist; required whenever iMessage is onRequired if onnone
SYNQ_IMESSAGE_BOT_HANDLE, SYNQ_IMESSAGE_MENTION_WORDSBot handle and mention wordsOptionalnone, synq
SYNQ_IMESSAGE_WEBHOOK_TOKENToken for iMessage webhooksOptionalnone
SYNQ_IMESSAGE_POLL_MSPoll interval (min 1000)Optional3000
BLUEBUBBLES_URL, BLUEBUBBLES_PASSWORDBlueBubbles server address and credentialOptionalhttp://127.0.0.1:1234, none
BEEPER_DESKTOP_URL, BEEPER_ACCESS_TOKENBeeper Desktop address and credentialOptionalhttp://localhost:23373, none
SYNQ_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 blockedOptionalnone
SYNQ_WHATSAPP_GRAPH_VERSION, SYNQ_WHATSAPP_GRAPH_BASE_URLGraph API version and base URL overridesOptionalLibrary defaults

Web app (apps/web)#

VariablePurposeRequiredDefault
SYNQ_API_ORIGINAPI origin that /api/v1, /v2, /v3 proxy to. Read at build time for production buildsOptionalhttp://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 linksOptionalThe project's registered app id
PORTWeb server port in the containerOptional3100
NODE_ENV, NEXT_TELEMETRY_DISABLEDStandard Next.js settingsOptionalproduction in images

Push notifications (APNs)#

All four are needed for push to work; if any is missing the sender reports APNS_NOT_CONFIGURED.

VariablePurposeRequiredDefault
SYNQ_APNS_KEY_FILEPath to the Apple .p8 signing keyRequired for pushnone
SYNQ_APNS_KEY_IDKey idRequired for pushnone
SYNQ_APNS_TEAM_IDApple developer team idRequired for pushnone
SYNQ_APNS_TOPICApp bundle idRequired for pushnone

Workflow worker and commerce#

VariablePurposeRequiredDefault
TEMPORAL_ADDRESSTemporal server host:portOptional127.0.0.1:7233
TEMPORAL_NAMESPACENamespaceOptionaldefault
TEMPORAL_CLITemporal CLI binary for workflow:devOptionaltemporal
SYNQ_TQ_ECONOMIC, SYNQ_TQ_APPROVAL, SYNQ_TQ_STRATEGY, SYNQ_TQ_OPERATIONSTask queue namesOptionalsynq-economic, synq-approval, synq-strategy, synq-operations
SYNQ_WORKFLOW_DEPLOYMENTWorker deployment nameOptionalsynq-workflows
SYNQ_WORKFLOW_BUILD_IDWorker build idOptionalnone
SYNQ_WORKFLOW_MANIFESTPath to the deployment manifest the worker loadsRequired in containersDev derives it
SYNQ_WORKFLOW_FAMILIESWhich task-queue families this worker servesOptionalAll
SYNQ_WORKFLOW_WORKER_IDWorker identityOptionallocal-workflow-worker
SYNQ_WORKFLOW_HEALTH_HOST, SYNQ_WORKFLOW_HEALTH_PORTHealth endpoint (GET /health); off unless a port is setOptional127.0.0.1; container sets port 3300
SYNQ_WORKFLOW_LOG_LEVELLog levelOptionalWARN
SYNQ_WORKFLOW_DATABASE_URL, SYNQ_WORKFLOW_DEV_DIRDev server database and scratch directoryOptionalLocal defaults
SYNQ_DCA_POLICY_FILEJSON map of DCA policies per strategyOptionalnone
SYNQ_ECONOMIC_GRANT_KEYHex key for the economic (commerce) Kernel authorityRequired for commerce executionnone
SYNQ_ECONOMIC_MANDATES_FILEMandates installed at startOptionalnone
SYNQ_PROFILE_VAULT_KEYKey that seals gift codes and purchase secretsRequired for gift and purchase flowsnone
SYNQ_BITREFILL_APPROVALSkernel-grant routes Bitrefill approvals through Kernel grantsOptionaloff
SYNQ_LITHIC_SIM_MERCHANTSimulated merchant for Lithic sandbox authorizationsOptionalnone
CROSSMINT_API_KEY, CROSSMINT_ENV, CROSSMINT_PAYMENT_CHAIN, CROSSMINT_PAYMENT_RECIPIENTSCrossmint staging purchases. CROSSMINT_ENV must be staging; recipients must be pinnedOptionalenv staging
LITHIC_API_KEY, LITHIC_ENVLithic virtual cards. LITHIC_ENV must be sandboxOptionalsandbox
BITREFILL_API_KEY or BITREFILL_API_ID with BITREFILL_API_SECRETBitrefill credentialsOptionalnone
RELOADLY_CLIENT_ID, RELOADLY_CLIENT_SECRET, RELOADLY_ENVReloadly gift cards; RELOADLY_ENV must be sandboxOptionalsandbox
SEARCHAPI_KEY, SERPAPI_KEYRead-only product searchOptionalnone
EBAY_CLIENT_ID, EBAY_CLIENT_SECRET, EBAY_ENVeBay searchOptionalSANDBOX unless EBAY_ENV=production
DUFFEL_TEST_TOKENDuffel test-mode token (duffel_test_...); live keys are refusedOptionalnone
SYNQ_X402_ARC_SELLER_URLArc x402 seller endpoint for paid dataOptionalnone

Models and identity#

VariablePurposeRequiredDefault
OPENAI_API_KEY, OPENAI_BASE_URL, OPENAI_MODELOpenAI Chat Completions as the Brain reasonerOptionalPlugin defaults
QWEN_API_KEY (or DASHSCOPE_API_KEY), QWEN_BASE_URLQwen reasonerOptionalPlugin defaults
KIMI_API_KEY (or MOONSHOT_API_KEY), KIMI_BASE_URLKimi reasonerOptionalhttps://api.moonshot.ai/v1 base URL
MASTRA_TELEMETRY_DISABLEDDisables Mastra telemetryOptionalunset
DYNAMIC_API_KEY, DYNAMIC_ENVIRONMENT_IDDynamic wallet identity provider (DYNAMIC_ENVIRONMENT_ID must be a UUID)Optionalnone

Legacy and companion tools#

VariablePurposeRequiredDefault
SYNQ_PERPL_API_KEY_FILE, SYNQ_PERPL_READ_KEY_FILE, SYNQ_PERPL_TRADE_KEY_FILEPerpl executor key files by scope (legacy)Optionalnone
SYNQ_API_URLSynq API URL for the MetaMask pluginOptionalhttp://127.0.0.1:3200
SYNQ_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)OptionalHome-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)OptionalLocal defaults

Container stack variables#

Used by infra/compose.aws.yaml and infra/compose.prod.yaml (the compose files themselves, not the services).

VariablePurposeRequiredDefault
POSTGRES_PASSWORDDatabase password for the stackRequirednone
SYNQ_DOMAIN, SYNQ_ACME_EMAILPublic domain and the ACME contact for CaddyRequired (aws stack)none
SYNQ_SECRETS_DIRHost directory mounted read-only at /run/secrets/synq (prod stack)Optional./secrets
SYNQ_API_PUBLISH_PORT, SYNQ_WEB_PUBLISH_PORTLoopback ports the prod stack publishesOptional3200, 3100

Tests and tooling#

These are read by test suites and scripts, not by the services. They are listed so a clean machine can run everything.

VariablePurposeDefault
SYNQ_TEST_PG_BASEBase Postgres URL for integration suites; each suite adds its database nameThe 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 overridesSYNQ_TEST_PG_BASE plus a suite database name
SYNQ_RM_TEST_REDIS_URL, SYNQ_P06_TEST_REDIS_URLRedis for read-model and world-model testsCompose Redis on 127.0.0.1:56379
SYNQ_ANVIL_BINAnvil binary pathanvil on the path
SYNQ_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 testsoff
SYNQ_EVIDENCE_DIR, SYNQ_FUNDING_EVIDENCE_DIR, SYNQ_KEY_DIRWhere scripts write evidence and keep local keysLocal directories

Edit this page on GitHub