The Minecraft craze started back in 2009, and although it may not remain at the top of everyone’s mind, it still holds some sway. Even now it’s one of the most popular video games in history. But it’s not just about fun and games: Installing a Minecraft server allows you to bring the fun to your LAN, and it’s also a great exercise in 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 the procedure of 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 blow off some steam while not leaving the confines of your local network.
What you’ll need
To follow along, you’ll need a running instance of Ubuntu Server 22.04 and a user with sudo privileges. That’s it.
How to install the dependencies
Minecraft has a few dependencies to take care of. One of the biggest is Java. Before we install Java, let’s take care of a few 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 completes, we can now install Java. The thing about Minecraft is that it requires a much more recent version of Java than found in the standard repository. To get around that, we’ll first add the correct repo with the command:
sudo add-apt-repository ppa:openjdk-r/ppa
Next, update apt with:
sudo apt-get update
We can now install OpenJDK 17 with:
sudo apt-get install openjdk-17-jre-headless -y
How to open the firewall
If you’re running Uncomplicated Firewall, which you should be, it’s necessary to open a specific port with the command:
Open source: Must-read coverage
- Open-source repository SourceHut to remove all cryptocurrency-related projects
- This Linux learning path will help you start using the OS like a pro
- Btop is a much-improved take on the Linux top command
- Oracle Linux checklist: What to do after installation
sudo ufw allow 25565
- Install and Configure NTP Client on Ubuntu/Debian systems
- How to Show File Attributes in Linux
- How to Add User to Sudoers in CentOS 8
- Configuring PXE Network Boot Server on Ubuntu 22.04 LTS
- 15 Tips On How to Use ‘Curl’ Command in Linux
Read also:
How to install Minecraft
Before we download and run the installer, we’ll create a new user with:
sudo adduser mcserver
Make sure to give the new user a strong and unique password. Once you’ve taken care of that, change into the new user with:
su - mcserver
We’re going to download the installer from Linux Game Server Manager with:
Give the new file executable permissions with:
chmod +x linuxgsm.sh
Make the linuxgsm.sh file aware to Bash as mcserver with:
bash linuxgsm.sh mcserver
Finally, run the installer with:
~/mcserver install
How to configure the server
After the installation completes, 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, look for the line:
- Linux Privilege Escalation using SUID Binaries
- Installing Ubuntu Linux on the Lenovo ThinkPad E14 Gen 2 (AMD)
- [SOLVED] How To Check Hadoop Version CLI? – This 1 Simple Method Will Help You!
- Create A File Named Myfile Cnf
- Gaming On Linux: All You Need To Know
Read more:
server-ip:xxx.xxx.xxx.xxx
Change the 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 one caveat is that players cannot connect to this server with the official Microsoft version of Minecraft. Instead, they must use the Java version of the game, which is not free, to play Multiplayer and connect to the local server.
One tip — you can check on the status of the Minecraft server with the command:
~/mcserver monitor
You should see output similar to the following (indicating all is well):
And that, my Linux admin friends, is how you install a Minecraft server to an instance of Ubuntu Server 22.04 on your LAN. Happy gaming!
Subscribe to TechRepublic’s How To Make Tech Work on YouTube for all the latest tech advice for business pros from Jack Wallen.
Source: https://www.techrepublic.com/article/install-minecraft-server-ubuntu/