Are you tired of paying monthly fees for newsletter services like Mailchimp or ConvertKit? Looking for complete control over your subscriber data and email campaigns? Listmonk might be exactly what you need.
Listmonk is a powerful, self-hosted newsletter and mailing list manager that gives you all the features of premium services without the recurring costs or subscriber limits. Combined with Coolify for easy deployment, you can have your own email marketing platform running in under 30 minutes.
Why Choose Listmonk?
Before diving into the setup, let's look at why Listmonk stands out:
✅ Cost-effective: No monthly fees or subscriber limits
✅ Privacy-focused: Complete control over your data
✅ Feature-rich: Campaign analytics, segmentation, templates, and more
✅ Modern UI: Clean, intuitive interface that rivals paid services
✅ API-first: Integrate with your existing applications
✅ Open source: Actively maintained with a growing community
Prerequisites
Before we start, make sure you have:
- A server or VPS with Docker support
- Coolify installed and configured
- A domain name pointed to your server
- SMTP credentials (Gmail, SendGrid, AWS SES, etc.)
The Setup Process
Step 1: Create Your Listmonk Service in Coolify
- Log into your Coolify dashboard
- Create a new project or use an existing one
- Add a new resource and choose "Docker Compose"
- Name your service (e.g., "listmonk-newsletter")
Step 2: Configure Your Docker Compose
Here's the complete docker-compose.yml
configuration that works perfectly with Coolify:
x-db-credentials:
POSTGRES_USER: listmonk
POSTGRES_PASSWORD: listmonk
POSTGRES_DB: listmonk
services:
app:
image: 'listmonk/listmonk:latest'
container_name: listmonk_app
restart: unless-stopped
ports:
- '9000:9000'
networks:
- listmonk
hostname: '${SERVICE_FQDN_APP:-listmonk.example.com}'
depends_on:
db:
condition: service_healthy
command:
- sh
- '-c'
- "./listmonk --install --idempotent --yes --config '' && ./listmonk --upgrade --yes --config '' && ./listmonk --config ''"
environment:
LISTMONK_app__address: '0.0.0.0:9000'
LISTMONK_app__root_url: '${LISTMONK_app__root_url}'
LISTMONK_db__user: listmonk
LISTMONK_db__password: listmonk
LISTMONK_db__database: listmonk
LISTMONK_db__host: db
LISTMONK_db__port: 5432
LISTMONK_db__ssl_mode: disable
LISTMONK_db__max_open: 25
LISTMONK_db__max_idle: 25
LISTMONK_db__max_lifetime: 300s
TZ: Etc/UTC
LISTMONK_ADMIN_USER: '${LISTMONK_ADMIN_USER}'
LISTMONK_ADMIN_PASSWORD: '${LISTMONK_ADMIN_PASSWORD}'
volumes:
- './uploads:/listmonk/uploads:rw'
healthcheck:
test:
- CMD
- wget
- '--no-verbose'
- '--tries=1'
- '--spider'
- 'http://localhost:9000/'
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
db:
image: 'postgres:17-alpine'
container_name: listmonk_db
restart: unless-stopped
networks:
- listmonk
environment:
POSTGRES_USER: listmonk
POSTGRES_PASSWORD: listmonk
POSTGRES_DB: listmonk
healthcheck:
test:
- CMD-SHELL
- 'pg_isready -U listmonk'
interval: 10s
timeout: 5s
retries: 6
volumes:
- type: volume
source: listmonk-data
target: /var/lib/postgresql/data
networks:
listmonk: null
volumes:
listmonk-data: null
Step 3: Set Environment Variables
In your Coolify service settings, add these environment variables:
# Required - Set your admin credentials
LISTMONK_ADMIN_USER=your-admin-username
LISTMONK_ADMIN_PASSWORD=your-secure-password
# Required - Your domain configuration
SERVICE_FQDN_APP=newsletter.yourdomain.com
LISTMONK_app__root_url=https://newsletter.yourdomain.com
Security Note: Make sure to use a strong password for your admin account!
Step 4: Deploy and Access
- Save your configuration in Coolify
- Deploy the service
- Wait for both containers to become healthy (usually 2-3 minutes)
- Access your Listmonk instance at
https://newsletter.yourdomain.com
Initial Configuration
Once Listmonk is running, you'll need to configure it:
1. First Login
- Navigate to your domain
- Login with the credentials you set in environment variables
- You'll be greeted with the clean Listmonk dashboard
2. Configure SMTP Settings
Go to Settings > SMTP and add your email provider:
{
"host": "smtp.gmail.com",
"port": 587,
"auth_protocol": "plain",
"username": "your-email@gmail.com",
"password": "your-app-password",
"hello_hostname": "",
"tls_enabled": true,
"tls_skip_verify": false,
"max_conns": 10,
"idle_timeout": "15s",
"wait_timeout": "5s",
"max_msg_retries": 2,
"email_headers": []
}
3. Create Your First List
- Go to Lists and create your first mailing list
- Set up subscription preferences
- Configure double opt-in if needed
4. Design Your Templates
- Navigate to Campaigns > Templates
- Customize the default template or create your own
- Use Listmonk's template variables for personalization
Key Features to Explore
Once you're set up, here are the powerful features you can leverage:
Campaign Management
- Rich text editor with template support
- A/B testing capabilities
- Scheduled sending
- Campaign analytics and tracking
Subscriber Management
- Import/export subscribers
- Custom attributes and segmentation
- Subscription preferences
- Bounce and complaint handling
API Integration
- RESTful API for all operations
- Webhook support
- Easy integration with your applications
Production Considerations
For a production deployment, consider these improvements:
Database Security
# Change default credentials
POSTGRES_USER: your-custom-user
POSTGRES_PASSWORD: your-secure-db-password
Backup Strategy
Set up automated backups for your PostgreSQL data:
# Example backup script
docker exec listmonk_db pg_dump -U listmonk listmonk > backup-$(date +%Y%m%d).sql
Resource Limits
Add resource constraints to your containers:
deploy:
resources:
limits:
memory: 512M
cpus: '0.5'
Cost Comparison
Let's look at the numbers:
Mailchimp (10,000 subscribers): $99/month = $1,188/year
ConvertKit (10,000 subscribers): $119/month = $1,428/year
Listmonk Self-hosted: VPS ($20/month) = $240/year
Annual savings: $948-$1,188 with complete data ownership!
Troubleshooting Common Issues
Container won't start: Check your environment variables and ensure the database is healthy first.
Can't send emails: Verify your SMTP settings and check if your provider requires app passwords (Gmail) or API keys.
Performance issues: Monitor your database resources and consider upgrading your server if you have a large subscriber base.
Conclusion
Self-hosting Listmonk with Coolify gives you enterprise-grade email marketing capabilities without the recurring costs. You maintain complete control over your data while enjoying a modern, feature-rich platform that scales with your needs.
The initial setup might take 30 minutes, but the long-term benefits in cost savings, privacy, and control make it worthwhile for any serious content creator or business.
Ready to take control of your email marketing? Give Listmonk a try – your subscribers (and your wallet) will thank you!
Have you set up Listmonk with Coolify? Share your experience in the comments below! And if you found this guide helpful, don't forget to ❤️ and follow for more self-hosting tutorials.
Top comments (0)