Knowledge Base updated: 2026-11-15
Kamal knowledge base
Kamal is a Ruby CLI for deploying containerized applications and auxiliary services to remote hosts. Its command layer combines validated deployment configuration with remote execution, Docker operations, image distribution, proxy routing, and operational reporting.
The primary control path starts at the CLI and commander, selects a command, loads configuration, and coordinates work across servers. Configuration resolves topology, services, environment variables, and secrets before runtime actions are issued.
Critical deployment state is external to the process: Docker images and containers on configured hosts, registry credentials and images, proxy state, generated environment data, and any configured secret-provider values.
flowchart TD
CLI[Kamal CLI] --> Commander[Commander]
Commander --> Commands[Command layer]
Commands --> Config[Configuration system]
Config --> Topology[Servers and roles]
Config --> Services[Service and builder settings]
Config --> Secrets[Environment and secrets]
Commands --> Builder[Image builders]
Builder --> Registry[Container registry]
Commands --> Docker[Docker integration]
Docker --> Hosts[Remote Docker hosts]
Commands --> Proxy[Proxy management]
Proxy --> Hosts
Commands --> SSH[SSHKit remote execution]
SSH --> Hosts
Commands --> Telemetry[Output and telemetry]
Glossary
- Accessory: An auxiliary service managed alongside the primary application, optionally exposed through the proxy.
- Role: A named application responsibility used to target a subset of configured servers.
- Kamal Proxy: The proxy component that routes application and accessory traffic on deployment hosts.
- Builder: The strategy that produces a deployment image, locally, remotely, or through a cloud or pack-based workflow.
- Destination: The deployment configuration context that supplies hosts, services, credentials, and runtime settings.
Routing table
- CLI entrypoints, commander dispatch, or command registration changes -> docs/command-execution.md
- Application deploy, boot, rollback, assets, or error-page behavior changes -> docs/application-deployment.md
- Accessory lifecycle or accessory proxy-routing changes -> docs/accessory-operations.md
- Proxy boot, run, reboot, or routing changes -> docs/proxy-management.md
- Builder abstraction or local, remote, cloud, hybrid, pack, or clone build changes -> docs/image-building.md
- Server, Docker, registry, prune, lock, hook, or audit command changes -> docs/host-operations.md
- Configuration loading, merging, parsing, or top-level validation changes -> docs/configuration-system.md
- Boot configuration, roles, servers, aliases, volumes, or SSH topology changes -> docs/application-topology-configuration.md
- Accessory, proxy, registry, builder, logging, or output configuration changes -> docs/service-configuration.md
- Environment-file, dotenv, tag expansion, secret, or secret-provider changes -> docs/environment-and-secrets.md
- Shared Docker command, network, image, container, or host-runtime integration changes -> docs/container-runtime.md
- Container creation, inspection, start, stop, removal, rollout, or recovery changes -> docs/container-lifecycle.md
- Image naming, tagging, source revision, registry authentication, build-to-pull, or image distribution changes -> docs/image-identity-and-registry.md
- Cross-cutting remote-operation, reporting, resilience, or observability integration changes -> docs/operational-integrations.md
- SSHKit configuration, remote command extension, DNS retry, host targeting, or remote coordination changes -> docs/remote-execution.md
- Output formatting, file logging, OpenTelemetry logging, or telemetry shipping changes -> docs/telemetry-and-logging.md