|Yarmo Mackenbach 932b5a580c||2 years ago|
|src||2 years ago|
|LICENSE||2 years ago|
|README.md||2 years ago|
|duhm||2 years ago|
|settings.template.yml||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
For now, depending on your preference, either go with:
git clone https://codeberg.org/yarmo/duhm.git cd duhm cp duhm /usr/local/bin
curl https://codeberg.org/yarmo/duhm/raw/branch/main/duhm -o /usr/local/bin/duhm
Currently looking into packaging. Open to suggestions/PR.
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.
Create a new
server.yml file with the following content:
commands: up: docker-compose up -d down: docker-compose down ssh: host: 184.108.40.206 port: 22 user: user vps: name: stream-server type: 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.