WhatsMax DocumentationWhatsMax Documentation
Home
Getting Started
Deployment
Integrations
Platform Guide
FAQ
Home
Getting Started
Deployment
Integrations
Platform Guide
FAQ
  • Getting Started

    • Introduction
    • Requirements
    • Installation
    • Configuration
    • First Steps
  • Production Deployment

    • Production with PM2
    • Nginx & SSL
    • Updating
  • Integrations

    • WhatsApp Cloud API
    • WhatsApp QR
    • Telegram
    • WeChat
    • Social Media
    • Payment Gateways
    • AI Providers
    • E-commerce
    • Webhook Automation
    • SMS & Email
    • Realtime (Pusher)
  • Platform Guide

    • Platform Overview
    • Omnichannel Inbox
    • Templates & Auto Replies
    • Website Chat Widget
    • Contacts & Segments
    • Campaigns & Broadcasting
    • Automations
    • AI Chatbots
    • Social Planner
    • Leads & Pipeline
    • Reports & Analytics
    • Media Library
    • Workspaces & Team
    • Subscription & Support
    • Developer API
  • Admin Panel

    • Admin Panel
    • Clients & Subscriptions
    • Plans, Coupons & Tax
    • Content & Support
    • Configuration
    • System & Health
    • License Activation
  • Reference

    • FAQ
    • Troubleshooting
    • Changelog
    • Credits

Configuration Reference

All server-level configuration lives in the .env file at the project root. After changing it, restart the web app and the worker — the scheduler picks the new values up on its next cron tick. A rebuild is not needed: env values are read at runtime, with one exception, the NEXT_PUBLIC_* variables, which are baked in at build time.

Two kinds of configuration

.env holds infrastructure settings (database, Redis, URLs, secrets). Integration credentials — payment gateways, Meta apps, AI keys, SMS providers — are entered in the admin panel and stored encrypted in the database. You will rarely touch .env after go-live.

Application

VariableExampleDescription
APP_NAMEWhatsMaxApplication name used in emails and page titles.
APP_URLhttps://chat.example.comPublic base URL. Used to build links, OAuth callbacks and webhook URLs. Must be HTTPS in production.
APP_ENVproductionproduction or development.
APP_DEMO_MODEfalseWhen true, destructive actions are disabled (for public demos). Keep false in production.

Database

VariableExampleDescription
DATABASE_URLmysql://user:pass@127.0.0.1:3306/whatsmaxMySQL connection string. Special characters in the password must be URL-encoded (@ → %40, # → %23).

Authentication & security

VariableExampleDescription
NEXTAUTH_URLhttps://chat.example.comMust equal APP_URL.
AUTH_SECRET(random)Session signing secret. Generate with openssl rand -base64 32.
AUTH_TRUST_HOSTtrueRequired when running behind a reverse proxy (Nginx).
APP_ENCRYPTION_KEY(64 hex chars)AES-256-GCM key encrypting stored provider credentials. Generate with openssl rand -hex 32. Never change after go-live.

Redis

VariableExampleDescription
REDIS_URLredis://127.0.0.1:6379Redis connection for BullMQ queues, scheduling and caching. With a password: redis://:password@127.0.0.1:6379.

Realtime (Pusher, optional)

Realtime inbox updates use Pusher Channels. Without it the inbox still works but updates on refresh/polling instead of instantly.

VariableDescription
PUSHER_APP_IDFrom your Pusher app's "App Keys" page.
PUSHER_APP_KEYServer-side key.
PUSHER_APP_SECRETServer-side secret.
PUSHER_APP_CLUSTERe.g. mt1, eu, ap2.
NEXT_PUBLIC_PUSHER_KEYSame value as PUSHER_APP_KEY — exposed to the browser. Build-time — re-run npm run build after changing.
NEXT_PUBLIC_PUSHER_CLUSTERSame as PUSHER_APP_CLUSTER. Build-time — re-run npm run build after changing.

See Realtime for the full setup.

AI defaults (optional)

Platform-level AI defaults. Workspace users can also bring their own keys in AI → Providers; admins manage platform AI in Admin → AI Dashboard.

VariableExampleDescription
AI_PROVIDERopenaiDefault provider: openai, anthropic or gemini.
OPENAI_API_KEYsk-...Fallback OpenAI key.
OPENAI_MODELgpt-4o-miniDefault OpenAI model.

Mail

Transactional email (password resets, invitations, ticket notifications). Campaign email servers are configured per-workspace in the app.

VariableExampleDescription
MAIL_TRANSPORTsmtpsmtp to send, log to write emails to the log instead (useful before SMTP is ready).
MAIL_HOSTsmtp.postmarkapp.comSMTP host.
MAIL_PORT587SMTP port (587 STARTTLS, 465 TLS).
MAIL_USERNAME—SMTP username.
MAIL_PASSWORD—SMTP password.
MAIL_FROM_ADDRESShello@example.comDefault From address.
MAIL_FROM_NAMEWhatsMaxDefault From name.

File storage

VariableExampleDescription
STORAGE_DRIVERlocallocal (files under public/storage) or s3.
AWS_ACCESS_KEY_ID—S3 credentials (also used for SNS SMS if enabled).
AWS_SECRET_ACCESS_KEY——
AWS_REGIONus-east-1S3 region.
AWS_BUCKETwhatsmax-mediaBucket name.
AWS_ENDPOINT(optional)Set for S3-compatible providers (DigitalOcean Spaces, MinIO, Cloudflare R2).

S3-compatible storage

Any S3-compatible service works — set AWS_ENDPOINT to the provider's endpoint and fill the credentials accordingly. If you scale to multiple app servers, S3 storage is required (local disk is per-server).

License

VariableDescription
LICENSE_SERVER_URLLicense server endpoint (pre-configured in the distributed build).
LICENSE_API_KEYLicense server API key (pre-configured).
LICENSE_PRODUCT_IDProduct identifier (pre-configured).

You normally don't touch these — activation happens with your purchase code in Admin → System → License (guide).

Applying changes

# after editing .env
pm2 restart whatsmax-web whatsmax-worker

# only if you changed a NEXT_PUBLIC_* variable:
npm run build && pm2 restart whatsmax-web
Prev
Installation
Next
First Steps