MineOS-node (pkg add)
Installing MineOS is easier than ever and can be done on any BSD system featuring the pkg_add (FreeBSD 9.x, etc) or pkg (FreeBSD 10.x) binary package managers. These instructions will install the most recent web-ui, based on node.js.
FreeBSD--unlike the other platforms MineOS is distributed or installed on--is a full operating system, rather than just a kernel and userland combination, as Linux is (i.e., GNU/Linux). (Free)BSD has a rich history and mature codebase, making it arguably the most stable and dependable Unix-like operating system available.
As its own OS rather than a distribution, the utilities and software that run on it are tightly regulated and upkept by the FreeBSD foundation, ensuring its security and stability. Being UNIX, rather than LINUX, many commands familiar to Linux users may not be available, but certainly will always have a comparable, if not more elegant--but also more strict--variation. Again, being UNIX, there are Pros and cons to Linux:
- Utterly stable
- Exceptionally well documented
- Vast collection of stable, secured ports
- Great driver support
- Lowest memory footprint of any OS available
These scripts should be executed and daemonized (run as a background service) as root.
- Root required
- May host web-ui on any port, defaulting to 8443
- Minecraft data stored in one base directory, defaulting to /var/games/minecraft/
- Scripts stored separately, default to /usr/local/games/minecraft
- Supports unlimited amount of users, all serviced by one server/webui background process
- Unlimited amount of servers
- Can grant server control to other users, by group membership
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/procecho 'linproc /usr/compat/linux/proc linprocfs rw 0 0' >> /etc/fstab
Binary Package Manager
Depending on your installation of FreeBSD, you may be using one of two different binary package managers. Run the command corresponding to your preferred manager.
As a guideline, pkg_add is typically FreeBSD 9.x and earlier, where pkg is FreeBSD 10.x and later.
On distributions featuring pkg, you can install dependencies with these commands.
pkg install -y rdiff-backup rsync gmake screen git python sysutils/py-supervisor www/node www/npm pkg install -y openjdk8-jre
Installing MineOS scripts
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.confecho "CXX=c++ npm install" | sh
Running the MineOS Web Service
Starting the web-ui at boot
Have the web interface start
cat /usr/local/games/minecraft/init/supervisor_conf.bsd >> /usr/local/etc/supervisord.conf echo 'supervisord_enable="YES"' >> /etc/rc.conf
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.
Using the webui
The scripts, by default, will run a server operating on port 8443 and place minecraft data files into /var/games/minecraft.
When creating minecraft servers, it is recommended to use an unprivileged user to actually create and manage Minecraft servers. For most distros, this will be with the adduser username command. The password you set during user creation will also be the password used for the web-ui.
In your browser, visit the location: https://xxx.yyy.zzz.aaa:8443
Servers may only be created by unprivileged users, or in other words: not root. Be sure to log in as any unprivileged user to create any servers you wish; trying to create a server as root will be met with instructions on how to create additional users from the command line.