HOW TO INSTALL OPENBSD ON DIGITALOCEAN
2021-12-06

Create A New Droplet §
The first thing we need to do is to create a new droplet from the main menu of DigitalOcean as shown in the following picture. You can choose any operating system, it does not matter:

Enter Recovery Mod §
Now restart the machine and open the web console. Let the Ubuntu-based recovery system to power up. Once you reach the following interface, choose the sixth option:
$> wget https://cdn.openbsd.org/pub/OpenBSD/7.0/amd64/miniroot70.img
$> dd if=miniroot70.img of=/dev/vda bs=512k
This will download the miniroot base system(i.e. a net install)
and then flash it into the first 512 bytes of the hard drive(the boot sector).
Unfortunately, we cannot download the whole system right now since
it won't fit into the recovery overlay filesystem.
Once done that, power off the system by typing
poweroff
.
Now go back to the recovery tab and set back the hard drive as the default booting device.
Booting OpenBSD §
If you try to start the vm again, you should see OpenBSD installer booting up, instead of the previous operating system. Let's typeI
to begin the
installation process, answer the installer questions according to your needs
but stop just before the network configuration.
Configure The Network §
By default, DigitalOcean configures the network at the first boot using the cloud init scripts but, since OpenBSD is not supported, we have to do it by ourselves. Take a look at the following picture:
- IPv4 Address for vio0: The IP address of your server;
- Netmask for vio0: The netmask of your server;
- Default IPv4 route: The gateway of your server.
Partition The Disk §
Now it is time to create new partitions. The default partition schema will not probably work(the root partition needs to be expanded), so we will create them by hand. When prompted, chooseW
for Whole Disk MBR and then
C
for custom layout.

Name | Size |
---|---|
Swap | 2048 MiB |
Root | 23 GiB |

Installing Base System §
Now we can complete the installation by downloading the sets from the net. Follow the picture below for the right server:
