Environment & Integrations

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 NameRequiredDefault / ExampleDescription
PORTOptional3000Host and container HTTP listening port
POSTGRES_USEROptionalpostgresPostgreSQL 16 database user
POSTGRES_PASSWORDRequired32+ char secretDatabase password; must match DATABASE_URL
POSTGRES_DBOptionaleventwrapproPostgreSQL database name
POSTGRES_PORTOptional5432PostgreSQL port bound to 127.0.0.1
DATABASE_URLRequiredpostgresql://postgres:pass@db:5432/eventwrappro?schema=publicPrimary PostgreSQL connection URI
NEXTAUTH_URL / AUTH_URLRequiredhttps://yourdomain.comCanonical public HTTPS origin for auth callbacks and Passkeys
AUTH_TRUST_HOSTRequiredtrueTrust X-Forwarded-Host / Proto headers from reverse proxy
AUTH_SECRET / NEXTAUTH_SECRETRequiredopenssl rand -base64 3232+ byte secret used to sign web session cookies
JWT_SECRETRequiredopenssl rand -base64 32HS256 secret for Mobile REST API (/api/v1/mobile/*) tokens
LICENSE_KEYRequiredWRAP-XXXX-XXXX-XXXX-XXXXYour commercial EventWrapPro license key
LICENSE_SERVER_URLRequiredhttps://eventwrappro.comUpstream license authority base URL
LICENSE_VERIFICATION_PUBLIC_KEYRecommendedSPKI Ed25519 PEMVerifies signed offline license tokens during grace periods
STORAGE_DRIVEROptionallocalFile backend: "local" disk or "s3" compatible object store
LOCAL_STORAGE_PATHOptional/app/uploadsDirectory for proofs, customer artwork, CYA photos, branding, chat, and .eml logs
LOCAL_DATA_PATHOptional/app/dataDirectory for updater markers and cached runtime state
AWS_S3_BUCKET / REGION / KEYSOptionalus-east-1Required only when STORAGE_DRIVER=s3
BACKUP_ENABLED / INTERVAL_*Optionaltrue / 1 / DAYSAutomated .ewpbak backup schedule
BACKUP_DESTINATION_PATHOptional/app/backupsDirectory where encrypted .ewpbak snapshots are stored
BACKUP_ENCRYPTION_KEYOptionalStrong passphraseSlot 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.

nginx-eventwrappro.conf
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:

Host Directory Permissions
mkdir -p uploads data backups
sudo chown -R 1001:1001 uploads data backups

Outbound 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.

.env SMTP Settings
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

If SMTP is not yet configured, EventWrapPro records outbound messages to the server's local mail spool inside the container so administrators with host access can verify message formatting during initial testing.

Stripe Payment Processing

Configure Stripe keys in .env or under Admin → Settings → Pricing to accept deposits and final balance payments:

.env Stripe Credentials
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.