Provisioning di Fedora CoreOS su Hetzner
Questa guida mostra come fornire nuovi nodi Fedora CoreOS (FCOS) su Hetzner. Attualmente, Fedora CoreOS non è disponibile come opzione nella selezione del sistema operativo su Hetzner. Quindi, devi prima scaricare l’immagine del disco di Fedora CoreOS per Hetzner, poi creare uno snapshot da essa nel tuo account Hetzner utilizzando lo strumento [hcloud-upload-image](https://github.com/apricote/hcloud-upload-image), e infine creare i tuoi server da questo snapshot.
Il supporto per Fedora CoreOS su Hetzner è considerato emergente, poiché non offre ancora un’esperienza utente ottimizzata e si basa su strumenti non ufficialmente supportati da Hetzner. Per maggiori dettagli, consulta l'[issue #1324](https://github.com/coreos/fedora-coreos-tracker/issues/1324). |
Lo strumento [hcloud-upload-image](https://github.com/apricote/hcloud-upload-image) non è un prodotto ufficiale di Hetzner Cloud e Hetzner Cloud non fornisce supporto per esso. In alternativa, puoi utilizzare il plugin ufficiale [packer-plugin-hcloud](https://github.com/hetznercloud/packer-plugin-hcloud) per installare l’immagine tramite coreos-installer .
|
Per creare uno snapshot, lo strumento hcloud-upload-image provvederà a fornire un piccolo server e avviarlo in modalità di recupero. Poiché questo server è di breve durata, il costo dovrebbe essere molto limitato. Gli snapshot risultanti vengono addebitati per GB al mese. Consulta la documentazione Backups/Snapshots nella Hetzner Cloud. È possibile eliminare questo snapshot una volta che il server è stato fornito. |
Prerequisiti
Before provisioning an FCOS machine, you must have an Ignition configuration file containing your customizations. If you do not have one, see Producing an Ignition File.
Fedora CoreOS has a default core user that can be used to explore the OS.
If you want to use it, finalize its configuration by providing e.g. an SSH key.
|
If you do not want to use Ignition to get started, you can make use of the Afterburn support and only configure SSH keys.
You also need to have access to a Hetzner account. The examples below use the hcloud command-line tool, the hcloud-upload-image tool and jq as a command-line JSON processor.
Downloading an Hetzner image
Fedora CoreOS is designed to be updated automatically, with different schedules per stream. Once you have picked the relevant stream, download and verify the latest Hetzner image:
ARCH="x86_64" # or "aarch64"
STREAM="stable" # or "testing", "next"
coreos-installer download -s "$STREAM" -p hetzner -a "$ARCH" -f raw.xz
Both x86_64 and aarch64 architectures are supported on Hetzner. |
Alternatively, you can manually download an Hetzner image from the download page. Verify the download, following the instructions on that page.
Creating a snapshot
-
Use the
hcloud-upload-image
to create a snapshot from this image:IMAGE_NAME="fedora-coreos-41.20250213.0-hetzner.x86_64.raw.xz" export HCLOUD_TOKEN="<your token>" STREAM="stable" # or "testing", "next" HETZNER_ARCH="x86" # or "arm" hcloud-upload-image upload \ --architecture "$HETZNER_ARCH" \ --compression xz \ --image-path "$IMAGE_NAME" \ --labels os=fedora-coreos,channel="$STREAM" \ --description "Fedora CoreOS ($STREAM, $ARCH)"
The hcloud-upload-image
tool uses different names for architectures (x86_64
→x86
,aarch64
→arm
). -
Wait for the process to complete and validate that you have a snapshot:
hcloud image list --type=snapshot --selector=os=fedora-coreos
Launching a server
-
If you don’t already have an SSH key uploaded to Hetzner, you may upload one:
Example uploading an SSH key to HetznerSSH_PUBKEY="ssh-ed25519 ..." SSH_KEY_NAME="fedora-coreos-hetzner" hcloud ssh-key create --name "$SSH_KEY_NAME" --public-key "$SSH_PUBKEY"
-
Launch a server. Your Ignition configuration can be passed to the VM as its user data, or you can skip passing user data if you just want SSH access. This provides an easy way to test out FCOS without first creating an Ignition config.
Example launching FCOS on Hetzner using an Ignition configuration file and SSH keyIMAGE_ID="$(hcloud image list \ --type=snapshot \ --selector=os=fedora-coreos \ --output json \ | jq -r '.[0].id')" SSH_KEY_NAME="fedora-coreos-hetzner" # See: hcloud ssh-key list DATACENTER="fsn1-dc14" # See: hcloud datacenter list TYPE="cx22" # See: hcloud server-type list NAME="fedora-coreos-test" IGNITION_CONFIG="./config.ign" hcloud server create \ --name "$NAME" \ --type "$TYPE" \ --datacenter "$DATACENTER" \ --image "$IMAGE_ID" \ --ssh-key "$SSH_KEY_NAME" \ --user-data-from-file "$IGNITION_CONFIG"
While the Hetzner documentation and website mentions cloud-init
and "cloud config", FCOS does not support cloud-init. It accepts only Ignition configuration files. -
You now should be able to SSH into the instance using the associated IP address.
Example connectingssh core@"$(hcloud server ip "$NAME")"
Want to help? Learn how to contribute to Fedora Docs ›