Skip to content
FossShelf
Home / Categories / For DevOps Engineers

Kamal

Zero-downtime Docker deploys to any server, no managed platform.

Replaces Fly Io, Heroku, Render, Railway, Digitalocean App Platform, Porter

14.73K starsMITreviewed 22 Oct 2026last commit 14 Nov 2026
Screenshot of Kamal

Who it's for

Teams migrating off Heroku or Render to cut costs

Kamal gives you Heroku-like deployment commands (push to deploy, rolling restarts, zero downtime) on servers you rent at commodity prices. A team moving from Heroku's Performance dynos to a Hetzner or DigitalOcean server can cut hosting costs significantly while keeping the same deployment workflow.

If your team has no Linux or Docker experience and no interest in managing servers, a managed platform is still the better choice. Kamal reduces deployment complexity but does not eliminate server management.

Rails developers deploying to their own infrastructure

Kamal was built by the Rails team and is used in production at 37signals to run HEY email and Basecamp. It supports the standard Rails asset pipeline, web and worker process splits, and database migration hooks, making it a first-class deploy tool for Rails apps on servers you own.

If your Rails app is small enough that a low-cost managed instance covers your needs, the overhead of managing your own server is probably not worth it yet.

DevOps teams building cloud-agnostic deploy pipelines

Kamal's config file takes a list of IP addresses, making it trivially portable across cloud providers. Teams that want to avoid committing to a single cloud vendor, or that want to burst to a second cloud during traffic spikes, can use Kamal to maintain a provider-agnostic deploy pipeline.

If your deployment requirements include auto-scaling, complex load balancing, or multi-region failover at the infrastructure level, a Kubernetes-based setup or managed Kubernetes service is a better fit.

The problem

Managed deployment platforms like Heroku, Fly.io, and Render make it easy to ship web apps, but the cost of that convenience compounds over time. As traffic grows, monthly hosting fees on managed platforms can reach several times what equivalent server capacity would cost from a bare-metal or low-cost cloud provider. Teams that want to migrate off those platforms face a real problem: the tooling they relied on for deployments is tied to the platform, and rebuilding the deployment pipeline for self-managed servers has historically required learning Kubernetes or Docker Swarm. Neither option is ideal for most teams. Kubernetes is powerful but operationally heavy, demanding dedicated infrastructure expertise to run safely. Docker Swarm is simpler but uses a declarative model that is harder to debug than direct imperative commands. Teams that just want to deploy a containerized app to a cheap server are caught between expensive managed platforms and complex self-hosted orchestration tools.

How it works

Zero-downtime rolling deploys

Kamal deploys a new Docker image alongside the running container, waits for the health check to pass, then switches traffic atomically. Requests never hit a container that is not yet ready. Rolling restarts replace containers one server at a time, so multi-server setups stay live throughout the deploy.

SSH-based server provisioning

Point Kamal at any vanilla Ubuntu server with an SSH key installed and it auto-provisions Docker, pulls your image, and starts the app. No Ansible playbooks, no pre-baked images, and no cloud-specific tooling. A server can go from fresh to running in minutes with no manual preparation.

kamal-proxy for traffic switching

Kamal includes kamal-proxy, a purpose-built proxy that handles traffic switching between old and new containers during deployments. It serves as the HTTP entry point, managing health checks and routing so your app stays available during every deploy.

Accessory service management

Kamal can manage accessory services (databases, caches, queues) on your servers alongside your main app container, using the same Docker-based model. You define accessories in your config file and deploy them with the same commands as your app.

Remote Docker builds

Kamal supports building Docker images on a remote builder machine rather than locally, which speeds up CI and deployment pipelines for teams with slow local machines or when building images for different server architectures.

Features

  • Zero-downtime rolling deploys
  • SSH-based server provisioning
  • kamal-proxy for traffic switching
  • Accessory service management
  • Remote Docker builds

How to install

