Hosting your own email server costs $5-50/month for infrastructure plus 10-40 hours of setup and 2-8 hours/month of maintenance. Mail-in-a-Box and Mailcow are the easiest entry points. The hidden cost is deliverability — running your own outbound IP without warmup and reputation work means most mail goes to spam.
Setting Up Your Own Mail Server: Real Cost Breakdown
Setting up your own mail server is a popular search because the alternative (Google Workspace or Microsoft 365) feels expensive when you're managing five mailboxes. This guide is an honest cost and effort breakdown for running self-hosted email in 2026, what it actually takes to keep mail deliverable, and where the cost-benefit calculation works versus where it doesn't.
If you searched "install email server" expecting a 30-minute walkthrough, the install itself can be that short. The deliverability work after is where most self-hosters fail.
Direct infrastructure costs
| Component | Monthly cost | Notes |
|---|---|---|
| VPS (4GB RAM, 2 vCPU, 50GB) | $5-15 | Hetzner, Contabo, OVH allow port 25 |
| Domain | $1-2 amortized | $10-20/year |
| Backups (offsite snapshot) | $2-5 | Borg + B2 or similar |
| TLS certificates | $0 | Let's Encrypt, auto-renewed |
| Monitoring (UptimeRobot) | $0 | Free tier sufficient |
| Total minimum | $8-22/month | For ~10 mailboxes |
For 50+ mailboxes or bulk sending, scale to a $30-50/month server (8GB+ RAM, 4 vCPU). At ~50 mailboxes, you're roughly at the cost of a Google Workspace Business Starter seat per 6-7 mailboxes — the economics start to favor Workspace.
Practitioner note: AWS, Google Cloud, and DigitalOcean all block outbound port 25 by default and either won't unblock it or charge premium for it. Hetzner Cloud, Contabo, OVH, Vultr (request unblock), and Linode (request unblock) are the practical hosts. Hetzner is my default at €4.51/month for the smallest CX22 instance.
Time costs (the hidden expense)
Initial setup (8-40 hours total):
- VPS provisioning and OS hardening: 1-2 hours
- Mailcow or Mail-in-a-Box install: 1-3 hours
- DNS configuration (MX, SPF, DKIM, DMARC, PTR): 1-2 hours
- TLS certificates and renewal automation: 30 minutes
- Webmail customization: 1-2 hours
- Backup setup: 2-3 hours
- IP warmup (calendar time, not active hours): 30 days
- Documentation of your setup: 2-4 hours
Monthly maintenance (2-8 hours):
- Security updates (
apt update && apt upgrade+ container updates) - Log review for delivery issues
- Backup verification
- Anti-spam tuning
- TLS certificate health checks (usually automatic)
Annual surprise work (5-20 hours):
- Major OS upgrade
- Mail server major version upgrade
- IP changes if you migrate hosts
- Recovery from a blocklist (if you end up on one)
Software options
The realistic choices:
| Stack | Setup difficulty | Best for |
|---|---|---|
| Mail-in-a-Box | Easy | 1-10 mailboxes, learning |
| Mailcow | Medium | 10-200 mailboxes, production |
| Postfix + Dovecot manual | Hard | Custom requirements, sysadmins |
| Postal | Medium | Outbound bulk SMTP relay |
| KumoMTA | Hard | High-volume MTA replacement |
For setup guides on each, see Mailcow setup, Postal setup, KumoMTA setup, and Postfix/Dovecot setup.
The deliverability tax
This is the cost that breaks most self-hosted mail projects. A fresh VPS IP has no sending history. Mailbox providers default-suspect it. Your first sends will go to spam or be deferred entirely.
To recover:
- Warm the IP slowly. Start with 20-50 messages/day to your most engaged recipients. Double weekly until you hit your real volume after ~30 days.
- Set up reverse DNS (PTR) matching your hostname. Your VPS provider does this — file a ticket if not automatic.
- Pass SPF, DKIM, DMARC. All three, aligned. See the email authentication guide.
- Monitor reputation via Google Postmaster Tools and Microsoft SNDS.
- Stay off blocklists. Use a tool like MXToolbox to monitor.
Practitioner note: The first time I set up a personal mail server on Hetzner, my outbound mail to Gmail went to spam for three weeks despite perfect authentication. Warmup is real even at low volume. Sending 5 messages a day from a brand-new IP looks suspicious to receivers because most legitimate mail comes from established infrastructure.
When DIY makes sense
- Privacy-focused personal email for 1-5 users
- Learning email infrastructure (recommended — you'll never understand mail until you've run a server)
- Small business under 10 employees with technical staff
- Internal-only mail (no external recipients to worry about deliverability)
- Outbound bulk sending with serious MTA software (Postal, KumoMTA)
When DIY doesn't make sense
- Critical business mail where downtime costs money
- No dedicated sysadmin time for monthly maintenance
- High inbound spam volume (managed services have better filtering)
- You hate yak-shaving on TLS renewals, IP reputation, and spam tuning
The honest comparison: Google Workspace at $7/user/month for 10 users is $70/month and gets you 99.9% uptime, professional filtering, and zero ops. A self-hosted setup is $20/month plus 4 hours of your time. Hourly rate matters.
Comparing total cost of ownership
For a 10-user, 12-month period:
| Setup | Year 1 cost | Year 2+ cost | Reliability |
|---|---|---|---|
| Google Workspace | $840 | $840 | 99.99% |
| Microsoft 365 | $720 | $720 | 99.99% |
| Mailcow self-host (your time = $0) | $264 + 40 hrs | $264 + 40 hrs/year | 99.0% |
| Mailcow self-host (your time = $100/hr) | $4,264 | $4,264 | 99.0% |
Time matters. At engineer rates, self-hosting only pays off if you treat the time as learning or if you have spare ops capacity already.
If you want help deciding whether to self-host or migrate to a managed provider, book a consultation. I do email infrastructure audits for small businesses and walk through the actual cost-benefit for your specific situation.
Sources
- Mail-in-a-Box documentation — Mail-in-a-Box
- Mailcow documentation — Mailcow
- Postal documentation — Postal
- Google Workspace pricing — Google
- Hetzner Cloud pricing — Hetzner
- M3AAWG IP warmup recommendations — M3AAWG
v1.0 · May 2026
Frequently Asked Questions
How do I install an email server?
Install on a Linux VPS (Ubuntu LTS recommended). Easiest path: Mail-in-a-Box or Mailcow, both bundle Postfix, Dovecot, anti-spam, and webmail with one-line installers. For more control: Postfix + Dovecot manually. You also need SPF, DKIM, DMARC, MX, PTR DNS records and a clean IP.
How can I set up my own email server?
Pick a VPS host that allows outbound port 25 (Hetzner, Contabo, OVH — not AWS, GCP, or DigitalOcean by default), provision Ubuntu 22.04+ with at least 4GB RAM, install Mail-in-a-Box or Mailcow, configure DNS records, get a TLS certificate, and warm up your sending IP slowly. Plan 8-20 hours for first setup.
How to create your own webmail server?
Use a packaged solution that includes webmail by default. Mailcow ships with SOGo. Mail-in-a-Box includes Roundcube. Both expose webmail at a subdomain (typically webmail.yourdomain.com) automatically. For DIY: install Roundcube or SnappyMail and point it at your IMAP server.
How to setup an email server on Linux?
On a fresh Ubuntu LTS server: 1) Set hostname and reverse DNS (PTR), 2) Install Mailcow with `git clone https://github.com/mailcow/mailcow-dockerized && ./generate_config.sh`, 3) Configure your DNS records (MX, A, SPF, DKIM, DMARC), 4) Start Mailcow with `docker compose up -d`. Total time: 2-4 hours if everything goes right.
Is hosting your own email server worth it?
Depends. For privacy enthusiasts, small businesses with 1-5 users, or developers who want learning: yes. For production business email where downtime hurts: probably not — Google Workspace or Microsoft 365 at $6-7/user is more reliable than DIY. For bulk sending: only with a serious MTA like Postal or KumoMTA, not generic mail servers.
Want this handled for you?
Free 30-minute strategy call. Walk away with a plan either way.