Downgrade/Upgrade Hetzner Machines
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Yarmo Mackenbach 932b5a580c Build bin 2 years ago
src Set sleep to 15 seconds 2 years ago
LICENSE Initial commit 2 years ago Update README 2 years ago
duhm Build bin 2 years ago
settings.template.yml Initial code commit 2 years ago


Downgrade/Upgrade Hetzner Machines

CLI generated using bashly


I have an Owncast instance hosted on a Hetzner VPS. To get the most out of both, I run the VPS regularly in the lowest tier, switch it to the highest tier right before streaming then switch back to the lowest tier after streaming.

duhm makes this process stupidly simple.


Use case 1: downgrading and upgrading the machine

duhm upgrade server.yml
duhm downgrade server.yml

Use case 2: powering the machine on and off

duhm poweron server.yml
duhm poweroff server.yml


Make sure you have hcloud (repo) installed.

For now, depending on your preference, either go with:

git clone
cd duhm
cp duhm /usr/local/bin


curl -o /usr/local/bin/duhm

Currently looking into packaging. Open to suggestions/PR.

Setting up

Hetzner/hcloud settings

Go to your Hetzner project > Security > API tokens. Generate a new API token.

On your machine, run:

hcloud context create my-project

which will ask you for the API token.

Local settings

Create a new server.yml file with the following content:

  up: docker-compose up -d
  down: docker-compose down

  port: 22
  user: user

  name: stream-server
    upgrade: cpx51
    downgrade: cpx11


Currently, the script doesn't check the current state of machines. This may lead to scripts hanging or sometimes acting weirdly.

If sever