|
| 1 | +# ───────────────────────────────────────────────────────────────────────────── |
| 2 | +# OpenCoperLock — environment configuration |
| 3 | +# Copy to `.env` and replace every CHANGE_ME value before running. |
| 4 | +# Never commit your real .env. Generate keys with: openssl rand -base64 32 |
| 5 | +# ───────────────────────────────────────────────────────────────────────────── |
| 6 | + |
| 7 | +# ── Core ───────────────────────────────────────────────────────────────────── |
| 8 | +NODE_ENV=production |
| 9 | +# Public URL the web app is served from (used for cookies, CORS, links). |
| 10 | +APP_URL=http://localhost:3000 |
| 11 | +# Port the API listens on (inside the container / process). |
| 12 | +API_PORT=4000 |
| 13 | +# Port the web app listens on. |
| 14 | +WEB_PORT=3000 |
| 15 | + |
| 16 | +# ── Database (PostgreSQL) ──────────────────────────────────────────────────── |
| 17 | +POSTGRES_USER=opencoperlock |
| 18 | +POSTGRES_PASSWORD=CHANGE_ME_strong_db_password |
| 19 | +POSTGRES_DB=opencoperlock |
| 20 | +# Connection string used by Prisma. With Docker Compose, host is the `postgres` service. |
| 21 | +DATABASE_URL=postgresql://opencoperlock:CHANGE_ME_strong_db_password@postgres:5432/opencoperlock |
| 22 | + |
| 23 | +# ── Secrets ────────────────────────────────────────────────────────────────── |
| 24 | +# 32-byte base64 master key used to wrap per-file data-encryption keys (server-side |
| 25 | +# encryption at rest). Rotating this requires re-wrapping existing file keys. |
| 26 | +MASTER_KEY=CHANGE_ME_base64_32_bytes |
| 27 | +# 32-byte base64 secret used to sign session cookies and download tokens. |
| 28 | +SESSION_SECRET=CHANGE_ME_base64_32_bytes |
| 29 | + |
| 30 | +# ── First admin (created by the seed script on first run) ──────────────────── |
| 31 | +ADMIN_EMAIL=admin@example.com |
| 32 | +ADMIN_PASSWORD=CHANGE_ME_strong_admin_password |
| 33 | + |
| 34 | +# ── Storage ────────────────────────────────────────────────────────────────── |
| 35 | +# Driver: `local` (default). S3 driver is a documented future option. |
| 36 | +STORAGE_DRIVER=local |
| 37 | +# Absolute path (inside the container) where encrypted blobs are stored. |
| 38 | +STORAGE_PATH=/data/storage |
| 39 | +# Where quarantined (infected) files are moved. |
| 40 | +QUARANTINE_PATH=/data/quarantine |
| 41 | +# Global storage cap across all users, in bytes. 0 = unlimited. (Also editable in admin UI.) |
| 42 | +GLOBAL_STORAGE_CAP_BYTES=0 |
| 43 | +# Default per-user quota in bytes for newly created users (10 GiB). |
| 44 | +DEFAULT_USER_QUOTA_BYTES=10737418240 |
| 45 | +# Maximum size for a single Remote-Upload download, in bytes (2 GiB). |
| 46 | +REMOTE_UPLOAD_MAX_BYTES=2147483648 |
| 47 | + |
| 48 | +# ── Antivirus (ClamAV) — optional ─────────────────────────────────────────── |
| 49 | +# If unreachable, uploads are accepted and marked SKIPPED rather than blocked. |
| 50 | +CLAMAV_ENABLED=true |
| 51 | +CLAMAV_HOST=clamav |
| 52 | +CLAMAV_PORT=3310 |
| 53 | + |
| 54 | +# ── VirusTotal — optional ──────────────────────────────────────────────────── |
| 55 | +# Leave empty to disable. With a key, files can be checked by hash on demand. |
| 56 | +VIRUSTOTAL_API_KEY= |
0 commit comments