How DHH Solved Deploying to Production (with Open Source)


How DHH Solved Deploying to Production
(with Open Source)

Ever felt depressed by the sheer complexity of getting your application live and serving users?

You’re not alone.

But what if deploying to production, even (or especially) across multiple servers, could be straightforward and more importantly, free?

That’s the reality DHH, the creator of Ruby on Rails and CTO of Basecamp & HEY, wanted to create, and he delivered with an open source tool called Kamal.

DHH’s approach to technology always involves simplicity, developer experience, and skepticism towards “the next big complex thing,” especially when it involves crazy monthly bills or vendor lock-ins.

He’s a well known proponent of a “do-it-yourself” approach when it makes sense, advocating for owning your own servers rather than being entirely reliant on the cloud.

Kamal, officially released by Basecamp, is the hate-child 👺 of DHH’s allergy to overpaying cloud bills.

It’s designed to make managing your own servers a breeze, by requiring nothing but an Ubunutu box with SSH. That's it.

The Deployment Dilemma: Complexity and Cost

Let’s be honest, deploying modern applications can be a nightmare.

You need to get your code onto servers, ensure it runs reliably, handle updates with zero downtime, manage sensitive information like API keys, and ideally integrate everything smoothly with your workflow using CI/CD.

Many devs and teams turn to powerful but often ungodly complex solutions like Kubernetes (or less crazy ones like Docker Swarm).

These are fantastic tools, but they come with a steep learning curve, and lots of base requirements. You might find yourself wrestling with concepts like leader and follower nodes, control planes, and worker setups, all before your app even sees the light of day.

The alternative?

Paid Platform-as-a-Service or managed services, like Fly, Heroku, Render etc.
These can simplify things but often lead to significant ongoing costs and can lock you into a specific provider’s ecosystem, reducing your flexibility.
For many, especially smaller teams or projects, these solutions can feel like using a sledgehammer to crack a nut (or this:)


Enter Kamal: The Open Source Answer

So, how did DHH decide to tackle this differently?

He built Kamal.
The core idea is radical simplicity without sacrificing power.

Imagine being asked to deploy a production-grade system, complete with all the bells and whistles, but with one crucial rule: no paid services.
Kamal is designed to win that game.

What makes Kamal stand out?

Simplicity is Key: Forget complex preconfiguration.
All Kamal needs is a list of your server IPs (fresh Ubuntu servers are perfect) and SSH access (yes, that's it).
Kamal handles the rest: even installing Docker if it’s not there.
You don’t even need to SSH into the servers yourself to get started.


Deploy Anywhere:

This simplicity means incredible flexibility.
Kamal can deploy your application to multiple cloud providers simultaneously, to your own bare-metal servers, or even to the Raspberry Pi on your shelf at home.
I actually deployed an app running in Paris with its cache (a Valkey instance) running on a completely different server on AWS in the United States! - (there was no real good reason to do that, pure curiosity, but it wokred!)

Production ready Features, built In:

Kamal isn’t just for hobby projects.
It handles zero-downtime deployments (rolling updates), manages your application secrets securely, and can automate SSL certificate provisioning and renewal using Let’s Encrypt – a huge win for anyone who had the pleasure of fighting with certificate expiry.

Open Source and Free:

As mentioned, Kamal is open source.
There's no premium features or tiers behind it.
This means no subscription fees, no vendor lockins, and a community driven tool that empowers you to own your servers.

Sensible Configuration:

You start off by running

kamal init

This will create a skeleton by dropping a bunch of basic configuration files to your project.

You define your application, servers, and other settings in a straightforward config/deploy.yaml file. Kamal also supports “accessories” – supporting services like databases or cache instances (like Redis or Valkey) that don’t need to be part of every rolling update of your main application.

Developer friendly:

Written in Ruby (you wouldn't expect anything else from the creator of Ruby on Rails, would you?), Kamal offers handy aliases for common commands, much like scripts in a package.json files on node projects, and hooks to run custom actions at different stages of the deployment process.

My world famous guestbook app ended up running across two continents in under a minute, with subsequent updates taking a similar amount of time.

With each update, all that's required is running

kamal deploy

Kamal will contact remote servers, update a new version, create a rolling update while maintaining incoming traffic through its proxy to maintain zero downtime deployments.

Kamal essentially bundles a set of machines together into a cluster you control, without the typical overhead.
If you’re tired of deployment complexity, looking to reduce hosting costs, or simply want more control over your infrastructure without becoming a full time sysadmin, Kamal is definitely worth exploring.

It shines for applications where you want the power of modern deployment practices without the operational burden of systems like full blown Kubernetes.

It’s a proof that robust infrastructure management doesn’t always require intricate systems or expensive contracts. Sometimes, a well-thought-out, simpler tool can be far more effective.

It's also a great reminder that some status quo's in tech can be questioned. I mean, I'd be thinking about swarm, k3s, nomad and a bunch of other options before even considering it can be done any other way...
While often controversial I highly recommend his blog and thoughts on tech life and in this case, infrastructure.

So, if the challenge of “production-ready in no time, with zero spend” resonates with you, give Kamal a look.

You might find it’s the breath of fresh air your production process needs.


Thank you for reading.
Feel free to reply directly with any question or feedback.
Have a great weekend!

ESPRESSO FRIDAYS

Every once in a while I send hand picked things I've learned. Kind of like your filter to the tech internet. No spam, I promise!

Read more from ESPRESSO FRIDAYS

The UNDERRATED Open Source Powering My HomeLab This issue is brought to you by: Secure Your AI Future at Snyk Launch 2025 Join Snyk Launch to discover how to establish a foundation to build securely and confidently in the age of AI. Register for Snyk Launch 2025 (It’s Free!) Kestra, an open-source automation platform that's been a game-changer for my homelab and, frankly, could be for a lot more. It's one of those tools that flies under the radar for too many people, but packs so much...

He Made $64K Searching GitHub With A GENIUS Trick (using open source only) This issue is brought to you by: TestSprite is the Easiest AI Agent for Software Testing Ensure End-to-End Confidence in Your Software Quality. LEARN MORE This, is the story of how one individual, "Mr. B," leveraged a deep understanding of Git's less-explored features to uncover secrets in public repositories, earning over $64,000 💰. His "genius trick" wasn't about finding new tools, but about using existing Git...

Google's Git Killer Is INSANELY Better (and it's open source) You saw the title. Bold claim, right? "Insanely better"? Than Git? Git is the foundation of modern software development. It started back around 20 years ago, when Linus tried to build his first Linux kernel, and had enough of SVN. So Linus being Linus, he just went ahead and built his own. But what if the way we've always done version control isn't the only way, or even the best way anymore? That's the core idea behind Jujutsu (jj)...