Repository navigation
Configuration
Kristian-Buriasco edited this page Jul 26, 2026
·
2 revisions
Copy .env.example to .env, or set the same variables in Docker Compose.
| Var | Purpose |
|---|---|
SESSION_SECRET |
Required in production. Sign/encrypt session cookies. Generate with openssl rand -hex 32. |
ADMIN_PASSWORD_HASH |
bcrypt hash of the admin password. Empty → a temporary password is printed to the logs on first run. Generate with node scripts/hash-password.mjs 'your-password' (or via Compose: docker compose run --rm gallery node scripts/hash-password.mjs "pw"). |
BASE_URL |
Public https origin visitors use. Used for share links and as the WebAuthn/passkey origin + RP ID. Example: https://gallery.example.com
|
DATA_DIR |
Runtime data root (SQLite DB, photos, backups). In Docker this is the mounted volume (default /data). |
PORT |
HTTP port the app listens on (default 3200). Put TLS on a reverse proxy in front. |
NEXT_PUBLIC_SITE_NAME |
Site name in headers/titles (default Albm). |
RP_ID |
Optional WebAuthn RP ID override (defaults to the host of BASE_URL). |
DISABLE_UPDATE_CHECK |
Set to 1 to skip the daily GitHub release check. |
SMTP_HOST, SMTP_PORT, SMTP_USER, SMTP_PASS, SMTP_FROM, SMTP_TO
|
Optional. Only used as a fallback if SMTP isn't configured in Settings → Email (the admin UI is the preferred way to set this up — no env vars or restart needed). Powers new-inquiry email notifications; everything else works without it. |
When setting ADMIN_PASSWORD_HASH, wrap the hash in single quotes so the shell does not mangle $2b$….
All photos and the SQLite database live under DATA_DIR. Nothing there is served statically — every image goes through an auth-checked handler.
DATA_DIR/
gallery.db
backups/gallery-<timestamp>.db
photos/<galleryId>/{originals,web,thumb,print}/…
Back up DATA_DIR — that is your galleries and database. Migration backups also land in DATA_DIR/backups/.
-
dcraw — improves proprietary RAW decode. Set
DCRAW_PATHif it is not onPATH. - Bib OCR and face search use WASM so they build without native ONNX.