
Jack Wallen shows you how to install a Minecraft server on Ubuntu 22.04 so you can keep the fun in-house while teaching your young Linux admins the ropes.

The Minecraft craze started in 2009, and while it may not stay on everyone’s mind, it still has some influence. Even now it is one of the most popular video games in history. But it’s not all about fun and games: setting up a Minecraft server lets you bring the fun to your LAN, and it’s also a great exercise for teaching new admins how to work with Linux.
SEE: 20 Good Habits Network Administrators Need and 10 Habits to Break (Free PDF) (TechRepublic)
I want to walk you through installing a Minecraft server on Ubuntu Server 22.04 so you can test the mettle of your young Linux admins and give your staff the ability to let off steam without leaving the confines of your local network.
what you will need
To continue, you will need a running instance of Ubuntu Server 22.04 and a user with sudo privileges. That is all.
How to install dependencies
Minecraft has some dependencies to take care of. One of the biggest is Java. Before we install Java, let’s take care of some other more standard dependencies with the command:
sudo apt-get install lib32gcc-s1 lib32stdc++6 libsdl2-2.0-0:i386 netcat screen -y
When that is complete, we can now install Java. The thing about Minecraft is that it requires a much newer version of Java than what’s in the standard repository. To avoid that, we will first add the correct repository with the command:
sudo add-apt-repository ppa:openjdk-r/ppa
Then update apt with:
sudo apt-get update
Now we can install OpenJDK 17 with:
sudo apt-get install openjdk-17-jre-headless -y
How to open the firewall
If you’re running a hassle-free firewall, which it should be, you need to open a specific port with the command:
sudo ufw allow 25565
How to install minecraft
Before downloading and running the installer, we will create a new user with:
sudo adduser mcserver
Be sure to give the new user a strong and unique password. Once you’ve taken care of that, switch to the new user with:
su - mcserver
Let’s download the installer from Linux Game Server Manager with:
wget -O linuxgsm.sh https://linuxgsm.sh
Give the new file executable permissions with:
chmod +x linuxgsm.sh
Make the linuxgsm.sh file compatible with Bash like mcserver with:
bash linuxgsm.sh mcserver
Finally, run the installer with:
~/mcserver install
How to configure the server
Once the installation is complete, we need to make a simple configuration change before starting the server. Open the config file with:
sudo nano serverfiles/server.properties
In that file, find the line:
server-ip:xxx.xxx.xxx.xxx
Change xxx.xxx.xxx.xxx to reflect the actual IP address of the hosting server.
Save and close the file.
How to start the server
Finally, it’s time to start the server. For that, issue the command:
~/mcserver start
Your Minecraft server should now be up and running and ready for players to connect. The only caveat is that players cannot connect to this server with the official Microsoft version of Minecraft. Instead, they should use the Java version of the gamewhich is not free, to play multiplayer and connect to the local server.
One tip: you can check the status of the Minecraft server with the command:
~/mcserver monitor
You should see output similar to the following (indicating that all is well):
Monitoring mcserver: Checking session: OK
Monitoring mcserver: Querying port: gsquery: 192.168.1.63:25565 : 0/1: OK
Monitoring mcserver: Querying port: gsquery: 192.168.1.63:25565 : 0/1: OK
And so, my Linux admin friends, is how you install a Minecraft server on an Ubuntu Server 22.04 instance on your LAN. Happy gaming!
Subscribe to TechRepublic How to make technology work on YouTube for the latest technology tips for business professionals from Jack Wallen.