source: Klonkt/.env.example@ 09ee2bd

main
Last change on this file since 09ee2bd was 09ee2bd, checked in by Robin Genis <roboburr@…>, 3 months ago

feat: auto-generate SESSION_SECRET if not set (zero-config Docker/manual)

If SESSION_SECRET is missing, generate a strong one on first boot and persist it
to <dataDir>/.session-secret (stable across restarts/updates). Env var still wins.
PUBLIC_BASE_URL already falls back to the request host. So Docker (B) and manual
(C) installs now run with no required .env editing. Docs + .env.example updated;
docker-compose comment translated to English.

Co-Authored-By: Claude <noreply@…>

  • Property mode set to 100644
File size: 2.6 KB
RevLine 
[7bc636b]1NODE_ENV=development
2PORT=3000
[09ee2bd]3# Secret used to sign login-session cookies. Leave EMPTY to auto-generate a strong
4# one on first start (saved to storage/.session-secret, stays stable across
5# restarts/updates). Or set your own: openssl rand -hex 32
6SESSION_SECRET=
[7bc636b]7DATABASE_PATH=./storage/database.sqlite
8MEDIA_PATH=./storage/media
[c80e78b]9
[09ee2bd]10# Canonical public URL of this site (scheme + host, no trailing slash), e.g.
11# https://yourdomain.com . Used to build correct links in emails (password reset)
12# and OAuth redirects instead of trusting request headers (anti-spoofing).
13# Optional: leave empty and it falls back to the request host (fine for local/dev);
14# set it for production so email/login links point at the right place.
15PUBLIC_BASE_URL=
[c80e78b]16
[bb42dfb]17# ── Administrator ───────────────────────────────────────────────────
18# The admin logs in with username + password. On first start you create your
19# admin account via /auth/register; after that, registration is closed.
20# Forgot your password? -> "Forgot password" (email, see SMTP below) or always:
21# `npm run reset-admin` on the server.
[9e27d64]22
[bb42dfb]23# ── Google login for LISTENERS (optional) ───────────────────────────
24# Want listeners to sign in with Google to comment? Create your OWN Google OAuth
25# client (Google Cloud Console -> Credentials -> OAuth client ID -> "Web
26# application") and fill it in below. Your own client = your own Google Cloud
27# project; this site isn't centrally tied to anything. Not set? Then there's
28# simply no Google button. Google login NEVER grants admin rights (commenting only).
29# GOOGLE_REDIRECT_URI = <your domain>/auth/google/callback (set it exactly in the client)
[9e27d64]30GOOGLE_CLIENT_ID=
31GOOGLE_CLIENT_SECRET=
32GOOGLE_REDIRECT_URI=https://example.com/auth/google/callback
33
[bb42dfb]34# ── Email (optional) — for "forgot password" reset links ────────────
35# Not set? Then reset only works via `npm run reset-admin` on the server.
[9e27d64]36SMTP_HOST=
37SMTP_PORT=587
38SMTP_USER=
39SMTP_PASS=
40SMTP_FROM=
[cb01666]41
[bb42dfb]42# ── Lite mode (optional) ────────────────────────────────────────────
43# Set to "off" to disable the whole audio feature (no built-in music hosting/
44# player, no ffmpeg needed). Klonkt then runs as a lightweight blog/photo/EPK
45# site, even on an environment without ffmpeg. Hub and Circles keep working.
46# External embeds (YouTube/SoundCloud/Spotify) keep working too.
[cb01666]47KLONKT_AUDIO=on
Note: See TracBrowser for help on using the repository browser.