5 min read

How to self-host your Ruby apps

You have heard about good things about self-hosting and are looking for options that don’t require too much work. Proper dev ops… it’s no walk in the park and you don’t want to spend your time managing servers, setting up monitoring, security, TLS handling and other stuff.

There are some new tools like Kamal, but they only handle the deployment part and managing multiple apps can become a little complicated. On the other hand, if you’re using a PAAS provider, the price jump for multiple apps can be harsh for a solo dev or a small team.

But what if you could find a middle ground where you didn’t have to think about deployment or scaling and you could host your apps without feeling like you’re doing heart surgery? Deploying your apps can be done in less than half an hour without requiring you to handle every step of deployment, extra config files, reverse proxies, etc.

For this guide I used Miren, an open-source deployment platform that can be self-hosted on any cloud and provides a CLI to manage your apps. I was able to deploy 3 apps to the same machine and setup custom subdomains for each of them, you can see the end result here: www.gardenserver.com

Disclaimer

Self-hosting is not a good fit for everyone, although there’s been some significant improvements that make self-hosting more approachable, with a hosting platform you get multiple features out of the box. So please make sure you’ve considered the tradeoffs before hand. I wrote about this with more detail here: PaaS is dead, long live PaaS!

If you’re looking for a free/fast option to host your app, checkout the following resources:Guide to deploy a Rails app (in less than 10 minutes)How to deploy Ruby apps to the Miren demo cluster for freeHosting options to deploy a Ruby app (Free trials available)

Now, let’s get into it!

Get a Virtual Machine

The first step is to get a Virtual Machine. The recommended option for getting started is the CX23 from Hetzner, but you can choose any machine from any provider as long as it’s above the minimum system requirements.

In my case. I’m using Midstack. Kudos to @adam12 for providing some credits to spin up a machine to create this guide:

image

Setup Miren Cluster

Once the machine is up and running, the next step is to SSH into the server by opening your terminal and run the following command:

ssh ubuntu@55.59.71.33

Once you’re in, you’ll need to install the miren CLI. The steps vary depending on your operating system and architecture. Miren docs have a shell snippet for each configuration you can copy, below are the steps I followed for Linux x86_64:

Download package

$ curl -fLO https://api.miren.cloud/assets/release/miren/v0.7.1/miren-linux-amd64.tar.gz

Verify checksum

$ echo "fcd616000875ee16064f2eb3af633174febed9f8e06cb446cfda958f2115eff8  miren-linux-amd64.tar.gz" | shasum -a 256 -c

Extract and install

$ tar xzf miren-linux-amd64.tar.gz && sudo install -v -m 755 miren /usr/local/bin/

Finally you can run this command to verify it was installed correctly

$ miren version

  Version: v0.7.1
  Commit:  b35b2dfc8ab5bf0b06283a39b3461375a4f0747f
  Built:   2026-04-22 20:15:57 UTC

Next, run the following command to setup your server

$ sudo miren server install

If your server doesn’t meet the minimum requirements, you’ll get a warning like this:

This machine has 3.82 GB of memory, but Miren needs at least 4.00 GB.

  Disk space is a bit tight: 93.83 GB available at /var/lib/miren, we recommend 100.00 GB.

  If you know what you're doing, you can skip this check with --skip-system-check

In this case the machine is very close to what’s needed and only going to be used for testing, so it’s safe to re-run skipping the system requirements check:

$ sudo miren server install --skip-system-check

✓ Prerequisites verified (root, systemd)
  Skipping system requirements check (--skip-system-check specified)
  Release bundle not found at /var/lib/miren/release, downloading...
[========================================] 100.0% 96 B/96 B @ 920.09 KB/s ETA: 0s
Downloading from https://api.miren.cloud/assets/release/miren/v0.7.1/miren-base-linux-amd64.tar.gz
[========================================] 100.0% 98.01 MB/98.01 MB @ 76.39 MB/s ETA: 0s
✓ Release downloaded successfully
  Setting up cloud registration...
  Registering cluster 'MiyaGi' with https://miren.cloud...
✓ Registration initiated!
  Please approve the registration at: https://miren.cloud/clusters/register/reg-nothingburger92342?token=asdf.asdf
  Registration ID: reg-isdf934jf
  Expires at: 2026-05-13T20:45:35Z
  Waiting for approval

Visit the registration URL and approve the Cluster registration:

image
image

After you approve it, the cluster will show up in your Miren Cloud organization:

image

Back on the terminal of your server, you’ll see the following confirmation message:

  Installation complete!

  To check service status:
  systemctl status miren

  To view logs:
  journalctl -u miren -f

That’s all that’s needed on the server side, your cluster is now ready to host your apps.

Deploy your apps

You can follow these detailed steps to deploy 2 Ruby apps but now using your own cluster instead demo. You can also deploy apps in any of the supported languages.

Bonus: Setup custom domain

If you want to get fancy and have your apps hosted in a custom domain, that’s also possible with a couple of extra steps.

First, you’ll need to buy a domain and create a CNAME record pointing to your cluster. In my case I want to host all my apps under the same root domain, so I’ll only added a wildcard record. You’ll find the DNS hostname on the cluster details page inside Miren Cloud.

*.gardenserver.com -> cluster-yourClusterId.miren.systems
image|691x371.2426890864446
image

Finally, on the terminal run the necessary commands to setup the routes:

miren route set 'www.gardenserver.com' camping-demo
miren route set 'camping-demo.gardenserver.com' camping-demo
miren route set 'hanami-demo.gardenserver.com' hanami-demo
miren route set 'bridgetown-demo.gardenserver.com' bridgetown-demo

You can check the end result here: www.gardenserver.com

Capture d’écran, le 2026-05-22 à 10.03.10

Before you go

Thanks for reaching this far! If you find this guide helpful, please share it with your friends and enemies alike.

I would love to know if you’re able to deploy your apps using this guide or if you have any issues, please send your feedback. Feel free to share your experiences with hosting and deployment of your applications.

Happy deploying!