How To Make Minecraft Server On Linux Distributions

From E-learn Portal
Jump to: navigation, search

Minecraft is a popular game that is available for Windows, Mac and Linux. It can be played without any extra buffer or CPU load because it uses the sandbox tech on Linux. 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. 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 Minecraft user, run the following command.



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.



Step 2: Install Java on Ubuntu/Debian



Before you install Java on your system, make sure the system is updated. Fake Root To update your system, run the following commands in the terminal shell.



To install Java version 8, run the following command in your terminal shell.



After Java installation is complete, run a version control command to verify that Java is still installed.



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.



Step 4: Download Minecraft on Ubuntu/Debian



Minecraft server is available on their official website. To download it, we will use the wget command. Make a directory to store Minecraft files and then browse it. You can use either the terminal or manual commands to create the directory.



Before you run the following command, make sure that it is already installed on your system.



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 a New User



To make things worse on your desktop or server, you will first need to add a new user to your existing setup. Then we will also need to grant the root access to that account for installing java.



Run the following commands on your terminal shell to add user and allow sudo permission. Fake it till you make it



Run the following commands to grant root access to the Minecraft account. Fedora typically manages root access permissions through wheel.



Step 2: Install Java on Fedora Workstation



Now, use the Minecraft user name to run the following DNF command in your terminal shell to install Java.



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. To install the Screen application on your Linux machine, run the DNF command.



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



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.



Next, browse the directory and run wget to download 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 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.



To agree to the license file, we must edit the End-user licensing agreement (Eula). This task can be completed using your favorite notepad editor with root access.



Write the following line in the script to save and close the script file after it opens.



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.



To load the server, we have allocated 1024M of total memory. You can change the Xmx number if the memory amount has been changed.



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. If you find the post useful and informative, please share it to your friends and with the Linux community. You can also comment on this post.