David Heinemeier Hansson (DHH) advocates for "The Cloud Exit" to escape high costs and vendor lock-in. Big tech companies want developers to believe that running their own servers is complex and risky, but this is far from the truth. Basecamp has been vocal about this issue and has developed Kamal, a tool that simplifies deploying containers to any server.
They are a cost-effective platform that is 50 - 70% cheaper than the big cloud providers.
Create a New Server
Let's get you set up on a minimal server that I'm using to host several blogs just like this one. For simplicity, we'll use the default network and assign a Public IP address.
I'm choosing the standard server type, Ubuntu (Noble) with 1 CPU, 2GB RAM, and 25GB storage. This will cost $0.03/hour or about $21 a month.
Create a new SSH key & start the instance!
Create New Instance
Configure SSH and Security Settings
Before we do anything we need to get your new instance connected to the internet. We will be adding a firewall and port forwarding rule for 443.
You should also lock down port 22 to your IP address.
Ok it's time to run "kamal setup". On first run you'll likely get an error. You'll need to add run the following command to add docker to the correct group.