kamal
БесплатноБез исполняемых скриптовНе проверенDeploy web applications to any server with Kamal — zero-downtime Docker deployments without Kubernetes. Use when someone asks to "deploy to a VPS", "deploy…
от TerminalSkills★ 221 звезда на GitHubОб этом скилле
Kamal
Overview
Kamal (formerly MRSK) deploys containerized web apps to any server — VPS, bare metal, cloud VM — with zero downtime and no Kubernetes. Created by 37signals (Basecamp/HEY), it builds your image, pushes it to a registry, and over SSH starts the new container behind kamal-proxy, which switches traffic once the container passes its health check. kamal-proxy also terminates HTTPS with automatic Let's Encrypt certificates. Current release: 2.12 (June 2026).
Kamal 2 replaced Traefik with kamal-proxy. Older tutorials (and Kamal 1 configs) use a traefik: block, traefik.http.routers… labels, a top-level healthcheck: and a .env file for secrets; none of that applies to Kamal 2, which reads secrets from .kamal/secrets (the env.clear/env.secret keys remain). Migrate a 1.x project with kamal upgrade.
When to Use
- Deploying to VPS/bare metal servers (Hetzner, DigitalOcean, Linode)
- Zero-downtime deployments without Kubernetes
- Migrating off Heroku/Railway to self-hosted
- SSL, rolling deploys and health checks with minimal config
- Multiple servers with different roles (web, worker)
Instructions
Setup
gem install kamal # or: bundle add kamal --group development
kamal version
# Create config/deploy.yml and .kamal/secrets in your project
kamal init
Without Ruby, run the official image through a shell alias (see the installation page on kamal-deploy.org); note that the usual alias mounts the Docker socket, which gives the container root on your machine, so prefer the gem.
Your app needs a Dockerfile, and it should answer GET /up with HTTP 200 (the proxy's default health check path).
Configuration
# config/deploy.yml
service: orders-api
image: acme-dev/orders-api
servers:
web:
hosts:
- 167.235.1.100
worker:
hosts:
- 167.235.1.102
cmd: node worker.js # worker role runs no proxy
proxy:
ssl: true # Let's Encrypt via kamal-proxy; needs one web server
host: orders.acme-dev.io # must resolve to the server, ports 80 and 443 open
app_port: 3000 # default is 80
healthcheck:
path: /up # default; interval and timeout are also configurable
registry:
server: ghcr.io
username: acme-dev
password:
- KAMAL_REGISTRY_PASSWORD
builder:
arch: amd64 # build for the servers' architecture
env:
clear:
NODE_ENV: production
PORT: 3000
secret:
- DATABASE_URL
- SECRET_KEY
accessories:
db:
image: postgres:16
host: 167.235.1.100
port: "127.0.0.1:5432:5432" # bind to localhost; a bare 5432:5432 is public
env:
clear:
POSTGRES_USER: orders
POSTGRES_DB: orders
secret:
- POSTGRES_PASSWORD
directories:
- data:/var/lib/postgresql/data
Notes: proxy.ssl: true works only when deploying to a single server with host set. With several web servers, put a load balancer in front, or supply your own certificate with ssl: {certificate_pem: CERT_SECRET, private_key_pem: KEY_SECRET} (names of secrets). When ssl is on, kamal-proxy stops forwarding X-Forwarded-* headers unless you set forward_headers: true. Other useful keys: response_timeout (default 30 s), ssl_redirect, path_prefix, buffering. Run kamal docs proxy for the full list. Configuration for a staging copy goes in config/deploy.staging.yml and is selected with -d staging.
Deploy
kamal setup # first time: installs Docker, boots kamal-proxy and accessories, deploys
kamal deploy # build, push, start new container, switch traffic
kamal redeploy # deploy without bootstrapping servers or touching the proxy
kamal deploy --version=3f9c2ab # deploy a specific git version
kamal rollback 3f9c2ab # VERSION is required; list versions with `kamal app containers`
kamal details # containers on all servers
kamal app version # version currently running
kamal audit # audit log of past actions
kamal app logs -f # follow logs
kamal app exec "node scripts/migrate.js" # run in a fresh container
kamal app exec --reuse "node scripts/migrate.js" # run in the running container
kamal app exec -i sh # interactive shell over SSH
kamal accessory reboot db # manage accessories
kamal lock release # clear a stale deploy lock
Secrets
.kamal/secrets is read by Kamal on your machine; it is safe to commit only if it contains no raw values — reference environment variables, commands or a password manager. Secrets named under env.secret, registry.password and accessory env.secret are looked up there. With destinations, shared secrets go in .kamal/secrets-common and per-destination ones in .kamal/secrets.<destination>.
# .kamal/secrets
KAMAL_REGISTRY_PASSWORD=$KAMAL_REGISTRY_PASSWORD # from your shell
SECRET_KEY=$(cat config/m
Установить kamal в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл kamal?
Deploy web applications to any server with Kamal — zero-downtime Docker deployments without Kubernetes. Use when someone asks to "deploy to a VPS", "deploy without Kubernetes", "Kamal deploy", "simple Docker deployment", "deploy Rails/Node/Python to a server", "zero-downtime deployment to bare metal", or "replace Heroku with a VPS". Covers Docker-based deployment, zero downtime with kamal-proxy, multi-server, secrets, and accessory services.
Как установить скилл kamal?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл kamal запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic