/kamal-skills:registryfrom kamal-skills
Configure the Docker registry Kamal pushes your app image to and pulls it from — Docker Hub (the default), AWS ECR, GCP Artifact Registry, a local registry, or any custom/self-hosted registry such as GHCR — and log in or out with `kamal registry login` / `logout`. Use when the user says "set up my Docker registry," "kamal registry login," "configure ECR/GCR/GHCR for Kamal," "where does Kamal push my image," "docker login failed on deploy," "use a private Docker Hub repo," or needs the `registry` block (`server`, `username`, `password`) in `config/deploy.yml` wired to a `KAMAL_REGISTRY_PASSWORD` secret. For building and pushing the image itself, see build. For storing the registry password safely, see secrets. For first-time project setup, see setup.
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. This skill configures the container registry Kamal pushes your app image to and pulls it from, and logs that registry in and out on your servers with kamal registry.
The default registry is Docker Hub, but you can point Kamal at AWS ECR, GCP Artifact Registry, a local registry, or any other Docker-compatible registry by setting the registry block in config/deploy.yml.
Read what the project already has before asking the user questions:
config/deploy.yml — look for an existing registry: block (server, username, password)..kamal/secrets — look for KAMAL_REGISTRY_PASSWORD, the secret Kamal looks up for the registry password.Knowing which registry the user is on (Docker Hub, ECR, GCP, local, or self-hosted) determines everything below.
Registry settings live under the registry key in config/deploy.yml:
| Key | Purpose |
|---|---|
server | The registry host. Omit it to use Docker Hub (the default); set it for ECR, GCP, a local registry, or any other host. |
username | The account Kamal authenticates as. |
password | The password or token, normally given as a secret reference rather than a literal value. |
The password references a secret by name — e.g. KAMAL_REGISTRY_PASSWORD. Kamal looks that name up in your local environment (loaded from .kamal/secrets) instead of storing the literal value in config/deploy.yml, keeping credentials out of source control:
registry:
username:
- my-docker-username
password:
- KAMAL_REGISTRY_PASSWORD
A local registry (server: localhost:...) is the exception — it needs only server.
| Registry | server value |
|---|---|
| Docker Hub (default) | omit server |
| AWS ECR | <aws-account-id>.dkr.ecr.<region>.amazonaws.com |
| GCP Artifact Registry | <region>-docker.pkg.dev |
| Local registry | localhost:<port> (e.g. localhost:5555) |
| Other / self-hosted | your registry host |
Put the password or token in .kamal/secrets as KAMAL_REGISTRY_PASSWORD so it is read from the environment and kept out of config/deploy.yml. See the secrets skill for pulling this from a vault such as 1Password or AWS Secrets Manager.
registry blockUse the snippet for your provider (below), referencing KAMAL_REGISTRY_PASSWORD for the password.
kamal registry login
This logs in to the registry locally and on every server. A clean exit means your server, username, and password are correct.
Docker Hub is the default, so you set only username and password:
registry:
username:
- your-docker-hub-username
password:
- KAMAL_REGISTRY_PASSWORD
Docker Hub creates public repositories by default. To keep your image private, set up a private repository before deploying, or change your Docker Hub default repository privacy to private. See references/registry-providers.md.
Requires the AWS CLI installed locally. An ECR access token is only valid for 12 hours, so use ERB to shell out to the AWS CLI and fetch a fresh token on each run:
registry:
server: <your aws account id>.dkr.ecr.<your aws region id>.amazonaws.com
username: AWS
password: <%= %x(aws ecr get-login-password) %>
Use a base64-encoded service account JSON key as the password, with _json_key_base64 as the username:
registry:
server: <your registry region>-docker.pkg.dev
username: _json_key_base64
password:
- KAMAL_REGISTRY_PASSWORD
Set KAMAL_REGISTRY_PASSWORD to the base64-encoded key. See references/registry-providers.md for creating the service account, granting roles/artifactregistry.writer, and encoding the key.
If server starts with localhost, Kamal starts a local Docker registry on that port and pushes the app image to it:
registry:
server: localhost:5555
Any other Docker-compatible registry — a self-hosted registry, GitHub Container Registry (ghcr.io), and so on — uses the same three keys: set server to the registry host and provide username / password. See references/registry-providers.md.
kamal registry manages registry authentication locally and on all servers.
| Command | What it does |
|---|---|
kamal registry login | Log in to the remote registry locally and remotely |
kamal registry logout | Log out of the remote registry locally and remotely |
$ kamal registry login
$ kamal registry logout
You usually don't run these by hand for a normal deploy — kamal deploy logs in to the Docker registry locally and on all servers as its first step, then builds, pushes, and pulls the image. Use kamal registry login mainly to validate your configuration.
For the full subcommand list (setup, remove, help) and example output, see references/registry-commands.md.
docker login fails on deploy — run kamal registry login to surface the error in isolation; check server, username, and that KAMAL_REGISTRY_PASSWORD resolves in .kamal/secrets.aws ecr get-login-password approach regenerates it on each run.KAMAL_REGISTRY_PASSWORD in .kamal/secrets and pulling it from a vault.registry block is first filled in.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