Self-Host Alternatives to Vercel and Netlify

4 min read

I have used Vercel for years before migrating my site from Next.js to Rails, simply because they are convenient. Then I wanted full control, and predictable costs as server horror stories kept piling up, and TBH I was scared of a sudden spiky in views.
So I tried three self-host paths that give you a good DX without giving your infra keys to a third party: Dokku, Coolify, and Kamal Deploy. I’ll be honest: none of these give you the full DX Vercel provides, you’re going to swap convenience for control, but if you like building things that don’t disappear when someone changes a pricing tier, they’re great.

Quick mental model before the list:
If you want Heroku-esque git push simplicity -> Dokku.
If you want a Netlify/Vercel-like UI and easier static/site workflow -> Coolify.
if you want Docker deploys across servers -> Kamal.

First things first: get yourself a server

You have many options here, the most common one is a VPS from Hetzner, Contabo or any other provider. They dirty cheap, some bucks for awesome processing power, below an example from Hetzner (it is the one I use and the one this site is running right now).
Hetzner Pricing
Other options could be a Raspberry Pi running in your home or even a normal PC, in any case, you need to install a Linux server image like Ubuntu Server which is the one I recommend. If you go with a VPS, usually, when you buy the service, it already installs the image and setups everything. The next part is to install the tool you gonna use to deploy your stuff.

Dokku

It is a Docker-based, self-hosted PaaS that runs on a single VM and can build from git push (Dockerfile or buildpacks). It wires nginx, manages process types, and is very scriptable. It has a similar experience to Heroku. You can add databases, redis, etc with plugins, there is a ton of them.

Once the first setup is done, it becomes pretty straightforward: git push = deploy.

Link to Dokku docs: https://dokku.com/docs/getting-started/installation/

Coolify

It is an open-source, self-hostable platform with a polished web UI that aims to replace the Netlify/Vercel experience on your own servers.

I think this one is the most appealing for most people since it mimics all the goodies Vercel offers like dashboard, teams, deploy from GitHub, etc. You can easily spin up databases, connect your git provider, configure domains and certificates and so much more via the UI.

As with Dokku, after the first setup, you can keep deploying your site with git.

Link to Coolify docs: https://coolify.io/docs/

Kamal Deploy

This is the one I using currently, mostly because Ruby on Rails kinda comes with it but it works for any Docker based deployment. It is a deployment tooling + proxy system that gives you zero-downtime deploys, rolling restarts, remote builds, and multi-server workflows for Dockerized apps. It’s made for people who want reliable production deploys without the Kubernetes tax.

I feel like Kamal is more “enterprise” in a way that it was designed for deploy in large servers fleets but it works flawlessly with small VPS too. It has some perks that may turn people off like the fact that you need a Docker registry like Docker Hub or AWS so your images are private.

It has less magic as it is imperative, you run a command and it deploys your current codebase.
 
 Link to Kamal docs: https://kamal-deploy.org/docs/installation/

That is it, this post is just to show you the available options we have nowadays, you can check in these tools sites how to install and use them. All cool options, far better than back in the days where we had to drag a bunch of PHP files and upload them using FTP to the server. Anyway, next time I’ll make a more detailed post on how to make a Linux server more secure and I’ll talk about backups, analytics, and observability, which are essential once your project starts making some bucks.

You might also like

Made with by David Martins