Deploy on a VPS
This guide covers deploying a Kyushu worker on a fresh VPS. The example uses Hetzner Cloud with Ubuntu 24.04, but any VPS with a recent Ubuntu/Debian works.
Prerequisites
Section titled “Prerequisites”- A VPS with Ubuntu 24.04
- A domain pointing to the VPS IP (A record)
- SSH access as root
-
Update the system and install Caddy
Terminal window apt update && apt upgrade -yapt install -y curl caddy -
Install the Kyushu CLI
Terminal window curl -fsSL https://kyushu.dev/install | bashsource $HOME/.cargo/envkyu --version -
Deploy your worker
Copy your built artifacts to the VPS — the
kyushu.run.toml, the compiled wasm, and any static files:Terminal window mkdir -p /opt/yourwebsitersync -av ./dist user@yourserver:/opt/yourwebsite/ # For example -
Create a systemd service
Terminal window cat > /etc/systemd/system/kyushu.service << 'EOF'[Unit]Description=Your SiteAfter=network.target[Service]ExecStart=/root/.cargo/bin/kyu run kyushu.run.tomlWorkingDirectory=/opt/yourwebsiteRestart=on-failureRestartSec=5[Install]WantedBy=multi-user.targetEOFsystemctl daemon-reloadsystemctl enable kyushusystemctl start kyushusystemctl status kyushuThe service starts automatically on boot and restarts on failure.
-
Configure Caddy
Once your domain’s DNS has propagated, configure Caddy as a reverse proxy. Check propagation first:
Terminal window dig yourdomain.com +short @8.8.8.8Then write the Caddyfile:
Terminal window cat > /etc/caddy/Caddyfile << 'EOF'yourdomain.com {reverse_proxy localhost:5987}EOFsystemctl restart caddyCaddy automatically provisions and renews a TLS certificate via Let’s Encrypt.
Verify
Section titled “Verify”curl https://yourdomain.comUpdating
Section titled “Updating”To deploy a new release, stop the service, replace the files, and restart:
systemctl stop kyushu# copy your updated artifacts to /opt/yourwebsitesystemctl start kyushu