Looking for help installing Virtualmin on FreeBSD 13.1

Selecting a Unix or Unix-like OS based upon the availability of an official Virtualmin installation script is like the tail of a dog wagging the dog. Since 2016 we have been running FreeBSD systems with Webmin installed, and later also the Virtualmin module installed in Webmin. Our primary reason for selecting FreeBSD was that it is the principal primogenitor of macOS, which most of our systems run. We also have a couple of systems running Ubuntu Linux. Over the years since 2016 our preference has only grown stronger for true Unix systems like macOS and FreeBSD over Linux systems for many reasons that are beyond the scope of this reply.

As Joe noted: “Our install process starts with a script, but the script just detects the OS, sets up the OS repositories and installs the dependencies…all the work is handled by the yum groups or metapackages (for dependency installation) and virtualmin-config for configuration.” This installation is easily reproduced using the FreeBSD package management system as Jeremy Horland explained. However, there are disadvantages to using the packages. The main disadvantage is that the packaged versions occasionally lag behind the latest versions. Webmin will offer to self-update by clicking a button that appears on the Dashboard when an update is available. Unfortunately, deciding not to wait for updated packages and running the self-update causes the automatic FreeBSD security system to detect this as extensive corruption. The quite long security reports automatically sent by FreeBSD to the Superuser via email listing all the apparently missing and corrupt files quickly become tedious. There is a way to mitigate this, but the mitigation must be repeated after each self-update.

Six commands run from the Unix command prompt with Superuser privileges can install Webmin on FreeBSD. Here are examples:

% sudo cd /usr/local/lib

% sudo wget --show-progress --no-host-directories --directory-prefix=/usr/local/lib http://software.virtualmin.com/gpl/wbm/webmin-current.tar.gz

% sudo tar --extract --file webmin-current.tar.gz

% sudo rm webmin-current.tar.gz

% sudo pkg install p5-Authen-PAM p5-IO-Tty p5-Net-SSLeay python3.9 perl5

% sudo /usr/local/lib/webmin-2.021/setup.sh

The second to last command line installs the dependencies listed on the FreshPorts page referenced above by Jeremy Horland. The path to the setup shell script file in the last command line includes the name of the directory created by extracting the current version of Webmin. The setup shell script supports FreeBSD, which is really what counts. After Webmin is Installed, modules such as Virtualmin can be installed in Webmin.

I should note that FreeBSD 13.2 is now the current release version. Yesterday I upgraded a system running FreeBSD 13.1 to FreeBSD 13.2. All ran smoothly. Only a few minor edits of /etc/ssh/sshd_config were needed to reconcile some earlier edits I had made with the new defaults.