Introduction

Deploy a Dockerized app on Hetzner with Kamal.

When to use this guide

  • You deploy to one VPS or bare-metal server.
  • You want simple operations and fast setup.

What this guide covers

  • SSH keypair generation.
  • Basic server setup (short version).
  • Kamal setup for app and accessories.
  • Deploy setup for manual deploy and GitHub Actions.
  • Daily Postgres backup and restore.

Stack used in this example

  • Server: Hetzner (single host or multiple hosts)
  • Deploy tool: Kamal
  • App runtime: any runtime that can run in Docker
  • Data: Postgres + Redis accessories
  • Backups: eeshugerman/postgres-backup-s3 to Hetzner Object Storage

Delivery order

  1. Complete all pages in Setup.
  2. Complete pages in Deployment.
  3. Complete the Operations page for backup/restore.
  4. Run verification from each page.

On this page