Now is the Time to Start

From Morphomics
Jump to: navigation, search

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



Well, I decided that I could not let it go! The good news is that yes, you can run an Minecraft server on the OS I love too. This post explores how I did it however I'm sure there are other options.



Getting Java installed



After you've installed NetBSD and configured networking and enabled pkgin, you'll require an OpenJDK in order to 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, search:



If it's 16 or older, you can pull current packages by opening your repo file:



and changing the repo URL, in my case 9.0 to 9.0_current



This was a great project. He is a huge advocate for NetBSD I feel that he owes me at least an espresso or a beer every time I go to Japan.



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



Running Minecraft



This location is a good one to run Minecraft like any Java-enabled server. I combined all my files:



Log into my local account and then start:



We are now ready to begin!



You'll notice that Java will throw an exception that says "system not supported, which those of us on NetBSD know well. Based on my experience it's safe to ignore it:



And don't forget to accept the EULA after you have run the server for the first time:



Create a launch script



I like to symlink to minecraft.jar the most up-to-date version of the server



You can then refer to it in launch.sh using tmux for the server to stay in place after disconnecting. I prefer to give Minecraft more memory as well:



We're ready to go!



Follow-up



My next step would be creating an appropriate chroot environment for Java and Minecraft similar to what I have done with FreeBSD jails. I have an NetBSD chroot exploration guide that I have been working on for many years. I'll tidy it up and publish it in the near future. Minecraft Servers List