The MineOS user interface can be installed on FreeBSD systems using the pkg
package manager and the supervisord
init system.
As written, these steps will install the webui with the following properties:
/usr/local/games/minecraft
/var/games/minecraft
https://[ip-address]:8443
in your browserroot
, and support an unlimited amount of users with one daemonized (background) process.The following steps must be executed as root
.
The MineOS web-ui requires a Linux-compatible /proc filesystem. To enable linprocfs on load, execute these commands:
# echo 'linprocfs_load="YES"' >> /boot/loader.conf
# kldload linprocfs
# mkdir -p /usr/compat/linux/proc
# mount -t linprocfs linprocfs /usr/compat/linux/proc
# echo 'linproc /usr/compat/linux/proc linprocfs rw 0 0' >> /etc/fstab
# pkg install -y rdiff-backup rsync gmake screen git python sysutils/py-supervisor www/node www/npm
Multiple appropriate Java editions exist, choose one to your liking:
# pkg install openjdk16-16.0.1+9.1
# pkg install linux-oracle-jdk18
# mkdir -p /usr/local/games
# cd /usr/local/games
# git clone git://github.com/hexparrot/mineos-node minecraft
# cd minecraft
# chmod +x service.js mineos_console.js webui.js generate-sslcert.sh
# ./generate-sslcert.sh
# cp mineos.conf /etc/mineos.conf
# echo "CXX=c++ npm install userid" | sh
# echo "CXX=c++ npm install" | sh
# cd /usr/games/minecraft
# ./generate-sslcert.sh
FreeBSD offers rc.conf
for the init system.
# cat /usr/local/games/minecraft/init/supervisor_conf.bsd >> /usr/local/etc/supervisord.conf
# echo 'supervisord_enable="YES"' >> /etc/rc.conf
Then, to manage the service:
# supervisorctl status mineos
# supervisorctl start mineos
# supervisorctl stop mineos
Where possible, it is recommended that you reboot the server here, to ensure that supervisord
starts up as expected, and starts up the MineOS webui along with it. This is different than other systems because usually no restart is necessary, but FreeBSD uses the rc.conf
system to further require whitelisting of starting processes, which could only be tested on startup.
Once the background daemon is running, you can visit https://[ipaddress]:8443
in your web browser and you will see a user and password prompt. When creating minecraft and managing Minecraft servers, use an unprivileged user to log into the webui. Creating an unprivileged user (a user that is not root
) can be accomplished with the adduser username
command. The password you set during user creation will also be the password used for the web-ui.