The Great WordPress Migration

In 2024 I finally migrated my WordPress blog (among other projects) from the cloud to a self-hosted Linux machine in my home office. All without exposing my private network to the world! Come join me on this journey as I explain my approach to owning my work and my own network.

I’ve had a blog of some form since college. During my undergrad years, I built static HTML pages using templates in FrontPage and uploaded them to the university FTP server. In grad school, a friend introduced me to WordPress and I set up a site on an inexpensive shared host.

Since then, I’ve dabbled with cloud-hosted VPS machines. I’ve leveraged Digital Ocean Droplets and Amazon EC2 instances. I’ve used fully managed hosts like Liquid Web and WP Engine. Today, my blog runs on none of these. And I couldn’t be happier.

The Cloud is Dead

There was nothing wrong with these other methods of hosting WordPress. The biggest problem for me was cost. After paying for a domain, I was still shelling out anywhere from $5 to $15 each month to run a server somewhere in the cloud to power my blog.1Yes, a basic EC2 server is relatively inexpensive. But this site isn’t the only one I had in the cloud. I had an instance for the blog, for a secret sharing service, for Mastodon, for my email, for NextCloud … The least expensive among them is the blog. But the total bill adds up quickly and was becoming untenable. Given my blog was just one of many services, this led to a monthly $100+ AWS bill. I needed to do something different.

Reading about how larger organizations like Basecamp had left the cloud made me wonder what it would take to do the same. Clearly I’m not serving hundreds of thousands of customers, so I don’t need expensive hardware. But could I reasonably replace my fleet of EC2 instances with something in my home office?

In short: Yes.

To start things off, I bought a new computer – a Beelink Mini PC – that could sit on my desk and be hardwired to my router. Then I wiped the whole thing of Windows and installed Pop!_OS, my favorite Linux distro. From there, it was a matter of rebuilding my cloud applications as Docker containers on the machine.2I’ll cover specific details about each application in the coming weeks … stay tuned. Now I had WordPress, a personal secret sharing tool, and even Mastodon hosted locally. I could finally spin down the dedicated EC2 boxes running each one!

Long Live the Cloud

I still faced one major problem – routing traffic from the public internet to my mini PC. In years past, I’d used a cron job on a Raspberry Pi to fetch my home’s public IP and set a CNAME record in Amazon’s Route53. This time around, though, I wanted to explicitly avoid exposing my home network to the world.

My solution is to leveraged the zero-trust app connector tool, Cloudflare Tunnel.

I installed a connector onto my mini PC, then configured routes for the hostnames I wanted exposed via Cloudflare. Their tool automatically routes traffic from the public web through their network (with DDoS protection) directly to my mini PC over that persistent connection without ever exposing the details of my home network to the world. It’s a win-win!

I’m currently writing this article on my primary Linux desktop machine, using a secondary Linux min server to host things, routing traffic through a Cloudflare Tunnel. It’s a miracle of modern engineering that this is all possible and I’m incredibly excited to share the journey with you!

  • 1
    Yes, a basic EC2 server is relatively inexpensive. But this site isn’t the only one I had in the cloud. I had an instance for the blog, for a secret sharing service, for Mastodon, for my email, for NextCloud … The least expensive among them is the blog. But the total bill adds up quickly and was becoming untenable.
  • 2
    I’ll cover specific details about each application in the coming weeks … stay tuned.