Русский flag Русский

Kamal: a revolution in deployment, or how to escape cloud slavery

Published on 2025-12-23

Over the last ten years the web application deployment industry has evolved from FTP scripts and rsync to highly complex orchestration systems. Today developers and small teams increasingly face a difficult choice:

  • either pay a significant premium for the convenience of PaaS platforms (Heroku, Render, Fly.io),
  • or dive into the cognitive and operational complexity of Kubernetes.

Kamal offers a third way: the convenience of modern cloud services — on your own server.


What is Kamal

Kamal is an open-source CLI tool from 37signals (the creators of Basecamp and Ruby on Rails) designed to deploy web applications on top of Docker without Kubernetes.

The key idea of Kamal is simple:

a server is just a place for containers, and deployment should be reproducible, predictable, and inexpensive.

Kamal was originally created for Rails applications, but today it is completely language-agnostic. If an app can be packaged into a Docker image — Kamal can deploy it.

Supported scenarios:

  • bare metal;
  • VPS in any cloud (AWS, DigitalOcean, Hetzner, Yandex Cloud);
  • hybrid configurations;
  • migrations between providers.

Explanatory analogy

Imagine deployment as housing:

  • PaaS (Heroku) — a room in an expensive hotel. Everything is included, but you pay for every convenience and cannot change anything.
  • Kubernetes — building a skyscraper. Full control, but you need a staff of engineers just to maintain the infrastructure.
  • Kamal — a modern modular house. You can place it on any lot (server), and if necessary — move it whole.

What it looks like in practice

Unlike Kubernetes with its dozens of YAML manifests, Kamal’s configuration fits in a single file config/deploy.yml.

Example of a minimal but real config:

# Название сервиса
service: my-app

# Docker-образ
image: user/my-app

# Список серверов
servers:
  web:
    - 192.168.0.1
    - 192.168.0.2

# Реестр контейнеров
registry:
  server: ghcr.io
  username: user
  password:
    - KAMAL_REGISTRY_PASSWORD

# Переменные окружения
env:
  secret:
    - RAILS_MASTER_KEY
    - DB_PASSWORD

Running the deploy:

kamal deploy

What Kamal does during deploy

Behind a single command there is a clear and transparent process:

  1. Build — build the Docker image.
  2. Push — push the image to the container registry.
  3. Pull — pull the image to the servers.
  4. Boot & Switch — start the new container and atomically switch traffic.

The result — a zero-downtime deploy without load balancers, ingress controllers, or complex schemes.


Key technical features

1. Zero-downtime and kamal-proxy

Starting from version 2.0 Kamal uses its own proxy — kamal-proxy, dropping Traefik.

This provides:

  • retention of active connections;
  • switching traffic only after a healthcheck;
  • no external ingress dependencies.

For the user the update is completely invisible.


2. Automatic server provisioning

Command:

kamal setup

Automatically:

  • installs Docker;
  • configures dependencies;
  • prepares the server for deployment.

Requirements are minimal:

  • a clean Ubuntu;
  • SSH key access.

3. Accessories: databases and services alongside

Kamal can manage auxiliary services — databases, Redis, queues.

MySQL example:

accessories:
  db:
    image: mysql:8.0
    host: 192.168.0.1
    env:
      MYSQL_ROOT_PASSWORD: <%= ENV["DB_PASSWORD"] %>

This is convenient for:

  • pet projects;
  • MVPs;
  • early-stage startups.

For high-load systems it’s still better to separate databases.


Kamal vs the rest of the world

CriterionKubernetesPaaSKamal
ComplexityVery highMinimalLow
CostInfrastructure + DevOpsHigh markupOnly the server
Vendor lock-inNoYesNo
ControlFullLimitedHigh
Target audienceEnterpriseMVPs without DevOpsStartups, agencies, indie

Why Kamal is better than Capistrano

Capistrano was long the standard in the Ruby world, but Kamal addresses its systemic problems:

  • dependencies no longer live on the server;
  • no need to manage language versions;
  • the server becomes a disposable resource.

When Kamal is not suitable

Kamal is not a silver bullet.

It is not the best choice if:

  • aggressive auto-scaling is required;
  • load spikes by orders of magnitude;
  • a complex service-mesh architecture is needed.

In such cases Kubernetes remains justified.


Conclusion: the philosophy of independence

Kamal is not just a deployment tool. It’s a manifesto of independence:

  • minimal costs;
  • full control;
  • no vendor lock-in;
  • easy migration between clouds.

A €50 VPS on Hetzner instead of €300 on AWS — without losing convenience.

Related reviews

Huge thanks to Mikhail — I contacted him about a very urgent server setup issue because I'm not strong in that area and needed to show the site to a client. Quick response, no-nonsense help, and very fast! Wishing you many orders and a better rating. Thank you so much!

Ekleo

Ekleo · VPS setup, server setup

A very powerful buyer

2025-11-28 · ⭐ 5/5

Many thanks to Mikhail — I reached out to him with a very urgent issue regarding server configuration, since I'm not very skilled in this myself and needed to show the site to the client. Quick response, help without unnecessary words and very fast! I wish you many orders and a better rating! Thank you so much!

Need help?

Get in touch with me and I'll help solve the problem

Related Posts