Usage & Enterprise Capabilities

Best for:Independent Content CreatorsPrivacy-Conscious OrganizationsSmall & Medium BusinessesNon-Profits & NGOsEuropean Startups (GDPR focus)

Keila is a modern, open-source email newsletter tool aimed directly at solving the bloat, complexity, and privacy concerns associated with commercial platforms like Mailchimp or Substack. It empowers creators and businesses to send beautiful newsletters while maintaining absolute ownership over their subscriber data.

Written in Elixir—a functional language known for its ability to handle immense concurrency with minimal resource footprint—Keila is incredibly snappy and reliable. Rather than trying to be a complex marketing automation suite with branching logic and deep CRM integrations, Keila focuses on doing one thing perfectly: reliably dispatching mass emails with a beautiful authoring experience.

For production, Keila is the ideal drop-in replacement for organizations prioritizing European GDPR compliance. It includes built-in double opt-in mechanisms, allows you to disable open/click tracking entirely if preferred, and prevents the systemic vendor lock-in typical of proprietary SaaS mailing lists.

Key Benefits

  • Privacy First: Self-hosting Keila ensures no third-party vendor is analyzing or selling your subscriber lists.

  • Elixir Performance: The underlying Erlang VM ensures the application can process delivery queues extremely fast without bogging down the server.

  • Markdown Support: Write newsletters the way developers prefer, using clean Markdown that compiles instantly into responsive HTML.

  • Simplicity: No overwhelming menus or confusing "audience tags"; just campaigns, segments, and a straightforward editor.

Production Architecture Overview

Deploying Keila is straightforward, following standard web application patterns:

  • The Keila Application: A compiled Elixir/Phoenix application that handles the web UI and the asynchronous mail dispatch queue.

  • PostgreSQL Database: The backend datastore for subscriber lists, campaign drafts, and delivery metrics.

  • Reverse Proxy: An Nginx or Caddy server to handle HTTPS/SSL termination and proxy traffic to the Keila web process.

  • External SMTP: An external email delivery service (like Amazon SES, SendGrid, or a customized Postfix relay) to actually deliver the messages to subscriber inboxes.

Implementation Blueprint

Implementation Blueprint

Prerequisites

Keila in production is most easily deployed via Docker to abstract the Elixir runtime requirements.

# Update Server
sudo apt update && sudo apt upgrade -y

# Install Docker and Docker Compose
sudo apt install docker.io docker-compose -y
sudo systemctl enable --now docker
shell

Configuring Docker Compose

Create a directory for your Keila installation and compose file:

mkdir /opt/keila && cd /opt/keila
nano docker-compose.yml
shell

Define the Keila app and its PostgreSQL dependency:

version: '3.8'

services:
  keila:
    image: pentacent/keila:latest
    container_name: keila_app
    restart: always
    ports:
      - "127.0.0.1:8000:4000"
    environment:
      # Database connection
      - DATABASE_URL=ecto://keila:super_secret_db_password@db/keila
      # The public URL where Keila will be hosted
      - HOST=newsletter.mycompany.com
      - PORT=4000
      # Secret key for sessions (generate a random 64 char string)
      - SECRET_KEY_BASE=generate_a_long_random_string_here
      # Allow registration (Set to false after creating your initial admin account)
      - ENABLE_REGISTRATION=true
      
      # (Optional) Pre-configure SMTP here, or do it in the Web UI
      # - SENDER=newsletter@mycompany.com
      # - SMTP_HOST=email-smtp.us-east-1.amazonaws.com
      # - SMTP_USER=ses_username
      # - SMTP_PASS=ses_password
      # - SMTP_PORT=587
    depends_on:
      db:
        condition: service_healthy

  db:
    image: postgres:14-alpine
    container_name: keila_db
    restart: always
    environment:
      - POSTGRES_DB=keila
      - POSTGRES_USER=keila
      - POSTGRES_PASSWORD=super_secret_db_password
    volumes:
      - keila_pgdata:/var/lib/postgresql/data
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U keila"]
      interval: 10s
      timeout: 5s
      retries: 5

volumes:
  keila_pgdata:
yaml

Launching Keila

Generate a secure secret key before running:

# Run this and copy the output into the SECRET_KEY_BASE in docker-compose.yml
openssl rand -base64 48
shell

Start the containers:

cd /opt/keila
docker-compose up -d
shell

Configuring the Reverse Proxy (Nginx)

Expose Keila securely to the internet.

sudo apt install nginx -y
sudo nano /etc/nginx/sites-available/keila
shell
server {
    listen 80;
    server_name newsletter.mycompany.com;

    location / {
        proxy_pass http://127.0.0.1:8000;
        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;
    }
}

Enable the site and ensure you run Certbot for HTTPS:

sudo ln -s /etc/nginx/sites-available/keila /etc/nginx/sites-enabled/
sudo systemctl reload nginx
shell

Setup & Delivery Configuration

  1. Initial Login: Open https://newsletter.mycompany.com. Create your administrator account.

  2. Disable Registration: To prevent strangers from signing up and using your server to send their own mail, edit docker-compose.yml, change ENABLE_REGISTRATION=false, and run docker-compose up -d to restart.

  3. Configure Senders: In the Keila UI, navigate to the Senders tab. You must define an SMTP relay here (e.g., AWS SES) and configure your From address.

  4. Domain Authentication: Ensure the domain you are sending from has valid SPF, DKIM, and DMARC records configured at your DNS provider to prevent your newsletters from landing in spam folders.

Audience Integration (API / Webhooks)

Keila provides an intuitive API for adding subscribers. If you want to automatically add a customer to your newsletter when they buy a product in your custom web app:

// Node.js example
const axios = require('axios');

axios.post('https://newsletter.mycompany.com/api/v1/projects/YOUR_PROJECT_ID/contacts', {
  contact: {
    email: "customer@example.com",
    first_name: "Jane"
  }
}, {
  headers: {
    'Authorization': 'Bearer YOUR_KEILA_API_KEY' // Generated in Keila user settings
  }
});
javascript
Technical Support

Stuck on Implementation?

If you're facing issues deploying this tool or need a managed setup on Hostinger, our engineers are here to help. We also specialize in developing high-performance custom web applications and designing end-to-end automation workflows.

Engineering trusted by teams at

Managed Setup & Infra

Production-ready deployment on Hostinger, AWS, or Private VPS.

Custom Web Applications

We build bespoke tools and web dashboards from scratch.

Workflow Automation

End-to-end automated pipelines and technical process scaling.

Faster ImplementationRapid Deployment
100% Free Audit & ReviewTechnical Analysis