I didn’t realize I was an OpenBSD user

A long read, but may be interesting...

I Wanted to get into a nix OS at home, after being away for many
years. Researched a short list of nix OSs. To be honest, OpenBSD was at
the bottom of the list due to text install and what seemed like a
limited list of ports. Tried the others. If I got an install I liked,
they all failed on updates with various script errors. I can
troubleshoot and fix script errors - the point is I want to spend time
working on my code. I was down to my last option - OpenBSD.

I'd been watching CDE progress to open source - Fond memories of a Sun /
Solaris / CDE environment. When CDE / MWM did go open source, OpenBSD
was supported. I did the OpenBSD / CDE install on my desktop at the end
of 2018 and it has been great. I've since moved on to a more modern
window manager but CDE got my foot in the door.

When it came time to update to a new OpenBSD version I did a clean
install and started scripting my custom changes. From long ago, I prefer
not to upgrade in place, due to the cruft. Sure I could figure out a way
to analyze what is not needed but why bother. The OpenBSD install is so
simple and fast. I install, run a script to configure and then have a
shiny new machine. For small server roles, it takes 15-20 minutes to
reinstall. Desktop machines take an hour or so, due to ports installs.
With other OSs it would take several days to reinstall my desktop,
including base system, latest drivers, GUI apps and then customizing all
the settings. Scripting configuration and package installs is so much
simpler.

Then, I replaced my DNS / DHCP / NTP / Web server with OpenBSD. At this
point, I started going fanless for new machines - APU2D4 (now APU2E4) is
more than needed but provides headroom for the future. I studied and
configured unbound and it has been so stable. I've had a home web server
for years which migrated from PERL to C# to C++ and from plain HTML to
Angular with JQuery Mobile. I migrated this code to run with httpd
slowcgi (sort of like a poor man's serverless config - perfect for home
use).

Next, I had several off the shelf systems I wanted to replace -
Multi-room audio, NAS, VPN Router, Wifi AP. I estimated the lines of
code running on my existing home network and the numbers were crazy.

For multi-room audio, I set up a proof of concept with some old
computers and configured mpd to use sndio. It worked great. I purchased
several more APU2D4 machines and USB Behringer UCA202 DACs for the
audio. I created C++ microservices to run with httpd slowcgi and build /
send mpc commands to control mpd. Simple, no library dependencies and
easy to update / test. Maybe someday I'll change the interface but this
has been working well. For UI, I created a page to select a room and
send commands. Wanting a single volume control, I opted to expose master
volume (rather than mpd volume). I needed to select music, so I created
another page to access music data. I'm only really interested in
playlists, artists, genres and songs, so I provided these in the song UI
and allow adding to the queue of whatever room is currently selected.
Each room can operate independently or output to multiple rooms.

From the beginning I have used amd to mount NAS NFS shares. Tweaked the
mount_nfs parameters to get better throughput - It is great.

With the concept of rooms on the web page, I added more remote control
features. I control all infrared home audio and video devices with IP2IR
from Global Cache. Used to have an app (that had issues) - replaced it
with my web page. Then, added control of a home theater receiver using
it's REST API.

In my spare time, I had created a mobile first remote control for the
whole home audio and video. Put all the remotes in a drawer. With one
web page, it works across-platforms on any device with a browser (all
types of phones, desktops, tablets) with zero install. The page
refreshes when others make changes, so there are no issues with synch
across clients.

With a few nodes on my network, I wanted to see status over time. I used
d3js to create a network diagram web page. Added an APU2 machine to the
network for running cron jobs. Added a script to create SVGs for CPU,
memory, network and disk from symux RRD files. Now click a node in the
diagram and see the machine stats. I can change the time reference for
the last 24 hours, 7 days, 30 days or year. The SVG charts are built on
a schedule, based on priority of the machines. It is incredible to have
this visibility. Always wanted to monitor my network over time but did
not have the tools.

Next, with some experience and confidence with OpenBSD, I replaced the
VPN router with an APU2 gateway. Simple install with pf and more stats
for the network diagram.

Auto-update - at this point, I created cron jobs to update all machines
during off-hours. I don't notice the updates unless I look at uptime on
the machines.

I bought two more APU2 machines and configured wireless APs (one 2.4GHz
and one 5GHz) with athn radios. Used these for about a year and then
switched back to a new router. The WiFi was just too slow for some
videos and some stuttering on ssh. It was improving with each OpenBSD
release. Watching all the wired, wireless and kernel progress with
anticipation of switching back to these APs.

