{"id":24481179,"url":"https://github.com/mrsimonemms/devpod-provider-hetzner","last_synced_at":"2025-04-13T15:40:22.568Z","repository":{"id":173761188,"uuid":"651038175","full_name":"mrsimonemms/devpod-provider-hetzner","owner":"mrsimonemms","description":"DevPod on Hetzner","archived":false,"fork":false,"pushed_at":"2025-03-13T14:32:02.000Z","size":143,"stargazers_count":35,"open_issues_count":0,"forks_count":6,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-04T14:41:09.060Z","etag":null,"topics":["cloud-development","cloud-development-environment","cloud-development-environments","codespaces","devpod","devpod-provider","gitpod","hetzner","remote-development"],"latest_commit_sha":null,"homepage":"https://devpod.sh/docs/managing-providers/add-provider#community-providers","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mrsimonemms.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-06-08T11:01:01.000Z","updated_at":"2025-03-13T14:31:19.000Z","dependencies_parsed_at":null,"dependency_job_id":"1c3cc97f-609f-4160-93b6-b7ec04a91e18","html_url":"https://github.com/mrsimonemms/devpod-provider-hetzner","commit_stats":null,"previous_names":["mrsimonemms/devpod-provider-hetzner"],"tags_count":20,"template":false,"template_full_name":"mrsimonemms/golang-cobra-starter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrsimonemms%2Fdevpod-provider-hetzner","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrsimonemms%2Fdevpod-provider-hetzner/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrsimonemms%2Fdevpod-provider-hetzner/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrsimonemms%2Fdevpod-provider-hetzner/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mrsimonemms","download_url":"https://codeload.github.com/mrsimonemms/devpod-provider-hetzner/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248739732,"owners_count":21154219,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cloud-development","cloud-development-environment","cloud-development-environments","codespaces","devpod","devpod-provider","gitpod","hetzner","remote-development"],"created_at":"2025-01-21T11:19:44.487Z","updated_at":"2025-04-13T15:40:22.561Z","avatar_url":"https://github.com/mrsimonemms.png","language":"Go","funding_links":[],"categories":["Integrations"],"sub_categories":["Rust"],"readme":"# DevPod Provider Hetzner\n\n\u003c!-- markdownlint-disable-next-line MD013 MD034 --\u003e\n[![Go Report Card](https://goreportcard.com/badge/github.com/mrsimonemms/devpod-provider-hetzner)](https://goreportcard.com/report/github.com/mrsimonemms/devpod-provider-hetzner)\n\nDevPod on Hetzner\n\n\u003c!-- toc --\u003e\n\n* [Usage](#usage)\n* [Development](#development)\n  * [Required environment variables](#required-environment-variables)\n  * [Testing independently of DevPod](#testing-independently-of-devpod)\n  * [Testing in the DevPod ecosystem](#testing-in-the-devpod-ecosystem)\n* [Contributing](#contributing)\n  * [Open in a container](#open-in-a-container)\n\n\u003c!-- Regenerate with \"pre-commit run -a markdown-toc\" --\u003e\n\n\u003c!-- tocstop --\u003e\n\n\u003e Use [this referral code](https://hetzner.cloud/?ref=UWVUhEZNkm6p) to get €20 in\n\u003e credits (at time of writing).\n\n[DevPod](https://devpod.sh/) on [Hetzner](https://hetzner.cloud/?ref=UWVUhEZNkm6p).\nThis is based upon the [DigitalOcean provider](https://github.com/loft-sh/devpod-provider-digitalocean).\n\n## Usage\n\nTo use this provider in your DevPod setup, you will need to do the following steps:\n\n1. See the [DevPod documentation](https://devpod.sh/docs/managing-providers/add-provider)\n   for how to add a provider\n1. Use the reference `mrsimonemms/devpod-provider-hetzner` to download the latest\n   release from GitHub\n1. Get an [API token](https://docs.hetzner.com/cloud/api/getting-started/generating-api-token/)\n   from Hetzner. This will be used to manage resources.\n\n## Development\n\n### Required environment variables\n\n\u003e These are pre-configured in Dev Containers\n\n| Variable | Description | Example |\n| --- | --- | --- |\n| `DISK_IMAGE` | Hetzner image tag | `docker-ce` |\n| `DISK_SIZE` | Disk size in GB | `30` |\n| `GIT_REPO` | Git repo to download | `github.com/mrsimonemms/devpod-provider-hetzner` |\n| `HCLOUD_TOKEN` | [Hetzner API key](https://docs.hetzner.com/cloud/api/getting-started/generating-api-token/) | - |\n| `MACHINE_FOLDER` | Local home folder | `~/.ssh` |\n| `MACHINE_ID` | Unique identifier for the machine | `some-machine-id` |\n| `MACHINE_TYPE` | Hetzner machine size | `cx22` |\n| `REGION` | Hetzner region ID | `nbg1` |\n| `TOKEN` | **Deprecated**. Replaced by `HCLOUD_TOKEN` | - |\n\n### Testing independently of DevPod\n\nTo test the provider workflow, you can run the CLI commands directly.\n\n| Command | Description | Example |\n| --- | --- | --- |\n| `command` | Run a command on the instance | `COMMAND=\"ls -la\" go run . command` |\n| `create` | Create an instance | `go run . create` |\n| `delete` | Delete an instance and volume | `go run . delete` |\n| `init` | Initialise an instance | `go run . init` |\n| `start` | Start an instance | `go run . start` |\n| `status` | Retrieve the status of an instance | `go run . status` |\n| `stop` | Stop an instance | `go run . stop` |\n\n### Testing in the DevPod ecosystem\n\n\u003e This assumes a Linux AMD64 workspace - if you're developing on any other machine\n\u003e please update the instructions for that machine (PRs welcome).\n\u003e\n\u003e These paths may differ on your machine.\n\nTo test the provider within the DevPod ecosystem:\n\n1. Install the latest version of the [Hetzner provider](#usage)\n1. Backup the original binary:\n\n   ```shell\n   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\n   ```\n\n1. Build the binary:\n\n   ```shell\n   go build .\n   ```\n\n1. Move the new binary to the DevPod base:\n\n   ```shell\n   mv ./devpod-provider-hetzner ~/.devpod/contexts/default/providers/hetzner/binaries/hetzner_provider/devpod-provider-hetzner-linux-amd64\n   ```\n\n## Contributing\n\n* Get a [Hetzner](https://hetzner.cloud/?ref=UWVUhEZNkm6p) account\n* Get an [API token](https://docs.hetzner.com/cloud/api/getting-started/generating-api-token/)\n  with `read \u0026 write` access\n* Save this as `HCLOUD_TOKEN` in your `.envrc` file\n\n### Open in a container\n\n* [Open in a container](https://code.visualstudio.com/docs/devcontainers/containers)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrsimonemms%2Fdevpod-provider-hetzner","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmrsimonemms%2Fdevpod-provider-hetzner","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrsimonemms%2Fdevpod-provider-hetzner/lists"}