Keila is an open source alternative to newsletter tools like Mailchimp or Sendinblue. Send out newsletter campaigns with a WYSIWYG editor and create sign-up forms. Send through your own email inbox over SMTP, or use AWS SES, Sendgrid, Mailgun or Postmark for larger lists.
Keila Docker Compose example
Self-host Keila on your own server, homelab, or VPS starting from this Docker Compose example.
It runs Keila in Docker containers using the official pentacent/keila:latest, postgres:17-alpine images, with persistent volumes and automatic restarts preconfigured.
Review the environment variables and adjust them to your setup, save the file as compose.yml (or docker-compose.yml), and start the stack with docker compose up -d.
services:
keila:
image: pentacent/keila:latest
depends_on:
postgres:
condition: service_healthy
volumes:
- uploads:/opt/app/uploads
environment:
# PostgreSQL connection URL (postgres://user:password@host/database).
DB_URL: "postgres://keila:keila@postgres:5432/keila"
# Strong secret (at least 64 characters) used to sign sessions and derive salts. Change this before exposing Keila — generate one with `head -c 48 /dev/urandom | base64`.
SECRET_KEY_BASE: "changeme-changeme-changeme-changeme-changeme-changeme-changeme-0"
# Public domain of your Keila instance, used in generated links (without scheme).
URL_HOST: "localhost"
# Public URL scheme of your Keila instance: http or https.
URL_SCHEMA: "http"
# Public port of your Keila instance (443 for https behind a reverse proxy).
URL_PORT: "4000"
# Email address of the root user created on first start.
KEILA_USER: "root@localhost"
# Password of the root user created on first start (at least 10 characters). If empty, a random password is printed to the container logs.
KEILA_PASSWORD: ""
# Directory where user uploads are stored (backed by the uploads volume).
USER_CONTENT_DIR: "/opt/app/uploads"
# Set to true to disable sign-up of new users via the UI.
DISABLE_REGISTRATION: "false"
# Hostname of the SMTP server used for system emails (registration, password reset).
MAILER_SMTP_HOST: "changeme"
# Port of the SMTP server (465 uses implicit TLS, other ports use STARTTLS).
MAILER_SMTP_PORT: "587"
# FROM address for system emails.
MAILER_SMTP_FROM_EMAIL: "keila@example.com"
# Username for the SMTP server (defaults to the FROM address if empty).
MAILER_SMTP_USER: ""
# Password for the SMTP server.
MAILER_SMTP_PASSWORD: "changeme"
restart: unless-stopped
postgres:
image: postgres:17-alpine
volumes:
- db_data:/var/lib/postgresql/data
environment:
POSTGRES_USER: keila
POSTGRES_PASSWORD: keila
POSTGRES_DB: keila
healthcheck:
test: ["CMD", "pg_isready", "-U", "keila", "-d", "keila"]
interval: 10s
timeout: 5s
retries: 5
restart: unless-stopped
volumes:
uploads:
db_data:
Values set to changeme are required — replace them with your own
values before starting Keila.
Prefer a managed setup? WinterFlow installs, configures, and updates Keila for you using this same Docker Compose configuration.