# Listmonk — Self-Hosted Newsletter & Mailing List Manager > Listmonk is a high-performance, self-hosted newsletter and mailing list manager with a modern dashboard. Single binary, handles millions of subscribers efficiently. ## Install Save in your project root: ## Quick Use ```bash docker run -d --name listmonk -p 9000:9000 -e "LISTMONK_DB_HOST=host.docker.internal" -e "LISTMONK_DB_PORT=5432" -e "LISTMONK_DB_USER=listmonk" -e "LISTMONK_DB_PASSWORD=listmonk" -e "LISTMONK_DB_DATABASE=listmonk" listmonk/listmonk:latest ``` Or use the all-in-one Docker Compose: ```bash curl -o docker-compose.yml https://raw.githubusercontent.com/knadh/listmonk/master/docker-compose.yml docker compose up -d # Run setup docker compose run --rm app ./listmonk --install ``` Open `http://localhost:9000` — login with admin/admin. ## Intro **Listmonk** is a high-performance, self-hosted newsletter and mailing list manager. Built with Go and React, it provides a modern web dashboard for managing subscribers, creating email campaigns, and tracking analytics — all from a single binary that can handle millions of subscribers with minimal resources. With 19.5K+ GitHub stars and AGPL-3.0 license, Listmonk is the go-to self-hosted alternative to Mailchimp, ConvertKit, and SendGrid for organizations that want full control over their email marketing with zero per-subscriber costs. ## What Listmonk Does - **Subscriber Management**: Import, segment, and manage subscriber lists with custom attributes - **Campaign Creation**: Rich HTML email editor with template support and media management - **Transactional Email**: API for sending transactional emails (welcome, reset, notifications) - **Analytics**: Open rates, click rates, bounce tracking, and campaign performance metrics - **List Segmentation**: Dynamic segments based on subscriber attributes and engagement - **Double Opt-in**: Configurable double opt-in with customizable confirmation emails - **Template System**: Go template engine for dynamic, personalized email content - **Multi-list**: Manage multiple independent mailing lists from one instance - **SMTP Integration**: Works with any SMTP provider (SES, Postmark, SendGrid, self-hosted) - **API**: Full REST API for programmatic subscriber and campaign management ## Architecture ``` ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ │ Admin UI │────▶│ Listmonk │────▶│ PostgreSQL │ │ (React) │ │ Server (Go) │ │ (Subscribers│ └──────────────┘ └──────┬───────┘ │ & Campaigns)│ │ └──────────────┘ ┌──────┴───────┐ │ SMTP Server │ │ (SES/SMTP) │ └──────────────┘ ``` ## Self-Hosting ### Docker Compose (Recommended) ```yaml services: listmonk: image: listmonk/listmonk:latest ports: - "9000:9000" environment: TZ: Asia/Shanghai volumes: - ./config.toml:/listmonk/config.toml depends_on: - db db: image: postgres:16-alpine environment: POSTGRES_USER: listmonk POSTGRES_PASSWORD: listmonk POSTGRES_DB: listmonk volumes: - pg-data:/var/lib/postgresql/data volumes: pg-data: ``` ### SMTP Configuration ```toml # config.toml [smtp] host = "email-smtp.us-east-1.amazonaws.com" port = 587 auth_protocol = "login" username = "YOUR_SES_KEY" password = "YOUR_SES_SECRET" tls_type = "STARTTLS" max_conns = 10 idle_timeout = "15s" wait_timeout = "5s" ``` Recommended SMTP providers: - **Amazon SES**: $0.10/1000 emails (cheapest at scale) - **Postmark**: $1.25/1000 emails (best deliverability) - **SendGrid**: 100/day free, then $0.50/1000 - **Self-hosted**: Postfix/Haraka (free but requires IP reputation management) ## Key Features ### Campaign Templates ```html
As a Pro subscriber, you get early access to...
{{ else }}Upgrade to Pro for exclusive content...
{{ end }} Check out our latest offerUnsubscribe: {{ .UnsubscribeURL }}
``` ### REST API ```bash # Add subscriber curl -X POST http://localhost:9000/api/subscribers -u "admin:admin" -H "Content-Type: application/json" -d '{"email": "user@example.com", "name": "John", "lists": [1], "attribs": {"plan": "free"}}' # Send transactional email curl -X POST http://localhost:9000/api/tx -u "admin:admin" -H "Content-Type: application/json" -d '{"subscriber_email": "user@example.com", "template_id": 1, "data": {"order_id": "12345"}}' # Create campaign curl -X POST http://localhost:9000/api/campaigns -u "admin:admin" -H "Content-Type: application/json" -d '{"name": "Weekly Update", "subject": "This Week in Tech", "lists": [1], "type": "regular", "content_type": "richtext", "body": "