Post Reply 
[Tutorial] Installing MinimServer on FreeNAS or FreeBSD
29-10-2026, 05:21 (This post was last modified: 29-10-2026 05:29 by imush.)
Post: #130
RE: [Tutorial] Installing MinimServer on FreeNAS or FreeBSD
Thank you, airflow, for all these years of FreeBSD builds. While many moved to TrueNAS Core, for different reasons I decided to go in a different direction and replace FreeNAS with generic FreeBSD. While this may not be entirely justified and I am just emotionally attached to FreeBSD, I am also more comfortable administering it, can do without the GUI and do not really need docker and VM features.

Since airflow has moved on from FreeBSD, I can undertake to build the FreeBSD ohNet libraries for MinimServer. I tried to improve and automate the process as much as possible, so if minimserver upgrades ohNet, the build should appear on my github within a few days.

Links
Downloads and build scripts: https://github.com/imush/ohnet-freebsd
Install guide: https://imush.github.io/ohnet-freebsd/

The current release is ohNet 1.37.5521, a drop-in for ohnet(linux-intel)-1.37.5521.2.zip. That's the version MinimServer 2.2 has used since update 255. I'm running it on my own server, in a FreeBSD 13.1 jail on TrueNAS CORE. I've tested it on 13.1, 14 and 15, with OpenJDK 8 and 21, and with MinimServer updates 272 and 275.

What's new:
The libraries are built with FreeBSD's own compiler.
* It needs only libraries that come with FreeBSD itself. airflow's needed the gcc port's libstdc++.so.6, so users had to install lang/gcc.
* It's 1.6 MB instead of 11.8 MB, because I removed the debug info.
* It's built on 13.1, so it should load on 13.x and newer. I've tested 13.1 and 15.1.
* They're built from the upstream ohNet source, plus one small patch, on github. You can see how they're made or build them.
* A weekly check builds the newest upstream ohNet with the patch and tests it. It also flags new MinimServer updates, so a FreeBSD zip can be ready when MinimServer moves to a new ohNet. ohNet 1.42.6319, the newest upstream release, already builds and passes.
* A new rc.d script, an update of the one I posted here inĀ 2020. MinimServer's startd and stopall look for the server in /proc, or with ps options FreeBSD doesn't have, which is why stopall had to be patched again after every update. The new script finds and stops MinimServer itself, so the patch isn't needed anymore. It can also run MinimServer as its own user instead of root.

The guide covers a new install, moving an install from airflow's tutorial, and upgrading. Upgrading includes how to tell whether MinimServer has replaced the FreeBSD zip with the Linux one after an update.

To switch an existing install to the new zip, inside the jail (if minimserver is in a jail, where it probably should be):

1. Stop MinimServer, and check that it stopped. If your stopall isn't patched, it won't have.
Code:
service minimserver stop
pgrep -f mserver.jar || echo stopped
If pgrep prints a number, stop MinimServer with kill on that number.

2. Replace the zip in libext, keeping a copy of the old one:
Code:
cd /usr/local/share/minimserver/libext
mkdir -p /root/ohnet-backup && cp -p ohnet*.zip /root/ohnet-backup/
fetch -o 'ohnet(linux-intel)-1.37.5521.2.zip' https://github.com/imush/ohnet-freebsd/releases/download/v1.37.5521.2/ohnet.linux-intel.-1.37.5521.2.zip

3. Start it again:
Code:
service minimserver start

If you've been running an older zip renamed to 1.37.5521.2 (I was: mine had airflow's 1.33.4785 libraries inside), this gives you the real 1.37.5521.

I've also offered the FreeBSD fix to ohNet itself (github.com/openhome/ohNet/pull/44). Until it's merged, the patch lives in the repo.

If something doesn't work, post here or open an issue on GitHub.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: [Tutorial] Installing MinimServer on FreeNAS or FreeBSD - imush - 29-10-2026 05:21

Forum Jump:


User(s) browsing this thread: 2 Guest(s)