Writing · essay
Why I still run my own servers and mail
I self-host web, DNS, SSL and mail because it teaches every layer and gives me control. It also has real costs, and plenty of businesses should not do it.
I run my own Linux servers. Web, DNS, SSL certificates and a self-hosted mail server with SPF, DKIM and DMARC. I handle the backups, the deployments and the security hardening. This site is served from one of them.
People sometimes find that odd. Managed hosting is cheap, and hosted email is easy. Why take on the work?
The short answer is that running the stack myself is how I understand it. And understanding it is what lets me diagnose problems quickly for everyone else. The longer answer includes some honest caveats, because self-hosting is not the right call for most businesses.
Understanding every layer
In every web problem eventually becomes a systems problem I argued that the website, tracking, server, forms and email are one machine. Running my own servers is how I keep that whole machine in my head.
When you own every layer, you learn things a managed dashboard hides from you:
- How DNS changes actually propagate, and what a wrong record does in practice.
- How SSL certificates are issued and renewed, and what breaks when renewal fails.
- How the web server, PHP and the database compete for memory and CPU under load.
- How caching behaves when the server is busy versus idle.
- How mail gets accepted, rejected or quietly sent to spam, and why.
That knowledge pays off when I'm looking at someone else's site. If a client's site is slow, I'm not guessing about server overload or caching. If their form notifications aren't arriving, I know where to look. It's the reason inspect the system before trusting the symptom is more than a slogan for me. I can only inspect what I understand.
Control
The second reason is control. On my own servers I decide what runs, what's installed, what's logged and what gets exposed to the internet. There's no platform deciding to change a setting on my behalf, no upsell for a feature that's a configuration line, and no waiting on a support ticket to find out why something failed.
That control also matters for the work I do with AI. I run scheduled AI agents on my own infrastructure, with health checks, failure alerts and a human approval step before anything ships. I use Claude Code over SSH every day. Doing that responsibly means knowing exactly what the machine can reach and what it's allowed to change.
Mail is the hard part
Of everything I self-host, mail is the most demanding, and the most instructive.
Sending mail is easy. Getting it delivered is not. Receiving servers decide whether to trust your mail based on several signals, and you have to get all of them right:
- SPF publishes which servers are allowed to send mail for your domain.
- DKIM signs each outgoing message so the receiver can verify it wasn't altered and really came from your domain.
- DMARC tells receivers what to do when SPF or DKIM checks fail, and sends you reports so you can see who is sending as your domain.
- Reputation covers the history of your sending IP and domain. A clean setup can still land in spam if the IP has a poor history or sending patterns look suspicious.
- Reverse DNS should match, so the sending IP resolves back to a sensible hostname.
A simplified example of what the DNS side can look like:
example.com. TXT "v=spf1 mx -all"
mail._domainkey.example.com. TXT "v=DKIM1; k=rsa; p=<public key>"
_dmarc.example.com. TXT "v=DMARC1; p=quarantine; rua=mailto:dmarc@example.com"
Records like these are only part of it. The mail server has to sign correctly, the IP has to stay clean, and you have to watch the reports. But running mail yourself teaches you exactly why a business's contact form notifications end up in spam, which is one of the most common and most expensive quiet failures I see.
What self-hosting actually requires
If you run your own servers, these aren't optional:
- Backups, tested. Automated, stored off the server, and restored on purpose from time to time to confirm they work.
- Security hardening. Key-based SSH, a firewall, minimal open ports, services running with only the permissions they need, and prompt patching.
- Monitoring and alerts. Uptime checks, disk space, certificate expiry, mail queue health. You want to hear about a problem before anyone else does.
- Updates on a schedule. Operating system, web server, PHP, database, mail software. Deferred updates become emergencies.
- Documentation. How the server is set up, where things live, how to rebuild it. Future you will need it.
- Someone on call. When the server goes down, it's your problem, whatever the hour.
The honest costs
Self-hosting costs time, attention and responsibility. The hosting bill might be lower, but the real cost is the hours spent maintaining it and the risk you carry when you get something wrong. A missed patch, a full disk or an expired certificate is entirely on you.
Mail in particular can go wrong in ways that are slow to recover from. If a sending IP gets a bad reputation, it can take time and effort to rebuild trust with the major mailbox providers.
When a business should not self-host
For most businesses, my advice is not to do what I do. Self-hosting is a poor fit when:
- Nobody on staff has the skills or the time to maintain servers.
- Email is business-critical and there's no one to monitor deliverability.
- Downtime is expensive and there's no plan for who responds at night or on weekends.
- Compliance requirements call for audited, documented controls you aren't prepared to maintain.
- The only reason is saving a few dollars a month.
In those cases, good managed hosting and a reputable hosted email service are the better choice. What I'd still recommend is understanding the pieces: know where your DNS lives, confirm SPF, DKIM and DMARC are set up correctly for every service that sends as your domain, own your accounts in the business's name, and know where your backups are.
Why I keep doing it
I keep running my own servers because it keeps me honest. Every recommendation I make about hosting, caching, email or security is grounded in something I maintain myself. When I say a setup is simpler or riskier, it's because I've lived with both.
You don't have to run your own mail server to benefit from that. You just need someone in your corner who understands every layer well enough to tell you which ones are worth owning and which ones you should hand off.