Skip to content

Deploy Kaeso on Hetzner Cloud

Run Kaeso 0.7.0 on a Hetzner Cloud server using hcloud or the Hetzner Console. Plans and stock, Cloud Firewall rules, cloud-init, DNS, SMTP on port 587, backups and updates.

Published
Reading time
7 min
Author
Kaeso Team
A deep gradient of orange and yellow, folding diagonally upward, with a warm light in one corner

Hetzner Cloud runs standard Linux virtual servers in Germany, Finland, the United States and Singapore, with hourly billing up to a monthly cap and a stateful Cloud Firewall in front of the VM. That fits Kaeso's single-server Docker Compose package directly.

This guide deploys Kaeso 0.7.0 on a Hetzner Cloud server with either the hcloud CLI or the Hetzner Console (opens in a new tab). At the end you have the full stack — gateway, console, PostgreSQL, ClickHouse, Valkey, Caddy and the updater — answering over HTTPS on your domain. For the shared Docker, backup and troubleshooting reference, see the Linux server guide.

What you need

AccountA Hetzner Cloud account and a project in the Hetzner Console (opens in a new tab)
CLI (optional)hcloud (opens in a new tab) with an API token for your project, or use the Console in a browser
SSH keyAn SSH public key on your machine, such as ~/.ssh/id_ed25519.pub
DomainA domain or subdomain such as kaeso.example.com whose DNS you control (Hetzner's own DNS works too)
EmailAn SMTP server that accepts submission on port 587 with STARTTLS (you can add it after the first login)

What it costs

Kaeso itself is open source under the MIT licence; you pay Hetzner for the server and any add-ons. As of November 2026, Hetzner Cloud list prices on hetzner.com/cloud (opens in a new tab) are shown excluding VAT and including one Primary IPv4 address (€0.50 per month excl. VAT; IPv6 carries no charge). Plans that meet Kaeso's minimum of 2 vCPUs, 4 GB of memory and 20 GB of disk:

  • CPX22
    Line and architecture
    Regular Performance (opens in a new tab), shared AMD (x86_64)
    Resources
    2 vCPU, 4 GB RAM, 80 GB disk
    Monthly cap (excl. VAT, incl. IPv4)
    €16.99 (hel1), €19.99 (nbg1), €26.99 (sin)
    Availability (Nov 2026)
    Listed as orderable
  • CPX21
    Line and architecture
    Regular Performance (opens in a new tab), shared AMD (x86_64, US only)
    Resources
    3 vCPU, 4 GB RAM, 80 GB disk
    Monthly cap (excl. VAT, incl. IPv4)
    €32.49 (ash, hil)
    Availability (Nov 2026)
    Listed as orderable
  • CX23
    Line and architecture
    Cost-Optimized (opens in a new tab), shared Intel/AMD (x86_64)
    Resources
    2 vCPU, 4 GB RAM, 40 GB disk
    Monthly cap (excl. VAT, incl. IPv4)
    €5.99 (nbg1, hel1)
    Availability (Nov 2026)
    Marked not available
  • CAX11
    Line and architecture
    Cost-Optimized (opens in a new tab), shared Ampere (arm64)
    Resources
    2 vCPU, 4 GB RAM, 40 GB disk
    Monthly cap (excl. VAT, incl. IPv4)
    €6.49 (nbg1, hel1)
    Availability (Nov 2026)
    Marked not available

Kaeso publishes both linux/amd64 and linux/arm64 images, so the Ampere CAX plans work when they are in stock. Locations in the EU include at least 20 TB of outgoing traffic per month, US locations 1 to 5 TB depending on the plan, and Singapore from 0.5 TB (locations (opens in a new tab)). Helsinki (hel1) is currently lower priced than Nuremberg (nbg1) on CPX and CCX plans after Hetzner's November 2026 price reduction (opens in a new tab).

Cloud Firewalls and DNS zones carry no additional charge (firewalls (opens in a new tab), DNS (opens in a new tab)). Servers are billed while powered off until you delete them. Prices and stock change; check the provider's page before you order.

1. Create a Cloud Firewall

Hetzner's Cloud Firewall (opens in a new tab) is stateful and filters routed packets in Hetzner's network before they reach the server. With no rules, it blocks all inbound traffic and allows all outbound traffic. Adding any outbound rule turns outbound filtering into deny-by-default as well, so leave outbound rules empty unless you plan to list every outgoing port Kaeso uses.

Create a firewall allowing SSH from your own address range, HTTP and HTTPS on TCP 80 and 443, HTTP/3 on UDP 443, and ICMP. With hcloud (run hcloud context create kaeso first to save your API token):

hcloud ssh-key create --name laptop --public-key-from-file ~/.ssh/id_ed25519.pub hcloud firewall create --name kaesohcloud firewall add-rule kaeso --direction in --protocol tcp --port 22 --source-ips 203.0.113.0/24 --description sshhcloud firewall add-rule kaeso --direction in --protocol tcp --port 80 --source-ips 0.0.0.0/0,::/0 --description httphcloud firewall add-rule kaeso --direction in --protocol tcp --port 443 --source-ips 0.0.0.0/0,::/0 --description httpshcloud firewall add-rule kaeso --direction in --protocol udp --port 443 --source-ips 0.0.0.0/0,::/0 --description http3hcloud firewall add-rule kaeso --direction in --protocol icmp --source-ips 0.0.0.0/0,::/0 --description ping

Replace 203.0.113.0/24 with your own IP range (or 0.0.0.0/0,::/0 if your address changes). In the Console, create the same rules under Firewalls.

Note that private Cloud Networks are not filtered by a Cloud Firewall, and inside the VM Docker's own packet-filter rules bypass ufw (Docker and firewalls (opens in a new tab)). Kaeso publishes only Caddy's ports 80 and 443; verify from outside with nmap after the install if you run anything else on the host.

2. Create the server

Create a server running ubuntu-24.04 (or ubuntu-26.04) with the firewall attached at creation time, so it is active before first boot. Use --location — Hetzner removed --datacenter in 2026 (API reference (opens in a new tab)):

hcloud server create \  --name kaeso \  --type cpx22 \  --image ubuntu-24.04 \  --location hel1 \  --ssh-key laptop \  --firewall kaeso

Check hcloud server ip kaeso and hcloud server ip --ipv6 kaeso for the new addresses.

Optional: install automatically with cloud-init

Hetzner's system images include cloud-init and run a shell script passed as user data on the first boot (cloud-init FAQ (opens in a new tab)). Because the DNS record does not exist yet when you create a server with a fresh IP, either allocate a Primary IP (opens in a new tab) first, point your domain at it, and pass --primary-ipv4, or let Caddy retry Let's Encrypt once you add the record.

Save a short script locally as kaeso-init.sh (do not put secrets in user data; it is readable from the instance metadata service on the host):

#!/bin/bashset -euo pipefailcurl -fsSL https://kaeso.app/install.sh | sh -s -- --domain kaeso.example.com --dir /opt/kaeso --install-docker

Pass --user-data-from-file kaeso-init.sh to hcloud server create, or paste the script into the Console's Cloud config field. After boot, watch progress with cloud-init status --wait and check /var/log/cloud-init-output.log.

3. Point your domain at the server

Create an A record for kaeso.example.com pointing at the server's IPv4 address, and an AAAA record pointing at its IPv6 address.

If your zone is hosted in the Hetzner Console (Hetzner moved DNS into the Cloud Console and retired the old dns.hetzner.com service in May 2026), you can add both records with hcloud zone:

hcloud zone add-records --record 203.0.113.10 --ttl 300 example.com kaeso Ahcloud zone add-records --record 2001:db8::1 --ttl 300 example.com kaeso AAAA

Wait until dig +short kaeso.example.com returns your server's IP before starting the installer. Reverse DNS (PTR) can be edited under the server's Networking tab or with hcloud server set-rdns, though it is optional when Kaeso relays mail through an external SMTP service on port 587 (reverse DNS (opens in a new tab)).

4. Install Kaeso

If you did not use cloud-init, sign in as root, download and read the installer, and run it:

ssh root@203.0.113.10curl -fsSL https://kaeso.app/install.sh -o install.shless install.shsh install.sh --domain kaeso.example.com --dir /opt/kaeso --install-docker

The installer installs Docker Engine, writes /opt/kaeso/compose.yaml, .env and master-keys, starts every service with the updater enabled, waits for Caddy's Let's Encrypt certificate, and prints a one-time setup link. Add --version 0.7.0 if you want to pin this release.

5. Create the first user and save the master key

Open the setup link from the installer output (or from /var/log/cloud-init-output.log if you used cloud-init) within 24 hours to create the first instance admin. To print a fresh link while no user exists:

cd /opt/kaesodocker compose exec gateway kaeso setup-link

Copy /opt/kaeso/master-keys into your password manager, separate from your server backups:

cat /opt/kaeso/master-keys

6. Configure outgoing email

Hetzner blocks outgoing ports 25 and 465 by default on all Cloud servers; accounts that have been active for a month with a paid invoice can request an unblock (mail FAQ (opens in a new tab)). Port 587 is not blocked and works on day one.

Kaeso defaults to port 587 with STARTTLS, so point it at any external SMTP provider that accepts submission on 587. Edit /opt/kaeso/.env as shown in the Linux server guide, set KAESO_MAIL_TRANSPORT=smtp along with KAESO_SMTP_HOST, KAESO_SMTP_USER, KAESO_SMTP_PASSWORD and KAESO_SMTP_FROM, apply with docker compose up -d --wait, and test:

cd /opt/kaesodocker compose exec gateway kaeso mail test owner@example.com

If your SMTP provider only listens on port 465, use a relay that supports port 587 until you can request a port unblock from Hetzner.

Back up

Hetzner offers automated Backups (7 daily slots, billed at 20% of the server's monthly price excluding IPv4, deleted when the server is deleted) and manual Snapshots (€0.0143 per GB per month excl. VAT on compressed size, kept after server deletion) (billing FAQ (opens in a new tab)). Neither includes attached Volumes, and Hetzner's cloud SLA excludes backups and snapshots.

A server backup or snapshot is a useful safety net for quick recovery, but not a replacement for logical database dumps: a snapshot taken while PostgreSQL writes may not restore cleanly. Schedule daily pg_dump backups and copy them off the server as shown in the Linux server guide, and keep /opt/kaeso/master-keys somewhere else.

Update to the next release

Because this install uses the Docker Compose package with the updater enabled, instance admins can update from Instance › Updates in the console, turn on automatic updates in a maintenance window, or run sh install.sh --update in /opt/kaeso. See Update to the next release for details.

Before updating from 0.6 to 0.7, note that 0.7.0 refuses KAESO_KPMR_INTERVAL below 5m, KAESO_MCP_SERVERS_SYNC_INTERVAL below 1m, and KAESO_SMTP_USER without KAESO_SMTP_PASSWORD; the Kaeso 0.7 article covers what else changed.

Troubleshooting

What you seeWhat to do
CX23 or CAX11 cannot be selectedHetzner's Cost-Optimized plans are occasionally out of stock; choose CPX22 (for example in hel1) or check stock in another location
hcloud server create rejects --datacenterHetzner removed --datacenter in 2026; use --location (hel1, nbg1, ash, hil, sin)
Outgoing SMTP times outCheck KAESO_SMTP_PORT: Hetzner blocks ports 25 and 465 by default, while port 587 is open. Verify with docker compose exec gateway kaeso mail test owner@example.com
Let's Encrypt fails after cloud-init bootConfirm your A/AAAA records resolve to the server's IP and that the Cloud Firewall allows TCP 80 and 443; check docker compose logs caddy
Outbound connections stop working after editing firewall rulesAdding any outbound rule to a Hetzner Cloud Firewall makes outbound deny-by-default; remove outbound rules or explicitly allow DNS, HTTPS and SMTP 587

See Troubleshooting in the Linux server guide for Docker, memory and setup-link issues.

What was tested

The Hetzner steps were checked against Hetzner Cloud's documentation and hcloud 1.70.2 help output on 22 November 2026; Kaeso hasn't been installed on Hetzner Cloud for this guide. For the shared Compose package, the 0.7.0 compose.yaml, .env, kaeso config check and first start against PostgreSQL, ClickHouse and Valkey were tested locally, and the 0.6-to-0.7 update path was tested on a Debian server during the 0.7.0 release. If you deploy it there, tell us how it went.

Next steps

Product names in this guide belong to their owners and are used only to name the software and services involved. Kaeso is not affiliated with or endorsed by them.

By Kaeso Team

On this page

Own the gateway.Own the record.

curl -fsSLhttps://kaeso.app/install.sh | sh