Skip to content

Configuration ​

All configuration is environment variables, read from .env at the repository root (copy .env.example). Docker Compose passes them to the services; native runs read the same file.

Generate secrets with openssl rand -hex 32. In production a missing required secret stops the service instead of falling back to a development default.

Required ​

VariableUsed byMeaning
PUBLIC_ORIGINAPI, file serviceThe exact address people use, e.g. https://subspace.click. Passkeys, email links and storage URLs are bound to it.
JWT_SECRETall servicesSigns access and refresh tokens. Other keys derive from it unless set.
POSTGRES_USER, POSTGRES_PASSWORD, POSTGRES_DBdatabaseDatabase credentials.
MINIO_ROOT_USER, MINIO_ROOT_PASSWORDstorageObject storage credentials.
LIVEKIT_API_KEY, LIVEKIT_API_SECRETAPI, LiveKitVoice and video.

Web edge ​

VariableDefaultMeaning
WEB_PORT8080Port of the web edge (loopback-only in staging).
LIVEKIT_PUBLIC_URLsame originOnly if LiveKit signaling is served from a different address than /rtc.

Accounts and security ​

VariableDefaultMeaning
WEBAUTHN_ORIGINSPUBLIC_ORIGINComma-separated origins allowed to use passkeys and to appear in email links.
RP_IDorigin hostnamePasskey relying-party id. Set it to the bare domain to share passkeys across subdomains.
MEDIA_PROXY_SECRETfrom JWT_SECRETSigns link-preview image proxy URLs.

Email ​

VariableDefaultMeaning
SMTP_HOSTunsetTurns on email (and email verification).
SMTP_PORT587
SMTP_SECUREfalsetrue for implicit TLS (port 465).
SMTP_USER, SMTP_PASSunsetSMTP credentials.
SMTP_FROMSubspace Frequency <no-reply@subspace.click>Sender.
EMAIL_LINK_BASEorigin in useFix links in email to one address.

Cloud drives ​

VariableMeaning
GOOGLE_CLIENT_ID, GOOGLE_CLIENT_SECRETGoogle Drive import
ONEDRIVE_CLIENT_ID, ONEDRIVE_CLIENT_SECRETOneDrive import
DROPBOX_APP_KEY, DROPBOX_APP_SECRETDropbox import
DRIVE_REDIRECT_BASEFix OAuth redirects to one address (default: the origin in use).
DRIVE_TOKEN_KEYEncrypts stored drive tokens (default: from JWT_SECRET).

Mobile push ​

VariableDefaultMeaning
EXPO_ACCESS_TOKENunsetOnly with Expo "enhanced push security".
EXPO_PUSH_URLExpo's endpointOverride for testing.

Development only ​

Ignored in production.

VariableMeaning
VITE_BACKEND_HOSTWhere the Vite dev server proxies to (default 127.0.0.1).
UNFURL_ALLOW_PRIVATE_HOSTSHostnames link previews may fetch even though they resolve privately (the browser tests use localhost).
DRIVE_MOCK_ORIGINPoints every cloud drive at a local mock (tests).
SMTP_INSECUREtrue skips STARTTLS, for local SMTP sinks.
REGISTER_RATE_LIMITRaises the per-hour sign-up limit (tests).
DATABASE_URL, REDIS_URL, S3_ENDPOINT, S3_PUBLIC_ENDPOINTDerived by scripts/native/env.mjs for native runs.

A transmission from NWD.