Compare commits

...

3 commits

Author SHA1 Message Date
renovate[bot]
fbd639ba59
chore(deps): update dependency go to v1.25.1 (#106) 2025-09-13 10:25:46 +02:00
George Gaál
b877383556
docs: update README (#116)
small beautiful changes
2025-09-13 09:31:05 +02:00
renovate[bot]
b5abcc149a
chore(deps): update docker/login-action digest to 65c0768 (#107) 2025-09-13 09:27:43 +02:00
4 changed files with 13 additions and 17 deletions

View file

@ -17,7 +17,7 @@ jobs:
uses: actions/checkout@v5
- name: Log in to the Container registry
uses: docker/login-action@6d4b68b490aef8836e8fb5e50ee7b3bdfa5894f0
uses: docker/login-action@65c0768122147b63190ddda25aa21f81640cf5f3
with:
registry: ghcr.io
username: ${{ github.actor }}

View file

@ -1,4 +1,4 @@
# `hcloud-upload-image`
# hcloud-upload-image
<p align="center">
Quickly upload any raw disk images into your <a href="https://hetzner.com/cloud" target="_blank">Hetzner Cloud</a> projects!
@ -13,26 +13,22 @@
## About
The [Hetzner Cloud API](https://docs.hetzner.cloud/) does not support uploading disk images directly, and it only
provides a limited set of default images. The only option for custom disk images that users have is by taking a
"snapshot" of an existing servers root disk. These can then be used to create new servers.
The [Hetzner Cloud API](https://docs.hetzner.cloud/) does not support uploading disk images directly and only provides a limited set of default images. The only option for custom disk images is to take a snapshot of an existing servers root disk. These snapshots can then be used to create new servers.
To create a completely custom disk image, users have to follow these steps:
To create a completely custom disk image, users need to follow these steps:
1. Create server with the correct server type
2. Enable rescue system for the server
1. Create a server with the correct server type
2. Enable the rescue system for the server
3. Boot the server
4. Download the disk image from within the rescue system
5. Write disk image to servers root disk
5. Write the disk image to the servers root disk
6. Shut down the server
7. Take a snapshot of the servers root disk
7. Take a snapshot of the servers root disk
8. Delete the server
This is an annoyingly long process. Many users have automated this with [Packer](https://www.packer.io/) &
[`packer-plugin-hcloud`](https://github.com/hetznercloud/packer-plugin-hcloud/) before, but Packer offers a lot of
additional complexity to wrap your head around.
This is a frustratingly long process. Many users have automated it with [Packer](https://www.packer.io/) and [`packer-plugin-hcloud`](https://github.com/hetznercloud/packer-plugin-hcloud/), but Packer introduces additional complexity that can be difficult to manage.
This repository provides a simple CLI tool & Go library to do the above.
This repository provides a simple CLI tool and Go library to streamline the process.
## Getting Started
@ -44,7 +40,7 @@ We provide pre-built `deb`, `rpm` and `apk` packages. Alternatively we also prov
Check out the [GitHub release artifacts](https://github.com/apricote/hcloud-upload-image/releases/latest) for all of these files and archives.
##### Arch Linux
#### Arch Linux
You can get [`hcloud-upload-image-bin`](https://aur.archlinux.org/packages/hcloud-upload-image-bin) from the AUR.

2
go.mod
View file

@ -2,7 +2,7 @@ module github.com/apricote/hcloud-upload-image
go 1.23.0
toolchain go1.24.3
toolchain go1.25.1
require (
github.com/apricote/hcloud-upload-image/hcloudimages v1.1.0

View file

@ -2,7 +2,7 @@ module github.com/apricote/hcloud-upload-image/hcloudimages
go 1.23.0
toolchain go1.24.3
toolchain go1.25.1
require (
github.com/hetznercloud/hcloud-go/v2 v2.23.0