Once You've Installed NetBSD

3 min read
16 September 2022


Clara and I run Minecraft on our home FreeBSD server in a jail that keeps Java and other dependencies in a single location. Theoretically , you can run the server on any platform that supports Java as well as Linux and possibly NetBSD however I haven't yet tested NetBSD.
Poesia-infantil.com



Well, I decided I couldn't leave it at that! The good news is, you can indeed run an Minecraft server on my other favorite OS as well. This article will explain how I did it but I'm certain there are other methods.



Getting Java installed



Once you've installed NetBSD and configured networking and enabled pkgin, you must install an OpenJDK that can run Minecraft.



Minecraft 1.17 and up requires OpenJDK 17, but OpenJDK 16 is the most recent version in the most current snapshot as of July 2022. You can check by searching to see if this is still the case:



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



And changing the repo URL, in my case from 9.0 to 9.0_current:



Thank you so much to the Ryoon@ for their work on this. He does so much for NetBSD I feel that he owes me at least an espresso or a glass of beer each time I visit Japan.



Now we can installit, along with other tools that are useful:



Running Minecraft



This location can be used to run Minecraft as a Java-enabled server. I put all my files together:



Log in as my local user to begin:



Now we can start!



You'll notice Java throws an exception that says "system not supported, which those of us on NetBSD are all too familiar with. From my testing I've found that you can ignore it:



Don't forget to agree to the EULA when you launch the server for the first time:



Create an introductory script



I like to link the latest version of the server to minecraft.jar:



Then refer to it in launch.sh with tmux to persist the server even after disconnecting. I also would like to give Minecraft more memory:



We're now ready to go!



Follow-up



My next step would be creating an appropriate chroot environment to work with Java and Minecraft, similar to what I do with FreeBSD jails. I have a NetBSD chroot exploration article in the works for many years. I will clean it up and post 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