Skip to content

Instantly share code, notes, and snippets.

@c0m4r
Last active May 6, 2024 18:56
Show Gist options
  • Save c0m4r/142a0480de4258d5da94ce3a2380e8bb to your computer and use it in GitHub Desktop.
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.

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.0.

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.0-RELEASE/amd64/Latest/FreeBSD-14.0-RELEASE-amd64.raw.xz
wipefs -a /dev/sda
cat FreeBSD-14.0-RELEASE-amd64.raw.xz | xz -dc | dd of=/dev/sda bs=1M
reboot

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

image

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

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