Skip to main content
All environment variables are set in your .env file at the same level as docker-compose.yml. The Compose file reads them and injects them into the running containers.
Start from the example file: curl -O https://raw.githubusercontent.com/useplunk/plunk/next/.env.self-host.example

Security and database

VariableRequiredDescriptionDefault / Example
JWT_SECRETYesSecret key used to sign and verify JWT tokens. Generate a secure value with openssl rand -base64 32.
DB_PASSWORDYesPostgreSQL password for the plunk database user. Used by both the postgres container and the connection string auto-assembled by the Compose file.changeme123
DATABASE_URLYesFull PostgreSQL connection string. In Docker Compose this is assembled automatically from DB_PASSWORD.postgresql://plunk:password@postgres:5432/plunk
REDIS_URLYesRedis connection string.redis://redis:6379
PORTNoPort the API server listens on inside the container.8080

URLs and domains

The entrypoint script constructs all internal and client-side URLs from these domain variables at container startup. You do not need to set *_URI or NEXT_PUBLIC_* variables manually.
VariableRequiredDescriptionExample
API_DOMAINYesSubdomain for the API server.api.yourdomain.com
DASHBOARD_DOMAINYesSubdomain for the Next.js dashboard.app.yourdomain.com
LANDING_DOMAINNoSubdomain for the landing page.www.yourdomain.com
WIKI_DOMAINNoSubdomain for the documentation site.docs.yourdomain.com
USE_HTTPSNoSet to true when running behind a TLS-terminating reverse proxy. Determines whether URLs are constructed with https:// or http://.false

AWS SES

VariableRequiredDescriptionExample
AWS_SES_REGIONYesAWS region where SES is configured.us-east-1
AWS_SES_ACCESS_KEY_IDYesAccess key ID for the IAM user with SES send permissions.AKIAIOSFODNN7EXAMPLE
AWS_SES_SECRET_ACCESS_KEYYesSecret access key for the IAM user.wJalrXUtnFEMI/K7MDENG/bPxRfiCY...
SES_CONFIGURATION_SETNoSES configuration set name used for emails with open and click tracking enabled.plunk-configuration-set
SES_CONFIGURATION_SET_NO_TRACKINGNoA second SES configuration set used for emails when tracking is disabled. When set, projects can toggle tracking on/off. If omitted, the tracking toggle is hidden in project settings.plunk-no-tracking-configuration-set
See Email setup for instructions on creating these configuration sets.

Storage (Minio)

Minio is included in the Docker Compose stack and works with the defaults below. Only change these if you are connecting to an external S3-compatible bucket.
VariableRequiredDescriptionDefault
MINIO_ROOT_USERNoMinio root username.plunk
MINIO_ROOT_PASSWORDNoMinio root password.plunkminiopass
MINIO_API_PORTNoHost port mapped to the Minio S3 API.9000
MINIO_CONSOLE_PORTNoHost port mapped to the Minio console UI.9001
S3_ENDPOINTNoS3 or Minio endpoint URL as seen from inside the Plunk container.http://minio:9000
S3_ACCESS_KEY_IDNoAccess key for the S3 bucket.plunk
S3_ACCESS_KEY_SECRETNoSecret key for the S3 bucket.plunkminiopass
S3_BUCKETNoBucket name for file uploads.uploads
S3_PUBLIC_URLNoPublicly accessible base URL for stored files. Set this to the externally reachable URL of your Minio instance or S3 bucket.http://localhost:9000/uploads
S3_FORCE_PATH_STYLENoUse path-style URLs (endpoint/bucket/key) instead of virtual-hosted style. Required for Minio.true

SMTP server

The optional SMTP relay lets users send emails through Plunk using any SMTP client. It is not required for the core platform to work.
VariableRequiredDescriptionDefault
SMTP_DOMAINNoSMTP relay domain. Required when using Traefik’s acme.json so Plunk can select the correct certificate for this domain. Setting a non-localhost value also automatically enables SMTP features in the dashboard.localhost
SMTP_ENABLEDNoExplicitly enable SMTP features in the dashboard UI. Automatically enabled when SMTP_DOMAIN is set to a non-localhost value.false
PORT_SECURENoHost port for SMTPS (implicit TLS).465
PORT_SUBMISSIONNoHost port for SMTP submission (STARTTLS).587
MAX_RECIPIENTSNoMaximum number of recipients allowed per email through the SMTP relay.5

OAuth (optional)

Enables social login on the dashboard sign-in page. Register an OAuth app with each provider you want to support.
VariableRequiredDescription
GITHUB_OAUTH_CLIENTNoGitHub OAuth app client ID.
GITHUB_OAUTH_SECRETNoGitHub OAuth app client secret.
GOOGLE_OAUTH_CLIENTNoGoogle OAuth app client ID.
GOOGLE_OAUTH_SECRETNoGoogle OAuth app client secret.

Stripe (optional)

Required only if you want to enable billing features. All five variables must be set for billing to activate.
VariableRequiredDescription
STRIPE_SKNoStripe secret key.
STRIPE_WEBHOOK_SECRETNoStripe webhook signing secret for verifying incoming events.
STRIPE_PRICE_ONBOARDINGNoStripe price ID for the one-time onboarding fee.
STRIPE_PRICE_EMAIL_USAGENoStripe price ID for metered pay-per-email usage.
STRIPE_METER_EVENT_NAMENoStripe meter event name used when reporting usage.emails

Platform emails (optional)

When configured, Plunk sends email notifications to users for critical events such as a project being suspended or billing limits being reached. Without these variables, only ntfy notifications are sent.
VariableRequiredDescriptionExample
PLUNK_API_KEYNoAPI key for a Plunk instance used to send transactional notification emails.pk_...
PLUNK_FROM_ADDRESSNoFrom address for platform notification emails.[email protected]

Notifications (ntfy)

Plunk bundles a self-hosted ntfy server for internal system notifications.
VariableRequiredDescriptionDefault
NTFY_PORTNoHost port for the ntfy web UI and API.8080
NTFY_URLNontfy topic URL that Plunk publishes notifications to. Change this to use an external ntfy.sh server or your own instance.http://ntfy/plunk-notifications

User management

VariableRequiredDescriptionDefault
DISABLE_SIGNUPSNoWhen true, the signup endpoint rejects new registration attempts. Useful for private instances where you want to manage users manually.false
VERIFY_EMAIL_ON_SIGNUPNoWhen true, validates email addresses on signup — checks for disposable domains, plus-addressing, domain existence, and valid MX records.false

Security

VariableRequiredDescriptionDefault
AUTO_PROJECT_DISABLENoWhen true, projects are automatically suspended when bounce or complaint rates exceed thresholds. Set to false to receive notifications without automatic suspension.true
EMAIL_RATE_LIMIT_PER_SECONDNoOverride the email sending rate limit (emails per second). If not set, Plunk queries your AWS SES account quota automatically.

Build docs developers (and LLMs) love