DevPod Provider Hetzner

July 31, 2025 · View on GitHub

Go Report Card

DevPod on Hetzner

Use this referral code to get €20 in credits (at time of writing).

DevPod on Hetzner. This is based upon the DigitalOcean provider.

Project status

This project is feature-complete and in maintenance-mode.

This project is very much alive and will receive regular dependency updates. I do not intend to add any new features unless requested by a large number of people or to fix changes made by DevPod or Hetzner.

Usage

To use this provider in your DevPod setup, you will need to do the following steps:

  1. See the DevPod documentation for how to add a provider
  2. Use the reference mrsimonemms/devpod-provider-hetzner to download the latest release from GitHub
  3. Get an API token from Hetzner with read & write access. This will be used to manage resources.

Development

Required environment variables

These are pre-configured in Dev Containers

VariableDescriptionExample
DISK_IMAGEHetzner image tagdocker-ce
DISK_SIZEDisk size in GB30
GIT_REPOGit repo to downloadgithub.com/mrsimonemms/devpod-provider-hetzner
HCLOUD_TOKENHetzner API token with read & write access-
MACHINE_FOLDERLocal home folder~/.ssh
MACHINE_IDUnique identifier for the machinesome-machine-id
MACHINE_TYPEHetzner machine sizecx22
REGIONHetzner region IDnbg1
TOKENDeprecated. Replaced by HCLOUD_TOKEN-

Testing independently of DevPod

To test the provider workflow, you can run the CLI commands directly.

CommandDescriptionExample
commandRun a command on the instanceCOMMAND="ls -la" go run . command
createCreate an instancego run . create
deleteDelete an instance and volumego run . delete
initInitialise an instancego run . init
startStart an instancego run . start
statusRetrieve the status of an instancego run . status
stopStop an instancego run . stop

Testing in the DevPod ecosystem

This assumes a Linux AMD64 workspace - if you're developing on any other machine please update the instructions for that machine (PRs welcome).

These paths may differ on your machine.

To test the provider within the DevPod ecosystem:

  1. Install the latest version of the Hetzner provider

  2. Backup the original binary:

    mv ~/.devpod/contexts/default/providers/hetzner/binaries/hetzner_provider/devpod-provider-hetzner-linux-amd64 ~/.devpod/contexts/default/providers/hetzner/binaries/hetzner_provider/devpod-provider-hetzner-linux-amd64-orig
    
  3. Build the binary:

    go build .
    
  4. Move the new binary to the DevPod base:

    mv ./devpod-provider-hetzner ~/.devpod/contexts/default/providers/hetzner/binaries/hetzner_provider/devpod-provider-hetzner-linux-amd64
    

Contributing

  • Get a Hetzner account
  • Get an API token with read & write access
  • Save this as HCLOUD_TOKEN in your .envrc file

Open in a container

Commit style

All commits must be done in the Conventional Commit format.

<type>[optional scope]: <description>

[optional body]

[optional footer(s)]