Now we're Ready to go!

Now we're Ready to go!


Clara and I run Minecraft on our home FreeBSD server inside a jail, which keeps Java and other dependencies contained in one place. Although I haven't yet tested it, the idea is that it is possible to run the server in any location that Java is supported, including Linux, NetBSD and possibly other operating systems.



So, I could not let it go! The good news is that you can indeed run a Minecraft server on my other favorite OS too. This is the method I used. I'm sure there are other ways.



Getting Java installed



After you've installed NetBSD and have configured networking and enabled pkgin, you need to get an OpenJDK that can run Minecraft.



OpenJDK 17 is required for Minecraft 1.17 and later. OpenJDK 16 however, is the most recent version as of July 20,22. To confirm, you can search:



If it's 16 you can still pull current packages by opening the repo file.



Change the repo URI, in my case from 9.0 to 9.0_current:



This was a great project. He has done so much for NetBSD, I feel like I owe him an espresso or a glass of beer each time I visit Japan.



We can now install, along with a few other useful tools.



Running Minecraft



You can use this directory to run Minecraft just like any Java-enabled server. I have all my files in one location:



Log in as my local user to start:



We are now ready to begin!



Java throws an exception regarding a system that is not supported, which NetBSD users are well aware of. Based on my tests, you can safely ignore it:



Once you've started the server first time, be sure to remember to accept the EULA.



Create a launch script



I like to symlink to minecraft.jar the most current version of the server



You can reference it in launch.sh using tmux to allow the server to stay in place after disconnecting. I like to give Minecraft more memory, too:



We're now ready to go!



Follow-up



Next, I would like to create a proper chroot environment that supports Java and Minecraft. This is similar to the FreeBSD jails. I've had a solid NetBSD exploration of chroots in the works for a long time I'll clean it up and publish it shortly.

My Games