A Guide to Self-Hosting Your Online Services
Take charge of your data by self-hosting email, chat, file sync, and more.
In a post-PRISM world, you've probably accepted the fact that the NSA, CIA, or some other three-letter agency will read your email, text messages, smartphone pictures, and basically anything else you send over the internet. And if it's not the government spying on you, it will be some monolithic corporation like Google or Facebook eager to catalog every minutia of your digital life so they can sell it to whatever advertising company comes along.
Many of the digital protocols in use today—such as email, XMPP, and CalDAV—were originally designed with self-hosting in mind. In ages past, universities, large companies, and even some nerdy individuals hosted their own mail servers and the like. It's only recently that we have traded our privacy for the walled-garden convenience of letting advertising companies handle all our data. Every online service costs some amount of money to operate, so if you aren't paying for it, then you are the product.
In this guide, I will share the steps I have taken to take back my family's digital privacy. By self-hosting online services like email, chat, file synchronization, calendar/contacts sync, and more, you can be the master of your data—and most of the time, your homegrown solution will work better than proprietary alternatives. All it takes is a little work, and I've already done the hard part for you.
The downside: it takes time and effort to get this stuff up and running. It's
fairly set-and-forget once you've configured everything, but you're essentially signing up to be
your own Systems Administrator. Nerds and techies will probably view it as a fun side project, but
it's definitely not for everyone.
I'm a FreeBSD guy, so I use
ARP Networks for my hosting. But I have used
Linode,
DigitalOcean, and
Vultr
in the past and been happy with them.
If you have an awesome home internet connection and a static IP address, you may be able to
get away with using a server in your house. However, many ISPs block certain ports—almost all of them
block port 25 for example—making hosting a mail server impossible. In addition,
most major email providers will reject mail from residential IP addresses due to spammers. For the
smoothest experience, nothing is going to beat a dedicated server or VPS in a colocation facility.
Along the way, I will point out some common-sense security measures you can take to keep
government agents and attackers from pwning your system. However, only you can judge
the security requirements and risk tolerance for your circumstances. The advice I give you may
prevent a script kiddie from brute-forcing your password, but it's unlikely to prevent a state-sponsored
actor from exploiting a zero-day in Postfix to gain access to your system. Ultimately, as long as your
server is hosted off-site, you are trusting someone with your data.
Friends of mine have often asserted that my self-hosting efforts are futile, because (1) the government
can probably crack most encryption protocols, and (2) most communication goes to someone else using Gmail
or Facebook, etc. To this I have the following replies:
With that out of the way, let's get to the guide!
The following links will become available as I get time to write these blog posts. I'll take you through
how I've set up each of the services below. I'm running everything on a FreeBSD server, so the instructions will be from
a BSD perspective. They should work equally well for most Linux distros with some minor tweaks.
What You'll Need
Some Notes on Security
Configuring Your Own Digital Empire