---
title: "Vendor-Independent Deployments with Kamal"
description: "We have deployed a lot of projects to Heroku and Dokku. With Kamal we build deployments that aren't tied to any single hosting provider."
url: "https://qameta.com/vendor-independent-deployments-with-kamal/"
---

# Vendor-Independent Deployments with Kamal

We have run a lot of deployments on both [Heroku](https://www.heroku.com) and
[Dokku](https://dokku.com) - a managed PaaS on one side, a self-hosted PaaS on
the other. [Kamal](https://kamal-deploy.org) lets us take the best of both:
Heroku-style `git push` simplicity, running on any server you control, with
no platform lock-in.

## Why vendor independence matters

* Heroku's pricing and platform decisions are out of your hands
* A self-hosted PaaS like Dokku ties you to how that one server is set up
* Kamal deploys plain Docker containers over SSH to any server - a $5 VPS, a
  bare-metal box, or a cluster of them
* Moving providers becomes a DNS and server change, not a re-platforming
  project

## What we set up

* Dockerizing the application if it isn't already
* Kamal configuration for web, background job, and cron/recurring processes
* Zero-downtime deploys with health checks and automatic rollback
* TLS and load balancing through Kamal's built-in proxy
* Wiring deploys into [Continuous Integration](https://qameta.com/continuous-integration/) and
  [Continuous Delivery](https://qameta.com/continuous-delivery/), the same way we do for
  Heroku and Dokku deployments

## From experience

We are just as comfortable with the platforms Kamal is meant to be an
alternative to - see how we run background workers and databases on Dokku:

* [Control Resque through Capistrano using systemd](https://qameta.com/posts/control-resque-throuh-capistrano-using-systemd/)
* [Deploy Ruby on Rails 7.0 to Dokku micro PaaS](https://qameta.com/posts/deploy-rails-7-0-to-dokku-micro-paas/)
* [Deploy Vaultwarden Password Manager to Dokku Micro PaaS](https://qameta.com/posts/deploy-vaultwarden-password-manager-to-dokku-micro-paas/)

## Summary

Heroku and Dokku both got projects shipped fast, but both tie the deployment
to one specific platform. Kamal gives us that same fast, repeatable deploy
experience while keeping the application portable to any server that can run
Docker.

Want to get off Heroku, or make your Dokku setup portable? [Get in touch](mailto:info@qameta.com).
