Kamal Deployment
What this skill covers
Use this skill when a user needs Kamal deployment help, including:
- setting up
config/deploy.ymland.kamal/secrets - executing
setup,deploy, andredeploy - troubleshooting production runtime and rollout failures
- configuring Docker registry publishing for local and networked environments
Quick playbooks
- Follow the command and incident workflows in Kamal deployment commands.
- Follow the log review and registry setup playbook in Logs and registry troubleshooting.
Core command flow
- Ensure
config/deploy.ymland.kamal/secretsare valid. - Run
kamal setupon first install. - Use
kamal deployfor normal releases. - Use
kamal redeployonly after a successful first deploy. - Use
kamal rollbackfor release rollback. - Use log and audit commands to validate or triage failures.
Production incident checklist
- Put the app in maintenance mode:
kamal app maintenance. - Capture deployment state:
kamal details,kamal app version,kamal audit. - Capture runtime output:
kamal app logs. - Inspect container health and stale containers:
kamal app containers,kamal app stale_containers. - Roll back quickly if health is broken:
kamal rollback <VERSION>. - Return to service once fixed:
kamal app live.
Deployment command map
kamal setup: bootstrap first-time hosts, deploy, and install Docker if needed.kamal deploy: build image, push/pull registry image, healthcheck, cutover, prune.kamal redeploy: same as deploy without setup/proxy bootstrap/prune/registry login.kamal rollback [VERSION]: revert to previous deployed version.kamal registry login | logout | setup: test or change registry authentication and sessions.kamal app details | containers | images | logs | version | stale_containersfor app operations.kamal audit: review recent command execution history from.kamal/app-audit.log.kamal prune: remove unused containers and images.
Local Docker registry playbook
- Local single host:
registry:
server: localhost:5555
Kamal starts a local Docker registry on that endpoint and pushes images there.
- Cross-host/networked registry:
registry:
server: registry.internal.example:5555
username:
- KAMAL_REGISTRY_USER
password:
- KAMAL_REGISTRY_PASSWORD
Requirements:
registry.servermust resolve from all servers.- all hosts must reach the registry port.
- credentials must exist in local environment and
.kamal/secrets. - validate with
kamal registry loginbefore first deploy. - if registry uses plain HTTP, configure Docker daemon trust/insecure settings on host and any deployment hosts accordingly.
For rollback and diagnosis, use kamal registry login after any credential/port/path change.