2 min read

The Cutest Staging Server, or: Fast, Cheap, and in Control

I'd like to introduce you to Monorail's staging server and container builder.
A very tiny computer, with two USB ports and a power button on the front.
🤓
This is a nerdier post about some technology choices I've made for Monorail app development and hosting. Feel free to skip it if that's not your thing!

Cloud computing is such a common choice these days that most people don't even think about the alternatives. There are plenty of reasons it's useful, of course, but sometimes it really is simpler and cheaper to own your own hardware.

You might have heard about this trend of companies like 37signals leaving the cloud, but I'm interested in a vastly smaller scale use case.

I'd like to introduce you to Monorail's staging server and container builder. That image up top is my GMKtec N97 Mini PC, with 12GB of RAM, a 256GB hard drive, and a 4-core Intel processor. It's running Ubuntu, and it sits on my desk.

These computers cost about $140 right now.

By comparison, a virtual machine with a similar processor and only 16GB RAM costs $160 per month on AWS, and storage would be at least another $20 per month for 256GB.

So that's $140 for probably at least a 3-year useful life. My AWS bill could be $6480 over that time period.

Are you going to run everything on this tiny, adorable computer?

Nope. I want my production systems to be more reliable than my office wifi. And I don't really want to be trying to maintain highly available hardware.

In production, I'm running a single instance on Hetzner. Right now, with relatively little traffic, it's doing just fine on a single cloud server that costs about $5.70 per month. Fun fact: it's so cheap, they don't even bill me monthly–a single month of use is less than their minimum charge.

Shouldn't prod be like staging?

Yeah, that's definitely a useful goal. But here's the thing: they're actually not that different.

I use Kamal to build and deploy containerized applications. It makes it really easy to run multiple apps and services on a single machine, while still keeping the benefits of isolated applications and dependencies. It's the same system in both staging and production.

Neither my staging server nor my production server are open to the internet. They're both on Tailscale, and I'm using Cloudflare's secure tunnel to proxy the web traffic and to map them both to internet-accessible domains. (Monorail.tech is running on that Hetzner server.) From the outside, too, they look the same in terms of security and accessibility.

Ok so it's cheaper. So what?

Sure, it saves me money to run things this way. But there's also something really satisfying about this little box on my desk that does exactly what I need.

It's a good reminder to me that if you take a little extra time to understand what's needed, you might end up with something that's better on multiple dimensions.

I like to approach all of my work this way, always thinking about the questions that actually matter most to me or my clients, and solutions that fit the circumstances.

And if I end up with an adorable computer on my desk, all the better.