nityeshaga/claude-code-essentials/kamal-deploy
Claude Code and agent skill by nityeshaga/claude-code-essentials
- community
- ext:[{"type":"hook","description":"Pre/post lifecycle hooks"}]
Checking that the SKILL.md file is still in the repository.
Expert-level Kamal deployment guidance for deploying containerized applications to any server. Use this skill when users ask about Kamal, container deployment, zero-downtime deployments, deploying Rails/web apps to VPS/cloud servers, kamal setup, kamal deploy, Docker deployment without Kubernetes, or deploying to Hetzner/DigitalOcean/AWS with Kamal. Also use when users mention DHH's deployment tool, 37signals deployment, or want an alternative to Heroku/Render/Vercel with self-hosted infrastructure.
Install
npx vskill@latest install nityeshaga/claude-code-essentials/kamal-deploySemi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard
SKILL.md
The same SKILL.md was published earlier as nityeshaga/claude-code-essentials/kamal-deploy.
Kamal Deploy Expert
Expert guidance for deploying applications with Kamal - DHH's zero-downtime deployment tool from 37signals.
Step 1: Fetch Latest Documentation (MANDATORY)
BEFORE answering ANY Kamal question, you MUST use the WebFetch tool to get current documentation. The docs below may be outdated - always fetch fresh docs first.
Execute these WebFetch calls in parallel:
WebFetch(url: "https://kamal-deploy.org/docs/installation/", prompt: "Extract complete installation and setup guide")
WebFetch(url: "https://kamal-deploy.org/docs/configuration/overview/", prompt: "Extract all configuration options and deploy.yml structure")
WebFetch(url: "https://kamal-deploy.org/docs/commands/view-all-commands/", prompt: "Extract all Kamal commands and usage")
WebFetch(url: "https://kamal-deploy.org/docs/configuration/proxy/", prompt: "Extract proxy, SSL, and health check configuration")
Fetch these additional docs based on user's question:
- Servers/roles:
https://kamal-deploy.org/docs/configuration/servers/ - Accessories (DB, Redis):
https://kamal-deploy.org/docs/configuration/accessories/ - Environment variables:
https://kamal-deploy.org/docs/configuration/environment-variables/ - Docker build options:
https://kamal-deploy.org/docs/configuration/builders/ - Deployment hooks:
https://kamal-deploy.org/docs/hooks/overview/ - Upgrading v1→v2:
https://kamal-deploy.org/docs/upgrading/overview/
Only after fetching fresh docs, use the reference material below as supplementary context.
What is Kamal?
Kamal deploys containerized apps to any server via SSH + Docker. Created by 37signals (DHH's company) to deploy Basecamp, HEY, and other apps.
Core architecture:
- SSHs into servers, installs Docker automatically
- Builds app into Docker container
- Pushes to registry (Docker Hub, GHCR, etc.)
- Pulls and runs on target servers
- kamal-proxy handles routing, SSL (Let's Encrypt), zero-downtime
Mental model: Hetzner/DigitalOcean = the computer, Kamal = deploys your app to it
Before You Start
Check these first to avoid common friction:
- Kamal version - Run
kamal version. If on 1.x, upgrade withgem install kamal. Config syntax changed significantly (1.x usestraefik, 2.x usesproxy).
- Local Docker situation - Ask the user if they have Docker working locally. If not (or if Docker Desktop is problematic on macOS), configure a remote builder:
``yaml builder: arch: amd64 remote: ssh://root@SERVER_IP `` This builds on the target server and avoids local Docker entirely.
- 37signals open-source repos - If deploying Campfire, HEY, or other 37signals apps, immediately delete
.env.erb- it uses their internal 1Password setup and will fail withop: command not found.
- Registry access - Confirm the user has a container registry (Docker Hub, GHCR) and knows their credentials before writing config.
Quick Start
Essential Commands
| Command | Purpose | |
|---|---|---|
kamal setup | First deploy - installs Docker, proxy, deploys | |
kamal deploy | Deploy new version | |
kamal rollback | Revert to previous version | |
kamal app logs | View application logs | |
kamal app exec -i bash | SSH into running container | |
kamal accessory boot <name> | Start accessory (db, redis) | |
kamal proxy reboot | Restart kamal-proxy | |
kamal remove | Remove everything from servers |
Minimal config/deploy.yml
Secrets Management
Secrets live in .kamal/secrets:
Reference in deploy.yml:
Multi-Server with Roles
Accessories (Databases, Redis)
SSL Configuration
Automatic (Let's Encrypt):
Custom certificate:
Health Checks
App must return 200 on /up (Rails default) or configured path.
Destinations (Staging/Production)
Create config/deploy.staging.yml:
Deploy: kamal deploy -d staging
Secrets: .kamal/secrets.staging
Hooks
Place in .kamal/hooks/ (no file extension):
Available hooks:
pre-connect,pre-build,pre-deploy,post-deploypre-app-boot,post-app-bootpre-proxy-reboot,post-proxy-reboot
Example .kamal/hooks/post-deploy:
Dockerfile Requirements
Kamal needs a Dockerfile. For Rails:
Note: Kamal 2.x defaults to port 80 (not 3000).
Common Issues
"Container not healthy"
- Check
/upendpoint returns 200 - Increase
deploy_timeoutif app boots slowly - Check logs:
kamal app logs
"Permission denied"
- Ensure SSH key is added:
ssh-add ~/.ssh/id_rsa - Check SSH user has Docker access
Registry auth failed
- Verify
KAMAL_REGISTRY_PASSWORDin.kamal/secrets - For GHCR: use personal access token with
write:packages
"Address already in use"
- Another service on port 80/443
- Run
kamal proxy rebootor checkdocker pson server
Kamal vs Alternatives
| Kamal | Kubernetes | Heroku | ||
|---|---|---|---|---|
| Complexity | Low | High | None | |
| Cost | VPS only | VPS + overhead | $$$ | |
| Control | Full | Full | Limited | |
| Zero-downtime | Yes | Yes | Yes | |
| SSL | Auto | Manual | Auto | |
| Learning curve | Hours | Weeks | Minutes |
Best Practices
- Always test locally first:
docker build . && docker run -p 3000:80 <image> - Use staging destination before production
- Keep secrets out of git:
.kamal/secretsin.gitignore - Set up monitoring: Use hooks to notify on deploy
- Regular backups: Especially accessory volumes
- Use asset bridging for Rails:
asset_path: /app/public/assets
Reference Files
For detailed configuration options, see:
- references/configuration.md - Complete deploy.yml reference
- references/troubleshooting.md - Common issues and solutions
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingplugins/basics/skills/kamal-deploy/SKILL.md
Popularity
- Repository stars
- 59
- Repository forks
- 9
- 7-day trend score
- 20
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Extension points
hookPre/post lifecycle hooks
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/nityeshaga/claude-code-essentials/kamal-deploy)