Install Kamal as a Ruby gem, then run setup to provision your servers and start the first deploy.

gem install kamal
kamal setup

Recommended for this setup

Strengths

  • MIT license with full provider portability: Kamal is MIT-licensed and has no dependency on any hosting provider. You run it against servers from any provider, including Hetzner, OVH, DigitalOcean, or your own bare metal. Switching providers means updating a list of IP addresses in the config file, not rebuilding your deployment pipeline.
  • No server prerequisites beyond SSH access: Kamal requires nothing more than a fresh Ubuntu server with an SSH key. Docker is installed automatically. No pre-built machine images, no Ansible playbooks, and no cloud-provider-specific tooling. This makes it practical to provision new capacity quickly across multiple clouds.
  • Production-validated by 37signals at scale: Kamal was built by 37signals to run HEY email and Basecamp on their own hardware after migrating off cloud platforms. It is not a hobby project: it is the deploy tool 37signals uses in production every day, which means its sharp edges have been worked out against real high-availability workloads.
  • Simpler mental model than Kubernetes: Kamal uses imperative commands: each deploy step is a direct action you can trace, not a diff against a desired cluster state. Teams familiar with Capistrano or Heroku's CLI find the model familiar. For the typical web app running on a few servers, Kamal's complexity ceiling is far lower than Kubernetes.

Trade-offs

  • Requires Ruby to run deploys: Kamal is written in Ruby and must be installed as a Ruby gem. Teams without Ruby in their toolchain need to add it to their local environment or CI setup. The servers themselves do not need Ruby, but the machine that runs Kamal deploys does. A Docker-based runner is available for CI environments that prefer not to install Ruby directly.
  • Not designed for complex orchestration at scale: Kamal's imperative model works well for single-app and small multi-server deployments. It does not provide Kubernetes features like auto-scaling, complex service mesh configurations, or cluster-level resource management. Teams running hundreds of containers across dynamic node pools need a container orchestrator, not Kamal.
  • Young project with 162 open issues: With 162 open issues at time of writing, there are real rough edges to be aware of. Many stem from edge cases in Docker networking, proxy configuration, and multi-region deployments. The project is actively maintained, but it is young and may require workarounds on less common infrastructure setups.

Tech stack

Languages
Ruby, Shell, Dockerfile, HTML
Frameworks
—
Databases
—
Tooling
—

FAQ

Is Kamal free to use?

Yes. Kamal is MIT-licensed and free to use with no restrictions. You install it as a Ruby gem and run it against servers you rent or own. The cost is your server infrastructure, not any Kamal licensing fee. There is no paid tier or managed offering from the Kamal team.

What operating system do my servers need to run Kamal?

Kamal officially targets Ubuntu and other Debian-based Linux servers. You need a fresh server with SSH key access; Kamal installs Docker automatically on first setup. Other Linux distributions work in practice but are less tested. Windows servers are not supported.

Does Kamal work with non-Rails apps?

Yes. Kamal deploys any app that can be packaged as a Docker image. It was originally built for Rails but works with Node.js, Python, Go, and any other web framework. The only requirement is that your app runs in a container and exposes an HTTP endpoint for health checks.

How does Kamal compare to Kubernetes for web app deployment?

Kamal is significantly simpler than Kubernetes for typical web app deployments. Kubernetes provides features like auto-scaling, service mesh, and complex scheduling that most web apps do not need. Kamal uses direct SSH commands and Docker, which is easier to understand and debug. The tradeoff is that Kamal does not scale to the cluster-management complexity that Kubernetes handles.

Can I use Kamal with any cloud provider?

Yes. Kamal works with any server accessible over SSH, regardless of provider. Common choices include Hetzner, DigitalOcean, OVH, AWS EC2, and bare metal colocated servers. You provide a list of IP addresses in the config file and Kamal handles the rest. Switching providers means updating that IP list.

Similar tools

More in DevOps Engineers