Read as Markdown

Configuration

Every setting a self-hosted install reads.

.env beside docker-compose.yml — copied from .env.example — is the only place a self-hosted install is configured. The same names work as plain environment variables for a non-Docker deployment.

"Read by" below names which service reads the variable: api (the control plane, port 4100), lfs (the large-file service, port 4101), or web-build (the dashboard, baked in when its image is built). Variables marked compose are consumed by docker-compose.yml itself or by the infrastructure services it runs.

Secrets you must set

VariableDefaultRequired whenRead by
GOODFOLDER_DB_PASSWORD—Alwayscompose (Postgres, api, lfs)
GITEA_DB_PASSWORD—Alwayscompose (Gitea's own database)
GITEA_SECRET_KEY—Alwayscompose (Gitea)
GITEA_ADMIN_PASSWORD—Alwaysapi, lfs

Where this server lives

VariableDefaultRequired whenRead by
PUBLIC_URLhttps://api.trygoodfolder.comAlways (the address sign-in links are built from)api
WEB_URLhttps://trygoodfolder.comWhen the dashboard is not on trygoodfolder.comapi
GOODFOLDER_VERSIONlatestPinning a release tag such as 0.1.0compose
WEB_ORIGINSlocalhost always allowedDashboard served from a domainapi
WEB_PREVIEW_PROJECTS—Hosted preview deployments on *.pages.devapi

Ports

VariableDefaultRequired whenRead by
PORT4100Changing the control-plane portapi

Large files

VariableDefaultRequired whenRead by
LFS_INTERNAL_URLhttp://goodfolder-lfs:4101Always in Dockerapi
PUBLIC_LFS_ORIGINhttp://localhost:4101Alwayslfs
PRESIGN1Set empty to stream through the server insteadlfs
PRESIGN_PUBLIC_ENDPOINT—Presigning behind a private network name or a domainlfs

Object storage

VariableDefaultRequired whenRead by
S3_ENDPOINThttp://goodfolder-minio:9000Alwaysapi, lfs
S3_REGIONautoS3 providers that need a real regionapi, lfs
S3_ACCESS_KEY_ID—Always (MinIO reads it as its root credential)api, lfs, compose
S3_SECRET_ACCESS_KEY—Always (same)api, lfs, compose
S3_BUCKETgoodfolderAlwaysapi, lfs, compose

Gitea (internal transport, never exposed)

VariableDefaultRequired whenRead by
GITEA_INTERNAL_URLhttp://goodfolder-gitea:3000Always in Dockerapi, lfs
GITEA_ADMIN_USERgf-serviceAlwaysapi, lfs

The save check

Every save is held and checked against the leave-out rules before it is stored; see Self-hosting for what that costs.

VariableDefaultRequired whenRead by
GF_PUSH_GATEenforceobserve to only record what would be refused; off to skip the checkapi
GF_PUSH_MAX_BYTES2147483648 (2 GiB)Allowing larger single saves (the temporary disk must hold one per concurrent save)api

Sign-in email

VariableDefaultRequired whenRead by
RESEND_API_KEY—Sending sign-in email; empty writes links to the logapi
MAIL_FROMGoodFolder <[email protected]>With RESEND_API_KEYapi
MAIL_REPLY_TO[email protected]With RESEND_API_KEYapi
MAGIC_LINK_DEBUG—Local convenience only — never on a reachable hostapi

AI save labels

VariableDefaultRequired whenRead by
OPENROUTER_API_KEY—AI-written save labels; empty falls back to a summaryapi
LABEL_MODEL—Choosing the modelapi

Development routes

VariableDefaultRequired whenRead by
DEV_API_KEY—Reserved for /api/dev/* — no code reads it todaynone

Hosted billing

VariableDefaultRequired whenRead by
BILLING_MODEdisabledstripe on the hosted service onlyapi, lfs
BILLING_ENFORCEMENTobserveWith BILLING_MODE=stripeapi, lfs

WebMCP challenge access

VariableDefaultRequired whenRead by
CHALLENGE_ACCESS_CODE—A short hosted campaign; all three togetherapi, lfs
CHALLENGE_ACCESS_EXPIRES_AT—Sameapi, lfs
CHALLENGE_ACCESS_STAFF_EMAILS—Sameapi, lfs

Web client analytics

VariableDefaultRequired whenRead by
NEXT_PUBLIC_POSTHOG_KEY—Analytics on; empty means offweb-build
NEXT_PUBLIC_POSTHOG_HOSThttps://eu.i.posthog.comWith the keyweb-build

The dashboard's API address is also a build-time value: the NEXT_PUBLIC_API_URL build arg of apps/web/Dockerfile (default http://localhost:4100), not a server environment variable.

Stripe (only when BILLING_MODE=stripe)

VariableDefaultRequired whenRead by
STRIPE_API_KEY—BILLING_MODE=stripeapi, lfs
STRIPE_WEBHOOK_SECRET—Sameapi, lfs
STRIPE_METER_EVENT_NAME—Sameapi, lfs
STRIPE_CHECKOUT_SUCCESS_URLhttps://trygoodfolder.com/dashboard?billing=completeSameapi, lfs
STRIPE_PORTAL_RETURN_URLhttps://trygoodfolder.com/dashboardSameapi, lfs
STRIPE_PRICE_STARTER_MONTH—Sameapi, lfs
STRIPE_PRICE_STARTER_YEAR—Sameapi, lfs
STRIPE_OVERAGE_PRICE_STARTER—Sameapi, lfs
STRIPE_PRICE_PLUS_MONTH—Sameapi, lfs
STRIPE_PRICE_PLUS_YEAR—Sameapi, lfs
STRIPE_OVERAGE_PRICE_PLUS—Sameapi, lfs
STRIPE_PRICE_STUDIO_MONTH—Sameapi, lfs
STRIPE_PRICE_STUDIO_YEAR—Sameapi, lfs
STRIPE_OVERAGE_PRICE_STUDIO—Sameapi, lfs
STRIPE_API_BASEhttps://api.stripe.comStripe test modeapi, lfs