Skip to content

Configuration reference ​

Wayfare is configured exclusively through environment variables, validated at start-up (src/server/config.ts). With Docker Compose they come from .env; on Firebase from the WAYFARE_ENV secret in Secret Manager (plus the generic apphosting.yaml). Invalid values stop the server with a readable error list.

Booleans accept true, false, 1, 0. An empty value means "use the default". Keys marked secret should never be committed.

Core ​

KeyDefaultDescription
WAYFARE_ENV–Optional dotenv bundle with any of the keys on this page (one KEY=value per line). Used on Firebase App Hosting, where the whole instance configuration lives in one Secret Manager secret. Real environment variables take precedence
WAYFARE_RUNTIMEselfhostselfhost (SQLite + local/S3) or firebase (Firestore + Firebase Storage)
WAYFARE_BASE_URLhttp://localhost:3000Public URL without trailing slash. Used for share links, QR codes, OAuth redirects and e-mail links. Must match what users type in the browser
WAYFARE_SECRET(required)Secret. At least 32 characters. Signs media URLs and cookies, encrypts stored Google tokens
WAYFARE_ADMIN_EMAILS(empty)Comma-separated e-mail addresses that become admin on sign-up and sign-in. Without any admin, the first user to sign up becomes admin
WAYFARE_DEMO_MODEfalseDemo mode for seeded demo data/screenshots. Never enable in production
WAYFARE_TRUSTED_PROXIES1Number of reverse proxies in front of Wayfare that append to X-Forwarded-For. Used to determine the client IP for rate limiting (the N-th entry from the right). 0 = ignore the header (direct exposure, no proxy). On Firebase App Hosting the bootstrap script measures the right value (/api/health?diag=forwarded) and stores it in WAYFARE_ENV
DATA_DIR./dataWhere SQLite (wayfare.db) and local blobs (blobs/) live. /data in the Docker image

Storage ​

KeyDefaultDescription
STORAGE_DRIVERlocal (selfhost) / firebase (firebase)local, s3 or firebase
S3_ENDPOINT(empty)S3-compatible endpoint, e.g. http://minio:9000 or the R2 URL. Empty = AWS
S3_REGIONautoRegion (auto for R2/MinIO, e.g. eu-central-1 for AWS)
S3_BUCKET(empty)Bucket name (required for s3)
S3_ACCESS_KEY_ID(empty)Access key (required for s3)
S3_SECRET_ACCESS_KEY(empty)Secret. Secret key (required for s3)
S3_FORCE_PATH_STYLEtruePath-style addressing; needed for MinIO, harmless for most others. Set false for AWS virtual-host style

Firebase ​

KeyDefaultDescription
FIREBASE_PROJECT_ID(derived)Firebase/Google Cloud project ID. Defaults to FIREBASE_CONFIG.projectId / GOOGLE_CLOUD_PROJECT (set automatically on App Hosting)
FIREBASE_STORAGE_BUCKET(derived)Storage bucket. Defaults to FIREBASE_CONFIG.storageBucket or <project>.firebasestorage.app
FIREBASE_SERVICE_ACCOUNT(empty)Secret. Service-account JSON (stringified). Omit to use Application Default Credentials (recommended on App Hosting)

Mail ​

KeyDefaultDescription
SMTP_URL(empty)Secret. e.g. smtps://user:pass@smtp.example.com:465. Empty = mails (incl. magic links) are written to the server log. Validated at startup: a malformed URL stops the app with a clear message (without printing the password)
MAIL_FROMWayfare <no-reply@localhost>Sender address and name

Login providers ​

A social provider is enabled when both ID and secret are set. See Authentication.

KeyDefaultDescription
AUTH_GOOGLE_ID(empty)Google OAuth client ID
AUTH_GOOGLE_SECRET(empty)Secret. Google OAuth client secret
AUTH_APPLE_ID(empty)Apple Services ID (e.g. com.example.wayfare.web)
AUTH_APPLE_SECRET(empty)Secret. Apple client secret — a signed JWT generated from your Apple key (expires after at most 6 months)
AUTH_APPLE_BUNDLE_ID(empty)Optional app bundle ID, only needed for native-app token sign-in
AUTH_FACEBOOK_ID(empty)Meta app ID
AUTH_FACEBOOK_SECRET(empty)Secret. Meta app secret
AUTH_DISCORD_ID(empty)Discord application client ID
AUTH_DISCORD_SECRET(empty)Secret. Discord client secret
AUTH_PASSKEYtrueAllow passkeys (WebAuthn). Requires HTTPS and a stable domain
AUTH_MAGIC_LINKtrueSign in via e-mail link. In production it is only offered when SMTP_URL is set (otherwise links would end up in the logs)
AUTH_EMAIL_PASSWORDfalseClassic e-mail + password sign-in. New accounts must confirm their e-mail address (needs SMTP_URL)

Photo sources (Google) ​

See Photo sources.

KeyDefaultDescription
GOOGLE_SOURCES_CLIENT_IDfalls back to AUTH_GOOGLE_IDOAuth client for Photos/Drive import
GOOGLE_SOURCES_CLIENT_SECRETfalls back to AUTH_GOOGLE_SECRETSecret. Matching client secret
GOOGLE_API_KEY(empty)Browser API key (restricted to your domain) for the Google Drive Picker
GOOGLE_APP_ID(empty)Google Cloud project number, required for the Drive Picker

Scheduled jobs ​

KeyDefaultDescription
CRON_SECRET(empty)Secret. Bearer token for POST /api/cron/digest, which sends the daily digest e-mails

Settings in the admin area ​

Some options are not environment variables but stored in the database and edited in /admin: instance name, onboarding mode (open, approval, invite), maximum upload size per photo (default 25 MB), maximum photos per album (default 500) and the imprint/privacy pages (Markdown).