OpenBSD

I installed OpenBSD on my old Dell XPS 9380 and trying out a new setup. I am using it without constant internet connection, and without a display manager. This is an ultimate distraction free environment, as if you are on a flight.

This is a living document with some useful info on how I set up OpenBSD and what worked, what didn't.

Installation itself was trivial. I used a wired connection when installing and doing post-install setup. My laptop has an Atheros card which is not supported, and I'm using a TP-Link dongle (TL-WN722N) to connect to wifi networks.

We need to setup doas now. The doas command is similar to sudo to run commands as root. Add this to /etc/doas.conf first: permit persist :wheel.

We now can install some packages. OpenBSD has a repository of pre-compiled binaries you can install with pkg_add.


doas pkg_add git w3m bash python neomutt go

I use bash, let's switch from korn shell to bash.


chsh -s /usr/local/bin/bash

Generate key for github to get the dotfiles and other repos.


ssh-keygen -t ed25519 -C "y0b1byte@proton.me"

Setting up wifi was a bit more involved, but quite trivial. For some reason, running fw_update did not download the firmware, but fw_update -a did. After that, I added the following to my /etc/hostname.athn0:


join "Network Name" wpakey "password"
inet autoconf

Now, when I plug in the dongle, I have to run doas sh /etc/netstart athn0

AFAIK, protonmail bridge is not supported in OpenBSD, but there is a third-party open source version of it called hydroxide. This is the reason we had to install go above. Setup is mostly trivial.


git clone https://github.com/emersion/hydroxide.git
cd hydroxide
go build ./cmd/hydroxide

# I have the repo in $HOME/dev/hydroxide.
$HOME/dev/hydroxide/hydroxide auth

# This spits out a token, save/encrypt it to use for imap_pass and smtp_smtp pass in your muttrc.
# I am not sure what is the safest way of storing it there, so, you will have to figure it out.

$HOME/dev/hydroxide/hydroxide imap&
$HOME/dev/hydroxide/hydroxide smtp&