# NODE_ENV isn't listed here: docker-compose.prod.yml hardcodes it to # "production" and the base compose leaves it unset (defaults to # production-like behavior) — this repo-root value would never be read. # See apps/api/.env.example for the dev value. # One of pino's levels: fatal/error/warn/info/debug/trace/silent. Empty # defaults to "debug" in dev / "info" otherwise (see logger.config.ts). # LOG_LEVEL= # Whether the app is still in beta # PUBLIC_IS_BETA=true # --- Database (required) --- POSTGRES_USER= POSTGRES_PASSWORD= POSTGRES_DB= # --- Auth secrets (required) --- # These three are NOT rotatable in place — see SECURITY.md "Rotating # secrets" before changing any of them on a running instance. # Generate with e.g. `openssl rand -hex 32`. # Rotating either one logs every session out at once (the cookie encryption # key is derived from both). Recoverable: users simply sign in again. JWT_ACCESS_SECRET= JWT_REFRESH_SECRET= # AES-256-GCM key encrypting TOTP secrets at rest — 32 raw bytes base64. # Generate with `openssl rand -base64 32`. # # DO NOT rotate this on an instance that already has MFA users: every stored # TOTP secret becomes undecryptable, and an account whose only second factor # is TOTP is locked out for good unless it still has recovery codes. See # SECURITY.md for the supported way through. MFA_ENCRYPTION_KEY= # --- Admin (optional) --- # Account matching this email gets the "admin" entitlement (unlocks /admin). ADMIN_EMAIL= # --- Backups (required) --- # age public key every automatic/manual backup dump is encrypted for before # it touches disk — never plaintext. Generate a keypair with # `age-keygen`: paste the "public key: age1..." line here, and store the # resulting private key somewhere that isn't this VPS (a password manager, # an offline copy) — it's the only way to decrypt a dump, and this instance # never holds it. Losing the private key means every backup taken with this # public key becomes permanently unrecoverable, so keep it safe before you # lose access to the VPS, not after. BACKUP_ENCRYPTION_PUBLIC_KEY= # --- Offsite backups (see docker/backup-offsite.sh, optional but strongly # recommended) --- # Read by backup-offsite.sh, not by the app itself — a VPS-host cron script # (not a Docker service) that ships encrypted dumps of every datastore # (loomkeep, unleash, glitchtip, umami, Quackback) to Cloudflare R2, so a # lost/destroyed VPS doesn't take every backup down with it. See # docker/README.md "Offsite backups" for the one-time setup (R2 bucket + # lifecycle rule, rclone remote, cron entry). R2_REMOTE=r2 R2_BUCKET= # --- Networking --- # Required. Port the API is exposed on / URL the browser calls it at. PUBLIC_API_URL=http://localhost:3000/api # Required — the API refuses to start without it (CORS). This is the # Docker-facing browser origin; local dev overrides it to Vite's :5173 in # apps/api/.env instead (first match wins, see ConfigModule's envFilePath). WEB_ORIGIN=http://localhost:8080 # --- Bot protection (Cloudflare Turnstile, optional) --- # Empty = no widget on the register form, the API's own check no-ops the # same way (no Cloudflare account configured). Create a Turnstile widget at # https://dash.cloudflare.com > Turnstile > Add widget (Managed challenge), # domain loomkeep.app (or your own) — gives a Site Key (public) and a # Secret Key (private, never expose it to the browser). PUBLIC_TURNSTILE_SITE_KEY= TURNSTILE_SECRET_KEY= # --- Feature flags (optional) --- # Social features (friends, comments, ratings, etc.). Default: false. SOCIAL_ENABLED=false # Gamification (XP, levels, achievements). Default: false. GAMIFICATION_ENABLED=false # New sign-ups. Close it once your account (and any family accounts) exist. # Default: true. REGISTRATION_ENABLED=true # --- Premium features (ee/, optional) --- # License key for the premium features, which are under LICENSE-EE rather than # the AGPL. Not needed while the premium offer isn't launched: until then they # are on for everyone. With a key, every account of this instance is premium. # Keys are annual; one keeps working 14 days past expiry. LOOMKEEP_LICENSE_KEY= # --- Catalogue providers --- # Required for movies/series. https://www.themoviedb.org/settings/api TMDB_API_TOKEN= # Optional, adds IMDb/Rotten Tomatoes/Metacritic scores. https://www.omdbapi.com/apikey.aspx OMDB_API_KEY= # Optional, required for games (IGDB via a Twitch app). https://dev.twitch.tv/console/apps TWITCH_CLIENT_ID= TWITCH_CLIENT_SECRET= # Optional, required for the Steam import. https://steamcommunity.com/dev/apikey STEAM_API_KEY= # Optional, required for the Simkl import. Unlike Trakt/Steam, Simkl has no # public-profile shortcut — every user goes through a real OAuth consent # flow, so THIS deployment's own domain must be registered with the app. # Create one at https://simkl.com/settings/developer/ with redirect URI # exactly "/app/settings/import/simkl/callback" (byte-for-byte, # e.g. https://loomkeep.app/app/settings/import/simkl/callback — every # self-hosted instance needs its own app, since the redirect URI is # domain-specific and Simkl checks it exactly). Only this one value is # needed here — docker-compose.yml also forwards it to the web service as # PUBLIC_SIMKL_CLIENT_ID (a client id is non-secret by OAuth design; the web # builds the authorize link itself rather than bouncing through the API). SIMKL_CLIENT_ID= SIMKL_CLIENT_SECRET= # Optional. Open Library's and MusicBrainz's usage policies both ask for an # identifying contact (email/URL), sent in the User-Agent of their API calls. API_CONTACT= # --- Email SMTP (optional) --- # Empty disables email (password reset, verification, alerts). # Brevo has a free relay (300/day): https://www.brevo.com SMTP_HOST= SMTP_PORT=587 SMTP_USER= SMTP_PASS= SMTP_FROM=Loomkeep # --- Push notifications (Web Push, optional) --- # Empty disables push (in-app notifications still work). Generate a pair # with `npx web-push generate-vapid-keys`. VAPID_PUBLIC_KEY= VAPID_PRIVATE_KEY= VAPID_SUBJECT=mailto:admin@example.com # --- Job monitoring (Healthchecks.io, optional) --- # Dead-man's-switch pings, one per scheduled job (src/jobs/job-keys.ts) — # Healthchecks.io alerts you if a job stops pinging on schedule, not just # when it throws. Empty = pinging disabled for that job. Free account: # https://healthchecks.io — create one check per line below, matching each # job's own schedule (see README "Job monitoring"), then paste its ping URL. HEALTHCHECKS_NOTIFICATIONS_SCAN_URL= HEALTHCHECKS_NOTIFICATIONS_DIGEST_URL= HEALTHCHECKS_MEDIA_REFRESH_STALE_URL= HEALTHCHECKS_GAMES_REFRESH_STALE_URL= HEALTHCHECKS_BOOKS_REFRESH_STALE_URL= HEALTHCHECKS_REPORTS_DIGEST_URL= HEALTHCHECKS_BACKUP_URL= HEALTHCHECKS_INACTIVE_ACCOUNTS_SCAN_URL= HEALTHCHECKS_GAMIFICATION_RECONCILE_URL= HEALTHCHECKS_GAMIFICATION_ACHIEVEMENTS_SWEEP_URL= HEALTHCHECKS_OFFSITE_BACKUP_URL= # --- Public hosting on a VPS (see README "Public hosting (VPS)") --- # Required only with the docker-compose.prod.yml override. Your real domain, # DNS already pointed at the VPS — derives PUBLIC_API_URL, WEB_ORIGIN and # Caddy's SITE_ADDRESS. DOMAIN= # Always run `docker compose` from the repo root — these paths are relative # to it, not to docker/. COMPOSE_PROJECT_NAME=loomkeep # Optional. Combine override files without repeating `-f` on every command — # Compose reads this automatically (colon-separated). Left commented out: # the quickstart in README "Self-hosting" runs the base file alone via # `-f docker/docker-compose.yml`, no COMPOSE_FILE needed. Uncomment and trim # to the overrides you actually want once you're running more than one (see # README "Combining add-ons") — this is every file that exists, as a menu: # COMPOSE_FILE=docker/docker-compose.yml:docker/docker-compose.prod.yml:docker/docker-compose.observability.yml:docker/docker-compose.portainer.yml:docker/docker-compose.glitchtip.yml:docker/docker-compose.quackback.yml:docker/docker-compose.authelia.yml:docker/docker-compose.tunnel.yml:docker/docker-compose.homepage.yml:docker/docker-compose.umami.yml:docker/docker-compose.unleash.yml # --- Cloudflare Tunnel (see docker/README.md, docker-compose.tunnel.yml) --- # Required only if using the tunnel override. Token for the Cloudflare Zero # Trust tunnel fronting the admin-only hostnames (Grafana/Portainer/ # GlitchTip/Unleash/Homepage) — Networks > Tunnels in the Cloudflare Zero # Trust dashboard. CLOUDFLARE_TUNNEL_TOKEN= # --- Single sign-on (see README, docker-compose.authelia.yml) --- # Required only if using the authelia override. Plaintext client secret for # Grafana's OIDC client — Authelia's own secrets live in # docker/authelia/*.yml instead (gitignored, copied from *.example). GRAFANA_OIDC_CLIENT_SECRET= # Optional overrides — leave all four unset to target Authelia (the default # above already assumes that). Set them instead to point Grafana's OIDC login # at a different identity provider, e.g. Cloudflare Access on the public # instance (see docker/README.md's "Cloudflare Tunnel + Access" section) — # values come straight from that provider's own OIDC application config. GRAFANA_OIDC_PROVIDER_NAME= GRAFANA_OIDC_CLIENT_ID= GRAFANA_OIDC_AUTH_URL= GRAFANA_OIDC_TOKEN_URL= GRAFANA_OIDC_API_URL= # --- Analytics (see README, docker-compose.umami.yml) --- # Required only with the umami override. Generate with `openssl rand -hex 32`. UMAMI_APP_SECRET= # Optional. Empty = every email CTA links straight to its destination, no # click tracking. Set once you've created the six Links in Umami (Links > # Create) with these exact slugs: secu-motdepasse, secu-connexion, # episode-notifs, bienvenue-app, newsletter-changelog, newsletter-notifs # (see mail.service.ts). Two emails can't go through a Link regardless of # this setting — "Voir" (new-episode) and "Se désinscrire" (newsletter) both # carry a per-recipient/per-notification value in their URL, and a Link is # always one fixed destination. UMAMI_LINKS_BASE_URL=https://stats.example.com/q PUBLIC_UMAMI_WEBSITE_ID= PUBLIC_UMAMI_SCRIPT_URL=https://stats.example.com/loomkeep.js # --- Landing page (see README, docker-compose.homepage.yml) --- # Optional. API keys for Homepage's live widgets — empty just means that # tile shows no data. # Portainer: user icon > My account > Access tokens. PORTAINER_API_KEY= PORTAINER_ENV_ID=1 # GlitchTip: user icon > Settings > Auth Tokens (needs project:read). GLITCHTIP_API_TOKEN= GLITCHTIP_ORG_SLUG= # Healthchecks.io: Project Settings > API Access > read-only API key. HEALTHCHECKS_API_KEY= # UptimeRobot: My Settings > API Keys > "Read-Only API Key" (not the # monitor-specific or main key — read-only can't modify anything). UPTIMEROBOT_API_KEY= # Codecov: Settings > Access > generate token. May not even be required for # a public repo's read-only totals (unconfirmed either way) — leave empty # and only set this if the Codecov tile shows an auth error. CODECOV_API_TOKEN= # Loomkeep's own user-count widget: a shared secret between the api service # and Homepage (not a per-service dashboard key like the others above) — # generate any long random string yourself, e.g. `openssl rand -hex 32`. # Empty = the endpoint stays unreachable (fails closed), not just widget-less. HOMEPAGE_STATS_API_KEY= # GitHub fine-grained PAT, scoped to just this repo, with "Dependabot # alerts: read-only" AND "Code scanning alerts: read-only" permissions — # both are gated even on a public repo (confirmed against GitHub's own # docs), and each tile needs its own permission despite sharing one Security # tab. Also reused on the commits/workflow-runs/PR-count/issue-count tiles # just for the higher authenticated rate limit (5000/h vs 60/h — that data # is public either way, being authenticated at all is what matters). # Create at github.com > Settings > Developer settings > Personal access # tokens > Fine-grained tokens. HOMEPAGE_GITHUB_TOKEN= # Brevo's REST API key (distinct from SMTP_USER/SMTP_PASS above, which are # SMTP relay credentials) — for the email-stats tile. Brevo dashboard > # Settings (gear icon) > SMTP & API > API Keys > Generate a new API key. BREVO_API_KEY= # Quackback's REST API key (feedback.loomkeep.app) — for the Feedback group's # tiles (Planned counts, open support conversations, changelog freshness) and # for complete release newsletters when an older webhook only sends a preview. # Generate at /admin/settings/developers?tab=keys on the Quackback instance. QUACKBACK_API_KEY= # --- Observability (see README, docker-compose.observability.yml) --- # Required only with the observability override. Grafana admin login. GRAFANA_ADMIN_USER=admin GRAFANA_ADMIN_PASSWORD= # Bearer token Prometheus presents when scraping the API's /api/metrics # (technical metrics only: Node runtime + HTTP latency). Generate any long # random string, e.g. `openssl rand -hex 32`. Empty = the endpoint fails # closed and the api scrape target stays down; the rest of the stack (node, # postgres, caddy exporters) is unaffected. # # Prometheus reads it from a file, not from the environment: write the same # value to docker/observability/metrics_token (gitignored, see # metrics_token.example) so the scrape config can point at it. METRICS_API_KEY= # --- Error tracking (see README, docker-compose.glitchtip.yml) --- # Required only with the glitchtip override. GLITCHTIP_SECRET_KEY= # Optional. SMTP URL for GlitchTip's own alert emails (own format, not # reused from SMTP_* above). Empty = logged to `docker compose logs # glitchtip` instead of sent. GLITCHTIP_EMAIL_URL= GLITCHTIP_FROM_EMAIL=glitchtip@loomkeep.app # Optional. DSNs from the two GlitchTip projects you create on its # dashboard (API: Node, web: JavaScript). Empty = that side never reports. GLITCHTIP_API_DSN= PUBLIC_GLITCHTIP_WEB_DSN= # --- Feature flags service (see README, docker-compose.unleash.yml) --- UNLEASH_ADMIN_USERNAME=admin # Required only with the unleash override. Admin login for the Unleash UI # (flags.your-domain.example) — default is admin/unleash4all, override it. UNLEASH_ADMIN_PASSWORD= # Backend API token the api uses to talk to Unleash over the internal Docker # network. Format is `:.<64-hex-chars>`, e.g. # `default:production.$(openssl rand -hex 32)`. UNLEASH_API_TOKEN= UNLEASH_API_URL= # Frontend token, safe to expose in the browser (same format as # UNLEASH_API_TOKEN, different token) — the web polls Unleash's Frontend API # directly to refresh MAINTENANCE_ flags live, see # apps/web/src/lib/feature-flags-live.ts. Requires the web's origin to be # allowed in Unleash's own Admin settings > Access control > CORS origins # (add your production domain AND http://localhost:5173 for local dev). PUBLIC_UNLEASH_FRONTEND_TOKEN= PUBLIC_UNLEASH_FRONTEND_URL= # --- User feedback board (see README, docker-compose.quackback.yml) --- # Required only with the quackback override. Quackback itself runs as its # own separate deployment (docker/quackback-bootstrap.sh) with its own # .env — this only tells Loomkeep's Caddy where to reach it. QUACKBACK_APP_PORT=3000 # Signs the SSO token for the feedback widget's "Verified identity only" # mode (apps/web/src/app.html + WidgetIdentify.svelte) — must be set to the # exact same value as the secret entered in Quackback's own dashboard # (Settings > Widget > Verified identity). QUACKBACK_WIDGET_SECRET= # Signing secret for Quackback's "Changelog Published" webhook # (POST /api/webhook/changelog-published, see NewsletterModule) — must match # the signing secret shown on that webhook's configuration screen in # Quackback's dashboard. Empty = the webhook guard rejects every delivery. QUACKBACK_CHANGELOG_WEBHOOK_SECRET=