maillayer-installer

One-line installer for maillayer — a self-hosted email marketing platform.

Install on any Linux VPS

Requires Docker + Docker Compose v2 already installed (curl -fsSL https://get.docker.com | sudo sh if not).

curl -fsSL https://install.maillayer.com/install.sh | sudo bash

The script:

  1. Generates a unique AUTH_SECRET (saved at /opt/maillayer/.env, mode 600).
  2. Pulls the public Docker image ghcr.io/mddanishyusuf/maillayer-pro:1.
  3. Starts the service via Docker Compose with a managed volume for your data.
  4. Waits for /api/health and prints the URL.

Prefer to read first?

curl -fsSL https://install.maillayer.com/install.sh -o install.sh
less install.sh
sudo bash install.sh

Override defaults

MAILLAYER_PORT=8080 \
MAILLAYER_URL=https://mail.example.com \
MAILLAYER_DIR=/var/lib/maillayer \
  curl -fsSL https://install.maillayer.com/install.sh | sudo bash

Maintenance

After install, manage with normal Docker Compose commands:

# Logs
docker compose -f /opt/maillayer/docker-compose.yml logs -f

# Update to the latest 1.x image
cd /opt/maillayer && docker compose pull && docker compose up -d

# Stop
cd /opt/maillayer && docker compose down

What gets installed

Security note

curl | sudo bash runs a remote script as root. The script in this repo:

It does NOT install Docker itself, modify firewall rules, edit other system services, or make outbound calls beyond pulling the Docker image. Read install.sh before running.

Backup

The encryption key in /opt/maillayer/.env (AUTH_SECRET) decrypts every stored Stripe / Firebase / Supabase / Airtable credential. Back it up alongside your SQLite DB.

# Quick offsite backup of secret + DB volume
tar czf maillayer-backup-$(date +%F).tar.gz \
  /opt/maillayer/.env \
  $(docker volume inspect maillayer_maillayer-data --format '')

Source code

Image source: https://github.com/mddanishyusuf/maillayer-pro (private).