Now came the NAS. Was using a NAS that wanted to do way too much. Built
a Supermicro Mini-ITX system (A2SAV, dmesg below) with four 2.5 in
drives using onboard Marvell 88SE9230 hardware RAID. The relatively
small case has ventilation on all sides. It does have a fan, but I don't
think it turns on often - even hidden away in a cabinet. I understand
amd has a 2G limit in the kernel but I have seen no issues with my
OpenBSD NAS. Would like to know how to reproduce a scenario where this
2G limit can be seen, to understand the possible impact. Added the NAS
to my network diagram and can monitor activity over time.

Found rsync script to do differential backups with hard links. Did a
thorough review of the script before trusting it and did have to make
some tweaks. Works great and I now have NAS backups. Years ago, I had
backup software that became outdated and I gave up on differentials.
Instead I just copied whole disks periodically. I prefer the new method.

About this time I started purchasing a few APS UPSs (600M1 and 650M1)
with USB connection to a machine for sensor data. Added UPS to the
network diagram and I track UPS stats over time. With the low power
devices I have about 40 minutes of extra time in a power outage situation.

I also picked up some TemperHum USB thermostats to monitor temperature
and humidity in several rooms. Added these to the network diagram and
stats to my httpd home page. Would like to calibrate these for improved
accuracy, but not critical at this time.

Removed ports from my installations where functionality existed in base.
I strive to vary as little as possible from the base install. Would be
really nice to have a GUI web browser in base, but I understand this
would be a huge effort.

Next comes the media centers. Each room that has a TV got a Compulab
Fitlet2 machine (dmesg, below) with HDMI output to the TV. Added to the
remote control web page to configure for media center. After lots of
consideration of what I want from a media center, I set up the remote to
play slideshows, videos, a couple apps from ports, some browser links
and games. Configured remote control buttons to send simple key commands
from the remote and hooked up a small media keyboard for when more
keyboard interaction is needed. Created script to pre-evaluate all
picture files, so slideshows start quickly (even with almost 20k pictures).

Checked network throughput to and from each machine with tcpbench. Found
a few degraded cables and replaced with CAT7. Found the CAT7 cables gave
a couple extra megabits of throughput (even with CAT6 in the walls), so
replaced all cables with CAT7. On APU2 machines my numbers did not match
what I read on the mailing lists - updated to the latest BIOS and saw
improvement.

My APU2s max out at around 650 megabits per second on the network. The
Fitlet2 can throughput at line rate. Looks like the same Intel hardware.
With systat, observed a single APU2 CPU was 100% and figure this is the
bottleneck. With the faster CPU (and memory?) on Fitlet2 it is able to
throughput more data. From the mailing lists, it sounds like work is
being done to improve the threading for network traffic - looking
forward to the improvements.

Bought a USB camera, plugged it in to a media center, configured motion
to send the video and set up a web page to display the video. Will do
more of this in the future.

I spent some time upgrading the web pages from Angular and JQuery Mobile
to AngularJS Material. I locally self-host all js libraries I'm using
and use plain HTML. Self-hosting ensures local services work if there is
an internet outage. I resist systems to "build" web pages. The result is
a home page SPA (single page application) menu of a bunch of SPAs.

About this time, I added VPN access for the home network.

With a more robust network running OpenBSD, I was ready to take the next
steps - More apps served up to all devices from OpenBSD.

My Remote control web app replaced an app I had purchased from the app
store. If I could replace this complex app it seemed that I could
replace more mobile apps. Doing this provides a single app that works on
desktop as well as mobile - install and maintain fewer apps everywhere.
Configured chromium to display the pages in app mode on desktops. I now
use the web apps on all my devices. They look the same on all devices
and only change when I change them. A web page push changes the app
everywhere. I also feel better owning the web server for my apps.

I stopped using browser bookmarks and added a links web page app
instead. With this page, I don't need to try to sync bookmarks across
devices.

The features provided by store apps these days are often trivial and
well understood. I pull stock quotes, news RSS feeds and weather data to
a local server and then serve up the data from my own web pages. Created
a scientific calculator and world clock. Have a world atlas using a d3js
globe. Created ToDone app with goals, projects and tasks. Notes,
pictures, videos, books - all now have a web app to navigate folder data
from the NAS and view. Books display as PDFs or use js code to display
epubs in the browser. My notes web app displays and edits notes in
markdown. I generate web page thumbnails with a script.

My phone does not look like a typical phone any more - I have a bunch of
simple monochrome icons for my OpenBSD apps, but they are easy to
recognize. Looking forward to the possibility of an OpenBSD phone.

Most of the microservice and web work I have done is custom but it seems
like a project could try to create these as standard services. The
scripts I use to configure machines per role could also be standardized,
if there was agreement on the configurations. I know I could learn a
great deal from others who have set up similar configurations.

Thanks to the community! I learn a great deal from the mailing lists and
feel like I know those that post frequently.

If you made it to this closing statement - Hope you found this informative.


You'll only receive email when they publish something new.

More from Isak
All posts