Essay - Published: 2025.12.19 | ansible | create | nomad |
DISCLOSURE: If you buy through affiliate links, I may earn a small commission. (disclosures)
I recently overhauled my hosting / deployment infrastructure as an incident followup to my site going down in 2025.11. Before that I'd moved from Coolify to Ansible and before that from serverless cloud hosting to my own infrastructure.
In this post we're going to walk through my current infra and why I chose it.

I have a 3 server (role) setup:
All servers are configured to be part of my Tailscale network which allows me to close most external ports on my servers while still allowing them to talk to each other. I also hook my personal computers up to the Tailscale network so they get privileged access to things like my analytics dashboards.
When I first started self-hosting, I chose Coolify - an opensource PaaS. This allowed me to get the price:performance ratio of a VPS while allowing me to manage my servers and apps with a cloud-like UI I was used to.
Coolify worked great for a couple apps but I realized that each new app required ab the same amount of effort to setup. I had to dive through UI flows, set various environment variables, copy/paste my configurations over. It wasn't terrible, but it felt like a lot of manual effort and opened the door to copypasta issues. Worse, if Coolify ever went down I'd have no way of recovering the setups I had before which would make disaster recovery tough
Coolify does support recover from backups but reliability is spotty and IME the server to server transfers are annoying so I often side stepped them by recreating the apps manually.
So I decided to move from Coolify to Ansible which gave me more control over my servers and all the config lived in code so I could easily reuse variables / configs across apps and map entirely new servers to host my infrastructure in a couple minutes. I've been able to prove this numerous times through my testing by spinning up new servers and flashing them with my setup.
I use Ansible to rollout my infrastructure in phases:
This is like my monitoring / supervisor server. It coordinates things and gives me a window into the other servers. If there's one special server it's this one as the others are more like workers that could be scaled 1...n but this one would be tough to do so.
The db server is where I host my databases. I chose to have it on its own server as I wanted to play around w multi-server paradigms and figured it would scale better - the apps and dbs won't fight for contention and I can scale them independently.
For my usecases this is WAY overkill but now I know how this stuff works which was worth it and I have peace of mind in case I accidentally create a smash hit app.
The app servers are built to be stateless workers. They're all setup the same and they receive Docker containers to run. The orchestration bit is managed by Nomad and each app server is a "client" to the analytics server's "server". The Nomad server looks at the workloads it has and chooses how to run them on the clients depending on data around app usage and reserved resources.
Each server has a traefik container on it that understands the config mapping of all the urls and can query Nomad to figure out where to redirect the request to hit the appropriate workload. In a more "production" setup I'd probably use Consul for a lot of its capabilities like service discovery but it was simpler for me to just stick w Nomad.
Previously I was spinning up the Docker Composes on servers directly via Ansible and having auto deploys via periodic pulls with Watchtower but I ran into a couple issues with it that led me to seek out alternatives. Primarily it seemed like I'd be reinventing the wheel for many things like health checks, blue / green deploys, push-based deploys, resource reservations, and container packing / orchestration. Ansible makes this a lot easier to manage because it's all in code BUT I don't necessarily want to have to maintain all that stuff - the best code is the code never written.
After researching other options Nomad seemed the most interesting because it stuck with IaC, has a lot of nice integrations / built-ins, is supported by a large co (Hashicorp for better or worse), and can scale to enterprise scale all without the "complexity" of a full-blown k8s. Only time will tell if this was a good decision or not but it seems to hit all the boxes I was looking for.
Way overkill but I wanted to try out multi-server and figured if I ever needed to scale - due to so many apps or users - I'd need to figure this out anyway. IaC makes multi-server configurations a lot easier (and maybe even feasible) so felt like a good time to make the leap.
DBs are typically the bottleneck in most apps so moving it to its own server is useful so it doesn't fight with apps for resources. Of course if an app gets super big then I'd probably move it and its db to separate servers but with IaC I've already got a blueprint for how that would work.
So there are a lot of different options out there for self hosting and they run the gamut from super flexible to opinionated and DIY to off the shelf.
Nomad seemed to fit in a gap where it was simpler than k8s but brought with it a lot of the common things I wanted - service discovery, orchestration, routing, health checks, blue / green deploys, resource reservations, etc. So I decided to try it and got smth working in a couple hours which was a good sign.
Cloud is expensive and has a lot of vendor-specific cruft associated with it like iam users, UI-based configurations, navigating how the various services connect w each other etc.
Self-hosting gives me more flexibility and control which lets me run my apps cheaper and how I want. Of course it takes a lot more time in setting it up and potentially ongoing maintenance so there's a tradeoff.
I was radicalized when I actually did comparisons in cost for price:performance while building CloudCompare - self hosting can often save you 10-100x over cloud for similar offerings.
Anyway that's how I'm currently running my setup. It probably will change in the future but for now I'm pretty happy with it and think it would work for me for the next couple years.
Let me know if you have questions or would like to see code / examples. I've got a lot I could clean up and share but not sure if anyone's interested and in what parts.
CTA: If you're curious ab self hosting and want to get some cheap, quality VPS - I like and use Hetzner and you can get $20 off Hetzner cloud when you use my link.
If you liked this post you might also like:
The best way to support my work is to like / comment / share for the algorithm and subscribe for future updates.