Kamal Basics
Omaship uses Kamal for deployment. You don't need to learn Kamal—but here's how it works if you're curious.
You don't need to run these commands. Omaship's CI/CD handles deployment automatically. This page is just reference for developers who want to understand the system.
What is Kamal?
Kamal is a deployment tool from the Rails team (37signals). It deploys Docker containers to any server with zero-downtime and automatic SSL. No Kubernetes, no PaaS, no complexity.
How Deployment Works
When you push to main (or merge a PR), Omaship's CI/CD:
- Builds a Docker image of your app
- Pushes it to GitHub Container Registry
- SSHs into your server via Kamal
- Pulls the new image
- Starts a new container, waits for health check
- Switches traffic (zero downtime)
- Removes the old container
Configuration
Kamal configuration lives in config/deploy.yml:
service: my-app
image: ghcr.io/myorg/my-app
servers:
web:
hosts:
- 123.45.67.89
proxy:
ssl: true
host: mybusiness.com
registry:
server: ghcr.io
username: myorg
password:
- KAMAL_REGISTRY_PASSWORD
This is a user-owned file—customize it if you need to add servers, change proxy settings, or adjust the configuration.
Manual Commands (Optional)
If you ever need to run Kamal manually:
# Deploy latest code
kamal deploy
# View application logs
kamal app logs
# Open Rails console on server
kamal app exec -i "rails console"
# Rollback to previous version
kamal rollback
# Check container status
kamal app details
kamal-proxy
Kamal 2.0 uses kamal-proxy instead of Traefik. It handles:
- SSL certificate provisioning (Let's Encrypt)
- Traffic routing to containers
- Zero-downtime deployments
- Health checks
Learn More
kamal-deploy.org — Official Kamal documentation