Minecraft is a very popular game series that is available for Windows, Mac, and Linux. As it uses the sandbox technology on Linux, it can be played without extra buffer or CPU load. If you’re a true fan of this game, you can use the Minecraft server to play this game with another player. Now, there are options that allow you to get the Minecraft server on your Linux system without doing anything but paying a number of dollars to a 3rd party software authority. Or, you can install and run your own Minecraft server on your Linux system to enjoy the freedom of gaming.
Minecraft Server on Linux System
In Linux, Minecraft requires Java to run it on your computer. However, once the server is installed on your Linux system, you can build the Minecraft game and explore the 3D world of Minecraft. In this post, we will see how to install the Minecraft server on Debian/Ubuntu and Fedora/Red Hat Linux.
1. Install Minecraft on Ubuntu/Debian
Installing a Minecraft server on a Ubuntu server/desktop requires root access and an active internet connection. Here, we will see how to install java and run the Minecraft server through it on a Debian Linux system.
Step 1: Create a New User For Minecraft
If you’re using a Ubuntu server or a Desktop, it will be wise to create a new user for the Minecraft server. You can run the following command given below to create a new Minecraft user.
sudo adduser minecraftuser
Now, as we will build the server over Java, we also might need to grand the new user root access. So, finally, switch to the newly created Minecraft user account to start installing the Minecraft server on your machine.
sudo usermod -aG sudo minecraftuser su - minecraftuser
Step 2: Install Java on Ubuntu/Debian
Before you install Java on your system, make sure the system is updated. Run the following commands on the terminal shell to update it.
sudo apt update sudo apt upgrade
Now, run the following command on your terminal shell to install Java version 8 on your system.
sudo apt install openjdk-8-jdk -y
When the Java installation finishes, perform a version check command to see if Java is installed or not.
sudo java -version
Step 3: Install Screen For Minecraft
The screen is an application that allows you to run the Minecraft server on the system’s background as a daemon. Run the following command on your shell to install Screen.
sudo apt install screen
Step 4: Download Minecraft on Ubuntu/Debian
Minecraft server is available on their official website. We will use a
wget command to download it on our system. But, first, make a directory for Minecraft and browse it. You can use both manual or terminal commands to create the directory.
sudo mkdir minecraftdir cd minecraftdir
Now, before running the following
wget command, make sure it is installed on your system.
sudo apt install wget
Run the following
wget command on your terminal shell to download the java file of the Minecraft server for Linux.
sudo wget -O minecraft_server.jar https://s3.amazonaws.com/Minecraft.Download/versions/1.11.2/minecraft_server.1.11.2.jar
2. Install Minecraft Server on Fedora Linux
Installing the Minecraft server on the Fedora workstation is almost similar to the method of installing it on Ubuntu, but there are a few changes in commands and steps. If you’re a Fedora or Red Hat Linux user, this method will help you to install the Minecraft server on your machine.
Step 1: Create a New User
First, you need to add a user to your existing setup to make a mess with your current server or desktop. Then we will also need to grant the root access to that account for installing java.
Run the following command lines given below on your terminal shell to add a user and permit the sudo permission.
adduser minecraftuser passwd minecraftuser
Now, run the following commands to give root permission to the Minecraft user account. In Fedora, usually
wheel manages the root access permissions.
usermod -aG wheel minecraftuser su - minecraftuser
Step 2: Install Java on Fedora Workstation
Now, as you’re using the Minecraft user account, run the following DNF command on your terminal shell to install Java on the system.
sudo dnf install java-1.8.0-openjdk
When the installation finishes, perform the version check command to see if it is installed correctly or not.
Step 3: Install Screen and Set Up Firewall
Before running the Minecraft server on a Linux machine, we should install the screen application to run it on the system’s background. Run the below-mentioned DNF command on your shell to install the Screen application on your machine.
sudo dnf install screen
In optional, you can also run the S flag command to name the current Screen application as a Minecraft server.
screen -S minecraftserver
To load a server on a machine, it’s wise to allow the TCP ports of Minecraft on our system’s network. As the Minecraft server uses port 25565, the following firewall daemon commands will allow the Minecraft server on our Fedora network.
sudo firewall-cmd --permanent --zone=public --add-port=25565/tcp sudo firewall-cmd --reload
Step 4: Download Minecraft Server on Fedora Workstation
Till now, we have seen the processes of creating a new Minecraft user account and installing Java on our system. After that, it is time to download and execute the Minecraft server on our Fedora Linux.
First, run the following command to make a new dedicated directory for downloading the Minecraft server file.
Then browse that directory and run the
wget command to download the server file.
cd minecraftdir wget https://launcher.mojang.com/v1/objects/3dc3d84a581f14691199cf6831b71ed1296a9fdf/server.jar
3. Execute Minecraft Server on Linux
When the download of the Minecraft server finishes, browse the directory and locate the file. This method will be executable for both Debina and Fedora Linux distributions. First, run the following
chmod command to grant the execution permission to the Minecraft server file.
sudo chmod +x minecraft_server.jar
Now, we need to edit the End-user license agreement (Eula) file to agree with the license file. Again, you can use your favorite notepad editor with root permission to do this task.
sudo nano eula.txt
When the script file opens, write the following line inside the script the save and close the file.
Finally, run the following command on your terminal shell to start the Minecraft server on your Ubuntu Linux. As you can see, the command is defined as a NoGUI (graphical user interface); it will continue loading the server in CLI mode.
sudo java -Xmx1024M -Xms1024M -jar minecraft_server.jar nogui
We’ve allocated the total memory amount of 1024M to load the server in the above command. You could change the Xmx value if you changed the memory amount.
Minecraft server is helpful and essential to load the Minecraft game series on a Linux-based system. In this post, we have seen how to install the Minecraft server on Debian and Fedora workstations. Please share this post with your friends and the Linux community if you find this post useful and informative. You can also write down your opinions regarding this post in the comment section.