Deployment
Once you’ve completed the Getting Started guide, this section covers everything you need for a production deployment.
- Single-Container Install — one
docker runwith SQLite, for home servers, NAS boxes, and small studios. - Docker Configuration — volumes, permissions, production compose, container management.
- Environment Variables — complete reference table for all settings.
- Reverse Proxy — Nginx, Traefik, and Caddy configurations.
- SSL Certificates — Let’s Encrypt with Certbot.
- Example: NAS at Home — a complete worked install on a UGREEN NAS behind a FRITZ!Box, with DynDNS, port forwarding, and HTTPS via Nginx Proxy Manager.
- Release Channels — stable vs beta, switching channels, update notifications.
Background services
The picpeak-backend container runs a single Node process that hosts the HTTP API plus several long-lived workers. Knowing what each one does helps when reading logs or debugging.
| Worker | Trigger | What it does |
|---|---|---|
Storage backend (initStorage) | Startup | Validates STORAGE_BACKEND config; HEADs the bucket / stats the directory. Refuses to boot on misconfig. |
| Managed file watcher (chokidar) | Startup; local mode only | Auto-imports any photo dropped into events/active/<slug>/. Disabled when STORAGE_BACKEND=s3. |
| External-folder watcher | Startup; opt-in per event | Imports new files from a reference event’s folder after they settle, with a 15-minute fallback scan. Keeps gallery records when source files disappear. Works with local or S3 storage; see External Media. |
| S3 auto-importer | Startup; opt-in via STORAGE_AUTO_IMPORT=true | Polls every active event’s S3 prefix on a slow cadence (default 5 min). Imports objects seen for two consecutive polls. See Storage Backends. |
| Email queue processor | Every 60s | Sends queued notifications (event creation, expiration warnings, archive complete). |
| Expiration checker | Every hour (cron) | Marks galleries inactive past their expires_at, then archives them. Fires event.expired then event.archived webhooks. |
| Webhook delivery worker | Every 5s | Picks up pending webhook_deliveries, signs the body with HMAC-SHA256, POSTs with retries. See Webhooks. |
| Backup service | Cron (admin-configurable) | Local + S3 backups of photos, thumbnails, database. |
| Temp upload cleanup | Every hour | Removes orphaned multer temp files older than 1 hour. |
All workers share the same database connection pool. They’re independent of each other — a stuck email queue won’t block webhook deliveries, etc.
Last updated on