Score:1

Is Running Minecraft Server on Linux (Lubuntu) Possible?

pe flag

I want to run Minecraft, and started with a Raspberry Pi, but now I've moved onto my dedicated file server trying to use that instead but with the same lack of success.

No matter what version of Java (openjdk version "11.0.11") I manage to get running it's never enough for the latest Minecraft server version (currently 1.17). I've run a Minecraft server on my Lubuntu machine before, but this time it's all fallen flat as no java version is good enough for it.

I just want to know if it's even possible to get it running. If it is I'll persist.

Score:1
cn flag

Sure it's possible. You did it yourself already. I have a Minecraft server chugging away right now.

From this Minecraft Server Tutorial:

  • For Minecraft Server 1.16 and below: Install the package openjdk-8-jdk-headless
  • For Minecraft Server 1.17 and above: Install the package openjdk-16-jdk-headless

Both packages are available in all currently-supported releases of Ubuntu in the Universe pocket. Most folks already have Universe enabled, so it's a simple matter of...

sudo apt install <packagename>
sudo apt install /path/to/downloaded/server.jar

...however some folks don't have Universe enabled, so two extra steps are needed.

sudo add-apt-repository universe
sudo apt update
sudo apt install <packagename>
sudo apt install /path/to/downloaded/server.jar

You asked only about Java, so the answer is only about Java.

You did not ask about other steps to setup, launch, and backup the server. If you had, I would have simply pointed you to that linked tutorial. It has everything you need.

Delano Stagg avatar
pe flag
Thanks. I've been through that tutorial (and many like it) several times. I've managed to get Java 16 working on my Lubuntu server, so Minecraft now runs. But I don't think such an up-to-date version of Java is available for Raspberry Pi.
user535733 avatar
cn flag
Yes, an up-to-date version certainly is available for the Pi. See https://packages.ubuntu.com: Both of those packages are available for arm64 and armhf.
Score:0
ai flag

Java matters not the OS , if the os supports java, it is possible to have a server

Use JAVA 16 for above 1.17

Use JAVA 8 for 1.16 and below

Score:0
pe flag

So I did get this working in the end.

As someone commented, I was using the default Raspberry Pi OS to build the server, but it doesn't easily support Java 16. However, the Ubuntu build for the Raspberry Pi does support Java 16. I was so single-minded on getting the server built I couldn't see the wood for the trees.

So for anyone else who is trying to get Minecraft working on a Raspberry Pi 4, here's what I did:

  1. Using the Raspberry Pi imager select other general purpose OS, then Ubuntu.

Raspberry Pi Imager screen

  1. Once you've setup and configured the OS (including updates and adding to your network) run sudo apt install openjdk-16-jdk-headless

  2. Create a folder for Minecraft sudo mkdir Minecraft

  3. Go to that directory and run the following: sudo wget https://papermc.io/api/v2/projects/paper/versions/1.17/builds/31/downloads/paper-1.17-31.jar

  4. That will download the current version (as of 22/06/2021) of the Paper Minecraft Server. Then run sudo java -Xmx2048M -Xms2048M -jar paper-1.17-30.jar nogui

There are a few more steps once you've run that but there are better tutorials about running a Minecraft server (although not for anything that requires Java 16)

I hope that saves someone the amount of frustration the server caused me.

Cheers

Score:0
dj flag

It is not dependent on Linux distros, rather the Java Runtime Environment. As far as I know, Java 8 and up is enough for Minecraft servers, so it sound like configuration or installation issue rather than something with about OS or Minecraft itself.

Can you open up the terminal and run the command java <path_to_mc_server.jar>? If so, what is the output, possibly the error you get? Knowing that would be much helpful.

Edit: Most common error I see is not adding the java executable path (the install path) to the PATH environment variable. If you want it to be click-to-run, that steps more or less mandatory in Linux.

To accomplish that, you can check this link for more info.

Delano Stagg avatar
pe flag
Thanks. I thought the same about Java 8 being suffice, but it looks like the latest version of the software requires Java 16.
FFaFafy avatar
dj flag
That is a bummer, although you should be able to install and run v16 in any 64bit OS. Check out [this page](https://www.oracle.com/java/technologies/javase-jdk16-downloads.html). There is a .deb file you can use to install java. Go to terminal and run `sudo apt install Downloads/<java_installer_name.deb>`. Hope that helps.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.