Skip to content

Instantly share code, notes, and snippets.

@c0m4r
Last active November 16, 2025 08:23
Show Gist options
  • Select an option

  • Save c0m4r/142a0480de4258d5da94ce3a2380e8bb to your computer and use it in GitHub Desktop.

Select an option

Save c0m4r/142a0480de4258d5da94ce3a2380e8bb to your computer and use it in GitHub Desktop.
FreeBSD installation on Hetzner Cloud VPS

FreeBSD on Hetzner Cloud VPS

This guide explains how to install the FreeBSD on Hetzner Cloud VPS. This might also work for other VPS providers with the proper rescue system in place.

Table of contents:

1. Rescue mode

Log into Hetzner Cloud, switch to your VPS control panel, select Rescue -> Enable Rescue and Power Cycle. It takes up to 1 minute to boot into rescue mode. Your login details will be displayed in the control panel after you activate the console. You can also use previously defined SSH keys.

image

2. Download and deploy FreeBSD

We will use the FreeBSD VM image which includes everything we need.

Head over to freebsd.org/where and choose VM -> amd64 of the latest release.

At the time of writing this it was 14.3.

Download *-amd64.raw.xz and make a binary copy into the drive.

Don't worry about the initial root parition size, it will extend itself after first boot.

wget https://download.freebsd.org/releases/VM-IMAGES/14.3-RELEASE/amd64/Latest/FreeBSD-14.3-RELEASE-amd64.raw.xz
wipefs -a /dev/sda
cat FreeBSD-14.3-RELEASE-amd64.raw.xz | xz -dc | dd of=/dev/sda bs=1M status=progress
reboot

FreeBSD should now boot and you can continue your setup via Console with FreeBSD Handbook.

image

It might be obvious for many, but the default login is root and it does not require a password.

3. Post-installation

  • Change root password: passwd
  • Update the system: pkg update
  • Install useful stuff: pkg install bash bash-completion bind-tools curl gnu-watch htop lsblk lsof mc mtr-nox11 nano vim wget whois
  • Enable the SSH Server
  • Take care of Security

If you found this article helpful, please consider making a donation to a charity on my behalf. Thank you.

Enjoy your FreeBSD adventure!

image

@phips
Copy link

phips commented May 20, 2025

The very image I am using 😄 ZFS root FTW! 💪

@dafvid
Copy link

dafvid commented Nov 15, 2025

Thanks! Note that there's also a Root-on-ZFS cloud image :)

Would you have an URL to go with that? I’m getting stuck in a boot loop. Tried to install the zfs image instead from FreeBSD but I guess I destroyed the VPS. Tried following the guide but no good. Trying again tomorrow.

@c0m4r
Copy link
Author

c0m4r commented Nov 16, 2025

@phips
Copy link

phips commented Nov 16, 2025

This is much easier these days if installing to a virtual on Hetzner @dafvidhttps://youtu.be/8RGbstrTWUo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment