Ports

OpenBSD provides a ports tree for installing software. You can find a copy of the ports from the mirrors page.

$ cd /tmp
$ ftp https://cdn.openbsd.org/pub/OpenBSD/$(uname -r)/{ports.tar.gz,SHA256.sig}
$ signify -Cp /etc/signify/openbsd-$(uname -r | cut -c 1,3)-base.pub -x SHA256.sig ports.tar.gz

If that returns OK, then the download was successful and valid. As root, run:

# cd /usr
# tar xzf /tmp/ports.tar.gz

To build a package from ports,

$ cd /usr/ports/<folder>/<package>
$ doas make install

(This last step is bad practice since building can be done without being root; only installation requires root privileges)