Now, we're Ready to Go!

3 min read


Clara and I run Minecraft on our home FreeBSD server inside a jail, which keeps Java and other dependencies in one place. Theoretically , you can run the server on any platform that supports Java as well as Linux and possibly NetBSD, though I haven't tested the latter.



I couldn't let it go! The good news is that you can run a Minecraft server on another favorite OS. This post explains how I did it but I'm certain there are other methods.



Getting Java installed



After you have installed NetBSD and configured networking and enabled pkgin you will require an OpenJDK installation to play Minecraft.



Minecraft 1.17 and up requires OpenJDK 17 however, OpenJDK 16 is the latest in the most recent snapshot as of July 2022. You can search to determine whether this is the case:



If it's still 16 you can pull the latest packages by opening your repo file:



And changing the repo URL I changed mine from 9.0 to 9.0_current



Thank you so much to Ryoon@ for their work on this. He does so much great work for the NetBSD community, and I feel like I owe him at least an espresso or a drink the next time I'm able visit Japan.



We are now able to install, along with a few other useful tools.



Running Minecraft



From here, running Minecraft is basically the same as running any Java-enabled server. I have all my files in one place:



Log in as my local user and begin:



Now we can start!



You'll notice that Java throws a system not supported exception that those of us who run NetBSD know all too well. https://uf9.in/ It's safe to ignore, based on my testing.



And don't forget to accept the EULA when you launch the server for the first time:



The creation of an introductory script



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



Then, you can reference it in launch.sh with tmux to persist the server even after disconnecting. I like to give Minecraft more memory too:



We're now ready to go!



Follow-up



The next step is to create a chroot environment that supports Java and Minecraft. This is similar to the FreeBSD jails. I have an NetBSD Chroot Exploration article that I have been working on for many years. I'll tidy it up and release it in the near future.

In case you have found a mistake in the text, please send a message to the author by selecting the mistake and pressing Ctrl-Enter.
Comments (0)

    No comments yet

You must be logged in to comment.

Sign In / Sign Up