How To Make Minecraft Server On Linux Distributions
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
Java is required to run Minecraft under Linux. Once the server has been installed on your Linux system you can create the Minecraft game and explore 3D Minecraft world. 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. To create a new Minecraft user, you can use the following command.
As we will be building the server using Java, we may also need to grant root access to the new user. So, finally, switch to the newly created Minecraft user account to start installing the Minecraft server on your machine.
Step 2 - Install Java on Ubuntu/Debian
Before you install Java on a system, ensure that it is up to date. To update the system, use the following commands from the terminal shell.
Now, open the terminal shell and run this command to install Java version 8.
When the Java installation finishes, perform a version check command to see if Java is installed or not.
Step 3: Install a 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.
Step 4: Download Minecraft on Ubuntu/Debian
Minecraft server is available on their official website. We will use the wget command for downloading it to our system. But, first, make a directory for Minecraft and browse it. To create the directory, you can use either manual or terminal commands.
Before you run the following commands, make sure it's installed on your computer.
Run the following wget command on your terminal shell to download the java file of the Minecraft server for Linux.
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 an account
First, you need to add a user to your existing setup to make a mess with your current server or desktop. Next, we need to grant root access to the account to install java.
To add a user or grant sudo permission to your terminal shell, run the below command lines.
To grant root permission to your Minecraft user account, run these commands. In Fedora, usually wheel manages the root access permissions.
Step 2 - Install Java on Fedora Workstation
Now, log in to Minecraft and use the Minecraft user account. To install Java on the system, run the DNF command from your terminal shell.
After the installation is complete, run the version check command to verify that it has been installed correctly.
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. To install the Screen program on your machine, run below-mentioned DNF commands on your shell.
In optional, you can also run the S flag command to name the current Screen application as a Minecraft server.
To load a Minecraft server on a machine it is wise that we allow the TCP ports from Minecraft on our network. As the Minecraft server uses port 25565, the following firewall daemon commands will allow the Minecraft server on our Fedora network.
Step 4: Download Minecraft Server on Fedora Workstation
We have covered the steps of creating a Minecraft user account and installing Java. 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.
Browse that directory and then run wget to obtain the server file.
3. Execute Minecraft Server on Linux
When the download of the Minecraft server finishes, browse the directory and locate the file. This method is compatible with Fedora and Debina distributions of Linux. First, run the following chmod command to grant the execution permission to the Minecraft server file.
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.
Once the script file opens in your browser, copy the following line into the script to save and then 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, this command is a NoGUI (graphical interface) and will continue loading the server using CLI mode.
We've allocated the total memory amount of 1024M to load the server in the above command. If you change the memory amount, you can change the Xmx value.
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 leave your thoughts and opinions in the comments section.