Configuration & Environment Variables
Complete reference for all environment variables, persistent storage volumes, reverse proxy headers, outbound SMTP, Stripe checkout, and offline licensing resilience.
Environment Variables Reference
| Variable Name | Required | Default / Example | Description |
|---|---|---|---|
| PORT | Optional | 3000 | Host and container HTTP listening port |
| POSTGRES_USER | Optional | postgres | PostgreSQL 16 database user |
| POSTGRES_PASSWORD | Required | 32+ char secret | Database password; must match DATABASE_URL |
| POSTGRES_DB | Optional | eventwrappro | PostgreSQL database name |
| POSTGRES_PORT | Optional | 5432 | PostgreSQL port bound to 127.0.0.1 |
| DATABASE_URL | Required | postgresql://postgres:pass@db:5432/eventwrappro?schema=public | Primary PostgreSQL connection URI |
| NEXTAUTH_URL / AUTH_URL | Required | https://yourdomain.com | Canonical public HTTPS origin for auth callbacks and Passkeys |
| AUTH_TRUST_HOST | Required | true | Trust X-Forwarded-Host / Proto headers from reverse proxy |
| AUTH_SECRET / NEXTAUTH_SECRET | Required | openssl rand -base64 32 | 32+ byte secret used to sign web session cookies |
| JWT_SECRET | Required | openssl rand -base64 32 | HS256 secret for Mobile REST API (/api/v1/mobile/*) tokens |
| LICENSE_KEY | Required | WRAP-XXXX-XXXX-XXXX-XXXX | Your commercial EventWrapPro license key |
| LICENSE_SERVER_URL | Required | https://eventwrappro.com | Upstream license authority base URL |
| LICENSE_VERIFICATION_PUBLIC_KEY | Recommended | SPKI Ed25519 PEM | Verifies signed offline license tokens during grace periods |
| STORAGE_DRIVER | Optional | local | File backend: "local" disk or "s3" compatible object store |
| LOCAL_STORAGE_PATH | Optional | /app/uploads | Directory for proofs, customer artwork, CYA photos, branding, chat, and .eml logs |
| LOCAL_DATA_PATH | Optional | /app/data | Directory for updater markers and cached runtime state |
| AWS_S3_BUCKET / REGION / KEYS | Optional | us-east-1 | Required only when STORAGE_DRIVER=s3 |
| BACKUP_ENABLED / INTERVAL_* | Optional | true / 1 / DAYS | Automated .ewpbak backup schedule |
| BACKUP_DESTINATION_PATH | Optional | /app/backups | Directory where encrypted .ewpbak snapshots are stored |
| BACKUP_ENCRYPTION_KEY | Optional | Strong passphrase | Slot B key for headless backup decryption alongside your Slot A EWP-REC key |
Reverse Proxy & 100 MB Artwork Uploads
EventWrapPro accepts print-ready artwork and proof revisions up to 100 MB and relies on forwarded origin headers for Passkeys (WebAuthn), SSO callbacks, and Cloudflare geo-IP checks.
client_max_body_size 110M;
location / {
proxy_pass http://127.0.0.1:3000;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}Persistent Directories & Permissions
The container runs as unprivileged user nextjs (UID/GID 1001). Always initialize ./uploads, ./data, and ./backups with matching ownership:
mkdir -p uploads data backups
sudo chown -R 1001:1001 uploads data backupsOutbound SMTP Email Setup
Transactional notifications (password resets, quote links, proof approvals, receipts, and order updates) are dispatched via standard SMTP (Brevo, SendGrid, Postmark, Mailgun, Amazon SES, Google Workspace, or Microsoft 365). You can configure credentials in .env or dynamically inside Admin → Settings → Email.
SMTP_HOST=smtp.yourmailserver.com
SMTP_PORT=587
SMTP_USER=your_smtp_username
SMTP_PASS=your_smtp_password
SMTP_FROM="Your Wrap Shop <[email protected]>"Offline Mail Spool Fallback
Stripe Payment Processing
Configure Stripe keys in .env or under Admin → Settings → Pricing to accept deposits and final balance payments:
STRIPE_PUBLIC_KEY=pk_live_...
STRIPE_SECRET_KEY=sk_live_...
STRIPE_WEBHOOK_SECRET=whsec_...License Activation & Offline Resilience
Your instance verifies license entitlement via signed heartbeats. If internet connectivity is temporarily interrupted, EventWrapPro enters an automatic 14-day offline grace period so shop quoting, print queues, and field check-ins continue without disruption.