Get started

Environment variables

One .env at the repo root. Here's what each variable does and what changes in production.

Every workspace reads the same .env at the repo root. .env.example has working values for local development, except the secrets.

Set these first

VariableWhat it's for
BETTER_AUTH_SECRETSigns sessions. Any long random string
GOOGLE_CLIENT_ID, GOOGLE_CLIENT_SECRETGoogle sign-in. Leave blank to use email only

For Google, add http://localhost:3003 as an authorized JavaScript origin and http://localhost:3000/api/auth/callback/google as the redirect URI.

Backend

VariableLocal valueIn production
DATABASE_URLDocker PostgresYour RDS URL
BETTER_AUTH_URLhttp://localhost:3000The backend's public URL
TRUSTED_ORIGINSThe app and desktop originsYour app's origins
PORT3000Whatever the host expects

Storage

VariableWhat it's for
S3_BUCKET, S3_AVATAR_BUCKET, S3_BLOG_MEDIA_BUCKET, S3_LOG_BUCKETBucket names
AWS_REGION, AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEYCredentials. Local values are RustFS's
S3_ENDPOINT, S3_PUBLIC_ENDPOINT, S3_FORCE_PATH_STYLEPoint at RustFS locally. Unset in production

S3_ENDPOINT is how the backend reaches storage inside Docker. S3_PUBLIC_ENDPOINT is how your browser reaches it, and is used to sign upload and download URLs.

Email

VariableWhat it's for
EMAIL_FROMThe sender. Needs a verified SES identity in production
EMAIL_SMTP_HOST, EMAIL_SMTP_PORTSend through Mailpit locally. Unset in production to use SES

Chatbot

VariableWhat it's for
CHAT_PROVIDERollama locally, bedrock in production
OLLAMA_BASE_URL, OLLAMA_MODELThe local model
BEDROCK_MODEL_IDThe Claude model on Bedrock

Logs

VariableWhat it's for
LOG_DIRWhere log files are written
LOG_ARCHIVE_CRONWhen closed log files upload to S3_LOG_BUCKET

Frontends

VariableWhat it's for
VITE_BACKEND_URLWhere the web app sends requests. Its own origin locally, so the Vite proxy handles them
VITE_DESKTOP_BACKEND_URLThe backend, reached directly by the desktop app
VITE_BLOG_URL, NEXT_PUBLIC_BLOG_URLWhere the blog lives, for links to it

The blog and docs have their own .env.example for their public URLs.