source: Klonkt/.env.example@ f574435

main
Last change on this file since f574435 was f574435, checked in by Robin <roboburr@…>, 7 weeks ago

Docs: README + .env.example for paid posts and auto-generated keys

Tell users how the paid-posts key works: no env editing needed, it's
generated on first use like SESSION_SECRET already is. Plus a general pass
for missing features.

Changed files:
README.md

  • "What it does": Paid posts (own Patreon, passkey unlock, no visitor account/cookie, patron identity never stored)
  • Configuration table: PAID_SECRET (auto) + KLONKT_PREMIUM_ENABLED; SESSION_SECRET marked auto (matches .env.example, not "required")
  • new "Auto-generated secrets & backups" section: where the keys live, why PAID_SECRET is outside the DB, and to back up storage/ as a whole
  • Stack: link to FEDERATION.md

.env.example

  • PAID_SECRET block (auto-generate, or openssl rand -base64 32)
  • paid posts added to the premium-extras list

-robo
Co-Authored-By: Claude Opus 4.8 <noreply@…>

  • Property mode set to 100644
File size: 3.4 KB
Line 
1NODE_ENV=development
2PORT=3000
3
4# Network interface to bind. 127.0.0.1 = only reachable via a reverse proxy on the
5# same machine (recommended for a manual install behind Caddy/nginx — keeps the app
6# off the public internet). Use 0.0.0.0 only if you need direct external access
7# (no proxy/HTTPS — not recommended). Docker sets this to 0.0.0.0 itself.
8HOST=127.0.0.1
9# Secret used to sign login-session cookies. Leave EMPTY to auto-generate a strong
10# one on first start (saved to storage/.session-secret, stays stable across
11# restarts/updates). Or set your own: openssl rand -hex 32
12SESSION_SECRET=
13# Encrypts the stored Patreon secrets for paid posts. Same deal: leave EMPTY to
14# auto-generate on first use (saved to storage/.paid-secret, kept outside the DB
15# so a database dump alone stays useless). Or set your own: openssl rand -base64 32
16PAID_SECRET=
17DATABASE_PATH=./storage/database.sqlite
18MEDIA_PATH=./storage/media
19
20# Canonical public URL of this site (scheme + host, no trailing slash), e.g.
21# https://yourdomain.com . Used to build correct links in emails (password reset)
22# and OAuth redirects instead of trusting request headers (anti-spoofing).
23# Optional: leave empty and it falls back to the request host (fine for local/dev);
24# set it for production so email/login links point at the right place.
25PUBLIC_BASE_URL=
26
27# Strict HSTS. By default Klonkt sends a plain long max-age (safe on any domain).
28# Set HSTS_STRICT=1 ONLY if Klonkt owns the whole domain incl. all its subdomains:
29# it adds `includeSubDomains; preload`, which forces every subdomain to HTTPS and can
30# get your domain baked into browsers near-permanently. Leave unset if unsure.
31# HSTS_STRICT=1
32
33# ── Administrator ───────────────────────────────────────────────────
34# The admin logs in with username + password. On first start you create your
35# admin account via /auth/register; after that, registration is closed.
36# Forgot your password? -> "Forgot password" (email, see SMTP below) or always:
37# `npm run reset-admin` on the server.
38
39# ── Email (optional) — for "forgot password" reset links ────────────
40# Not set? Then reset only works via `npm run reset-admin` on the server.
41SMTP_HOST=
42SMTP_PORT=587
43SMTP_USER=
44SMTP_PASS=
45SMTP_FROM=
46
47# ── Lite mode (optional) ────────────────────────────────────────────
48# Set to "off" to disable the whole audio feature (no built-in music hosting/
49# player, no ffmpeg needed). Klonkt then runs as a lightweight blog/photo/EPK
50# site, even on an environment without ffmpeg. Hub and Circles keep working.
51# External embeds (YouTube/SoundCloud/Spotify) keep working too.
52# Reversible: set back to "on" (or remove) and restart — no reinstall, tracks kept.
53KLONKT_AUDIO=on
54
55# ── Premium extras ──────────────────────────────────────────────────
56# The core app, all updates and Cirkels are free. A handful of extras
57# (newsletter, statistics, EPK, link-in-bio, embeddable player, show agenda,
58# release planning, download-for-email, paid posts) are unlocked by a one-time
59# Patreon supporter link — that's what funds the project:
60# klonkt.com / patreon.com/c/roboburr. Leave this on.
61KLONKT_PREMIUM_ENABLED=on
Note: See TracBrowser for help on using the repository browser.