/kamal-skills:proxyfrom kamal-skills
Configure and operate kamal-proxy, the reverse proxy that gives Kamal zero-downtime deploys on ports 80 and 443. Use when the user wants to route a domain (host/hosts), enable automatic HTTPS via Let's Encrypt (ssl), point the proxy at their app's port (app_port), tune the deploy healthcheck (/up), or adjust response_timeout and buffering — and when they say things like "configure the kamal proxy," "set up SSL for my domain," "add my custom domain," "the proxy isn't routing," "reboot the proxy," "upgrade kamal-proxy," or run kamal proxy boot/reboot/start/stop/details/logs. Covers the proxy config block and the kamal proxy command. For full deploys, see deploy. For enabling the proxy per role, see servers. For starting and stopping the app container, see app. For migrating from Kamal 1.x to kamal-proxy, see upgrade.
Ships in kamal-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
You are an expert in deploying applications with Kamal. Your job is to configure and operate kamal-proxy so the user's app serves traffic with gapless, zero-downtime deploys.
Kamal uses kamal-proxy to provide gapless deployments. It runs on ports 80 and 443 and forwards requests to the application container.
You configure it in the root configuration under proxy. These options are set when deploying the application, not when booting the proxy. They are application-specific, so they are not shared when multiple applications run on the same proxy.
During a deploy, Kamal:
200 OK to GET /up.Because routing only switches after the new container passes its healthcheck, getting proxy right is what makes deploys seamless.
Read the user's existing setup before asking questions:
config/deploy.yml — look for an existing proxy: block and the servers: roles so you know what is already set..kamal/secrets — needed only if you are loading a custom SSL certificate from secrets (see step 3).If there is no proxy: block yet, you are starting from a clean slate and only need to add the keys the user actually wants.
All of the following keys live under a single proxy: block in config/deploy.yml.
hostThe hosts that will be used to serve the app. The proxy only routes requests for these hosts to your app. Specify one of host or hosts.
proxy:
host: app.example.com
For multiple domains, use hosts:
proxy:
hosts:
- app.example.com
- www.example.com
If no hosts are set, all requests are forwarded to the app, except requests matching other apps deployed on that server that do have a host set.
app_portThe port the application container is exposed on. Defaults to 80. Set it to match the port your app listens on inside the container:
proxy:
app_port: 3000
sslkamal-proxy can provide automatic HTTPS via Let's Encrypt. Defaults to false.
proxy:
host: app.example.com
ssl: true
Automatic SSL has requirements:
host option must be set.host value must point to the server you are deploying to.ssl: true is set — re-enabling the orange
cloud later silently breaks renewal ~60 days on. To keep a CDN in front permanently, stop
using Let's Encrypt and load a CDN origin certificate via the custom
certificate_pem/private_key_pem block below.When ssl: true, kamal-proxy stops forwarding headers to your app unless you explicitly set forward_headers: true. By default, kamal-proxy will not forward the X-Forwarded-For and X-Forwarded-Proto headers when ssl is true, and will forward them when ssl is false. Set forward_headers: true if you are behind a trusted proxy and your app needs those headers.
Host-header trust: Separately from forwarded headers, some frameworks validate the raw Host header against an allowlist and reject requests arriving through kamal-proxy until explicitly told to trust it — Rails' config.hosts, Django's ALLOWED_HOSTS, Auth.js/NextAuth's trustHost: true (required for any deploy outside Vercel). The symptom is an UntrustedHost-style error or an unexplained redirect loop on auth routes right after deploying, even though the app worked when run directly without the proxy. Add the deployed host to the framework's allowlist alongside setting proxy.host.
By default, kamal-proxy redirects all HTTP requests to HTTPS when SSL is enabled. To pass HTTP traffic through to your app alongside HTTPS, set ssl_redirect: false.
Custom certificate instead of Let's Encrypt: If you can't use Let's Encrypt — for example, you deploy from more than one host, or you already have a certificate from another CA — load the certificate from secrets by mapping certificate_pem and private_key_pem to secret names:
proxy:
ssl:
certificate_pem: CERTIFICATE_PEM
private_key_pem: PRIVATE_KEY_PEM
Those names reference entries in .kamal/secrets. If the certificate or key is missing or invalid, deployments will fail. Never hard-code certificates or private keys in source control.
When deploying, the proxy hits /up once every second until the deploy timeout, with a 5-second timeout for each request. Once the app is up, the proxy stops hitting the healthcheck endpoint. Override any of these:
proxy:
healthcheck:
path: /health
interval: 3
timeout: 3
| Key | What it sets | Default |
|---|---|---|
path | Endpoint the proxy checks | /up |
interval | Seconds between checks | 1 |
timeout | Seconds to wait per check | 5 |
Response timeout — how long to wait for requests to complete before timing out. Defaults to 30 seconds:
proxy:
response_timeout: 10
Buffering — whether to buffer request and response bodies in the proxy. By default, buffering is enabled with a max request body size of 1GB and no limit for response size. The memory limit defaults to 1MB; anything larger is written to disk.
proxy:
buffering:
requests: true
responses: true
max_request_body: 40_000_000
max_response_body: 0
memory: 2_000_000
proxy:
host: app.example.com
app_port: 3000
ssl: true
healthcheck:
path: /up
interval: 3
timeout: 3
response_timeout: 10
Proxy options are applied at deploy time. After editing the proxy: block, run a deploy to push the new configuration:
kamal deploy
For more proxy keys — path-based routing (path_prefix, path_prefixes, strip_path_prefix), request logging, and the full run (boot) configuration — see references/config-reference.md.
kamal proxyThe kamal proxy command manages the proxy container itself on your servers. The most common subcommands:
| Subcommand | What it does |
|---|---|
kamal proxy boot | Boot the proxy on servers |
kamal proxy reboot | Reboot the proxy (stop container, remove container, start a new container) |
kamal proxy restart | Restart the existing proxy container on servers |
kamal proxy start | Start the existing proxy container on servers |
kamal proxy stop | Stop the existing proxy container on servers |
kamal proxy details | Show details about the proxy container from servers |
kamal proxy logs | Show log lines from the proxy on servers |
kamal proxy remove | Remove the proxy container and image from servers |
For the full subcommand list and the (deprecated) boot_config, see references/commands-reference.md.
When routing or SSL is misbehaving, start with details and logs:
kamal proxy details
kamal proxy logs
When you want to upgrade kamal-proxy, run kamal proxy reboot. This causes a small outage on each server and prompts for confirmation.
kamal proxy reboot
To avoid restarting on all servers simultaneously, use a rolling reboot:
kamal proxy reboot --rolling
You can also use the pre-proxy-reboot and post-proxy-reboot hooks to remove and add servers to upstream load balancers as you reboot them.
Options used when booting the proxy container — published ports, log size, registry/repository, and the pinned version of the kamal-proxy image — live under proxy/run in your config. This replaces the deprecated kamal proxy boot_config. See the run table in references/config-reference.md.
The proxy is enabled by default on the primary role. Disable it by setting proxy: false in that role:
servers:
web:
hosts:
- ...
proxy: false
It is disabled by default on all other roles. Enable it with proxy: true, or by providing a proxy configuration for that role:
servers:
web:
hosts:
- ...
web2:
hosts:
- ...
proxy: true
kamal deploy to apply proxy configuration and roll out new versions through the proxy.servers roles and control which roles run the proxy.What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub donnfelker/kamal-skills --plugin kamal-skills25 skills in this plugin
/accessoriesRun and manage accessory services — databases, Redis, search, and other long-lived dependencies your app needs — through Kamal's `accessories:` configuration and the `kamal accessory` command. Use this when the user says things like "add a MySQL/Postgres/Redis accessory," "run a database with Kamal," "kamal accessory boot," "set up a sidecar/companion service," "my app needs a cache or search container," "persist accessory data with volumes," or "reboot/restart/remove an accessory." Covers defining the accessory (image, host/hosts/role/roles/tag/tags, port, env, files, directories, volumes, network, options, registry, proxy) and operating it with boot, reboot, restart, start, stop, details, logs, exec, and remove. For passing configuration and credentials into accessories, see env and secrets. For scheduled jobs, see cron./aliasesDefine custom command aliases under the top-level `aliases` key in `config/deploy.yml` so a long, repeated `kamal` invocation becomes a single `kamal <name>`. Use it when the user says "add a Kamal alias," "shortcut kamal app exec," "make `kamal console` open a Rails console," "create a one-liner to deploy staging," "I keep retyping the same kamal command," or asks about the `aliases` config key, alias naming rules, or a `deploy -d staging` shortcut. Covers how an alias expands into a `kamal` subcommand, the lowercase letters/numbers/dashes/underscores naming rule, and the documented examples `console: app exec -i --reuse "bin/rails console"`, `uname: app exec -p -q -r web "uname -a"`, and `staging_deploy: deploy -d staging`. For the rest of `config/deploy.yml` and DRYing it up with YAML anchors, see config. For the underlying app exec / console / logs commands the aliases wrap, see app./appOperate and inspect already-running Kamal apps without redeploying. Manage app containers with `kamal app` (boot, start, stop, containers, details, images, version, logs, exec, remove, stale_containers), set maintenance/live mode (`kamal app maintenance --message`, `kamal app live`, `error_pages_path`), see every container with `kamal details`, review what ran on each server with `kamal audit`, print the resolved config with `kamal config`, run one-off and interactive commands with `kamal app exec` (`--primary/-p`, `--interactive/-i`, `--reuse`, `--raw`), and check the installed CLI version with `kamal version`. Use when the user says "boot/start/stop the app," "show running containers," "exec into the app," "open a Rails console," "run a command on all servers," "put the app in maintenance mode," "show the audit log," or "print my Kamal config." For shipping releases, see deploy. For reverting a release, see rollback. For log-driver and OTel/file config, see logging. For kamal-proxy, see proxy./buildConfigure Kamal builders and build then push your app image. Use this skill when the user wants to set up the `builder` block in config/deploy.yml — choosing local, remote, multi-arch, or Docker Build Cloud builds, picking a `driver`, passing build `args`, build `secrets`, or `cache`, switching the `dockerfile`, `context`, or `target`, or building without a Dockerfile via buildpacks (`pack`) — and when they want to run `kamal build push`, `kamal build dev`, or other `kamal build` subcommands. Trigger phrases include "kamal build," "build my image," "push the image to the registry," "build for amd64/arm64," "remote builder," "Apple Silicon cross-build is slow," "speed up my builds with cache," "pass a build arg," "use a build secret," or "build without a Dockerfile." For configuring the container registry, see registry. For the one-step flow that builds and ships in a single command, see deploy. For managing the secret values that build secrets reference, see secrets./ci-deploySet up continuous deployment so every push to main runs `kamal deploy` from GitHub Actions once the tests pass — for any stack Kamal ships (Rails, Next.js, Phoenix, Rust, static sites, and more). Use when the user says "auto-deploy on push," "deploy from GitHub Actions," "continuous deployment with Kamal," "deploy when CI passes," "set up CD," "stop deploying from my laptop," or "use 1Password in GitHub Actions." Covers the deploy ssh key, secrets in a GitHub environment or read from 1Password with a service account, the workflow, the GHA build cache, and verifying the first run. For running a deploy by hand, see deploy. For the secrets file itself, see secrets. For build cache options, see build./configUnderstand and write your Kamal configuration in config/deploy.yml. Use when the user says "set up config/deploy.yml," "what goes in my deploy.yml," "what are the required keys," "add a staging destination," "deploy with -d staging," "DRY up my config with YAML anchors," "what does retain_containers / readiness_delay / primary_role / deploy_timeout do," "kamal init," or "kamal config." Covers the required service and image keys, destinations (-d) and merged per-destination files, x- extensions, every top-level option and its default, and reusing config with anchors and aliases. For configuring servers and roles, see servers. For env and secrets, see env. For command shortcuts, see aliases. For a first deployment, see setup.Other plugins' skills for the same job