To run latest Minecraft 1.12.1 (as of this writing) within FreeBSD Jail you need few things.

First of, you need to install Java 8:

pkg install openjdk8 openjdk8-jre

After Java is installed, you’ll notice that there’s a warning like:

This OpenJDK implementation requires fdescfs(5) mounted on /dev/fd and
procfs(5) mounted on /proc.

If you have not done it yet, please do the following:

        mount -t fdescfs fdesc /dev/fd
        mount -t procfs proc /proc

To make it permanent, you need the following lines in /etc/fstab:

        fdesc   /dev/fd         fdescfs         rw      0       0
        proc    /proc           procfs          rw      0       0

This obviously needs to be done on the host system level as it is not allowed within Jail. Everything is clearly explain so I’ll not go point by point here. Prerequisite for mounting procfs is to load linprocfs kernel module, so before doing the thing above load module with:

kldload linprocfs

To load module at boot, add following to your /boot/loader.conf:


That out of the way, go to your Jail and download minecraft server:


Next thing you want to do is to start it up. I usually add few options when starting up server process so instead of typing them out manually every time I start the process I usually have file with following contents in application directory:

java -Xmx2048M -Xms1024M -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalPacing -XX:ParallelGCThreads=4 -XX:+AggressiveOpts -jar minecraft_server.1.12.1.jar nogui

It goes without saying, but you can have all of this in some sub-folder (I have in /root/mcserver-1.12/)