This repo demonstrates deploying a Sinatra Rack application using Kamal 2. Instructions are included how to deploy to popular VPSes.
Install Kamal 2 gem globally.
gem install kamalInstall the application's RubyGem dependecies.
bundle installSet the environment variables for your project using the .env.template file.
Use bin/kamal to access all Kamal commands using the environment variables.
A .env.local file is provided to test Docker, Kamal, and the Sinatra Rack application locally.
It is recommended you add a kamalduo.local entry to your local /etc/hosts file to test locally:
grep -qE '^\s*127\.0\.0\.1\s+kamalduo\.local$' /etc/hosts \
|| echo '127.0.0.1 kamalduo.local' | sudo tee -a /etc/hosts > /dev/nullKamalDuo demonstrates a health check endpoint at /healthz that Kamal will use to verify the application is running.
curl -i http://localhost:9292/healthz📦docs
┣ 📂devops
┃ ┗ GitHub Actions
┣ 📂hosting
┃ ┣ Digital Ocean
┃ ┣ Hetzner
┃ ┣ Vultr
┣ 📂secrets
┃ ┗ 📜Bitwarden
┣ 📜Docker
┣ 📜Kamal
┗ 📜NGINX
Developed using Kamal 2.10.1.
@2026 Stan Carver II, A1 Web Consulting