NetBSD can also run a Minecraft server

17 November, 2022

NetBSD can also run a Minecraft server

Clara and me run Minecraft on our FreeBSD server in a jail. This keeps Java and other dependencies in one place. Although I haven't tested it, the theory is that you can run the server wherever Java supports, including Linux, NetBSD and possibly other operating systems.

I couldn't let it go! The good news is that you can also run a Minecraft server on your other favorite OS. This is how I did it. I'm sure there are more.

Getting Java installed

OpenJDK 17 is required for Minecraft 1.17 and later. OpenJDK 16 however, is the latest snapshot as of July 2022. To confirm, you can search:

If it is still 16 you can open your repo file and pull current packages:

I changed the repo URI in my case to 9.0_current:

This was a great project. He does so much for NetBSD, I feel like he owes me at least a cup of coffee or a beer when I visit Japan.

We can now install along with a few useful tools:

Running Minecraft

Log in as my local user to start:

Let's get started!

Java will throw an exception about a system not supported, which NetBSD users know well. It is safe to ignore, based on my testing.

Don't forget to agree to the EULA once you have run the server for the first time.

Create a launch script

You can then refer to it in using tmux for the server to persist after disconnecting. I also like to give Minecraft more memory:

We're ready to go!