Kubernetes is overkill for most apps. Capistrano is outdated. Kamal (from 37signals/Basecamp) deploys Docker containers to any server with zero downtime — no orchestrator needed.
What Is Kamal?
Kamal deploys your containerized app to bare metal servers using Docker. It handles zero-downtime deploys, rolling restarts, SSL, and multi-server setups — without Kubernetes.
Quick Start
gem install kamal
kamal init
# config/deploy.yml
service: my-app
image: my-docker-user/my-app
servers:
web:
hosts:
- 1.2.3.4
- 5.6.7.8
worker:
hosts:
- 9.10.11.12
cmd: bin/jobs
registry:
username: my-docker-user
password:
- KAMAL_REGISTRY_PASSWORD
env:
clear:
DATABASE_URL: postgres://db.example.com/myapp
secret:
- RAILS_MASTER_KEY
- STRIPE_SECRET_KEY
traefik:
options:
publish:
- "443:443"
volume:
- "/letsencrypt:/letsencrypt"
kamal setup # First deploy — installs Docker, Traefik, deploys app
kamal deploy # Subsequent deploys — zero downtime
How Zero-Downtime Works
- Build new Docker image
- Push to registry
- Pull on servers
- Start new container
- Health check passes
- Traefik routes traffic to new container
- Stop old container
No dropped requests. No maintenance windows.
Key Commands
kamal deploy # Deploy latest version
kamal rollback # Rollback to previous version
kamal app logs # View application logs
kamal app exec 'bash' # SSH into container
kamal env push # Update environment variables
kamal traefik reboot # Restart the proxy
kamal audit # View deployment audit log
Why Kamal
| Feature | Kamal | Kubernetes | Capistrano |
|---|---|---|---|
| Complexity | Low | Very high | Medium |
| Zero downtime | Yes | Yes | Plugin |
| Multi-server | Yes | Yes | Yes |
| SSL | Automatic | Manual/Cert-Manager | Manual |
| Learning curve | 1 day | Months | 1 week |
| Cost overhead | $0 | Control plane cost | $0 |
Who Uses Kamal
- 37signals — Basecamp, HEY, ONCE
- Any Docker app — Rails, Node.js, Go, Python
Get Started
- Documentation
- GitHub — 11K+ stars
- Getting started guide
Deploying data pipelines? My Apify actors handle deployment automatically. Custom solutions: spinov001@gmail.com
Top comments (0)