How to Set up a Dedicated Minecraft Server on Linux?

The backend architecture of your server determines how you can develop and enhance your game experience. How to Set up a Dedicated Minecraft Server on Linux? Dedicated servers are an effective platform for gaming workloads due to their high-performance potential.

Learn why and How to Set up a Dedicated Minecraft Server on Linux? in this tutorial:

  • Access to a terminal or command line
  • An exclusive game server
  • 5GB minimum of Memory
  • IBM 970 2.0 GHz and higher Intel core-based or AMD K8-based CPUs

The Advantages of a Dedicated Minecraft Server

You are the only user of the server resources when you have a dedicated Minecraft server. In order to effectively handle demanding workloads, you can anticipate additional processor, memory, and storage capacities.

The following are some of the key benefits of putting up a Minecraft server with dedicated resources:

  1. Enhanced capability.
  2. Using all available resources and bandwidth.
  3. Control over plugins and mods.
  4. Improved privacy and security.

Visit our dedicated game servers for additional details on having such a setup.

Creating a Dedicated Minecraft Server

How to Set up a Dedicated Minecraft Server on Linux?” When playing Minecraft online, dedicated servers are the best option.

Step 1: Use SSH to connect to your hosting

Connecting to your dedicated server comes first.

1: Launch your local machine’s SSH terminal by typing the following command:

  • SSH to "your username@host ip address"

2: Enter your password after typing it in.

You must confirm that you wish to keep connecting if this is your first time connecting to the server. Hit Enter after typing yes.

You have to now be linked to your personal server.

Step 2: Install Java

Installing Java can be done after you have established a connection to the dedicated server.

The Java Development Kit (Open JDK), an open-source Java platform implementation, will be installed.

Set up a Dedicated Minecraft Server on Linux

Depending on the Linux distribution that is installed on your server, the installation procedures change a little bit.

Java installation on Ubuntu

1: Update the repository to make sure you have the most recent OpenJDK release:

  • apt update with sudo

2: Next, use the following command to install the most recent Java Development Kit:

  • install default-jdk with sudo apt

3: Type y (yes) into the confirmation box and hit Enter.

4: Check that Java is set up on your Ubuntu server by executing:

  • version of Java

The version of OpenJDK that is currently running on the system should be displayed in the output.

Go to How to Install Java on Ubuntu for comprehensive installation instructions for Ubuntu.

Java installation on CentOS

1: Start by upgrading the repository for packages:

  • yum update sudo

2: Install the Java Development Kit next by using:

  • Install Java 11-OpenJDK-Devel with sudo yum

3: The output ought to indicate that Java has been successfully installed on the machine. You may confirm by looking at the Java version:

  • version of Java

How to Install Java 11 & 12 On CentOS is a comprehensive installation guide for CentOS.

Step 3: Install the Screen

When you’re not connected, Screen, a console application, keeps your server functioning.

Use Screen on Ubuntu by:

  • screen sudo apt install

Run: to set up Screen on CentOS.

  • yum install screen sudo

Step 4: Establish a Minecraft Files Directory

1: Make a directory called “Minecraft” in which to keep the Minecraft files:

  • Minecraft mkdir

2: After that, enter the new directory using:

  • Minecraft cd

Step 5: Download the Required Configuration Files

1: Go to the Minecraft download page, right-click the server release, and then copy the link’s address.

2: Next, use the wget command to get the Minecraft server files. Copy the link location, and then paste it:

  • wget "35139deedbd5182953cf1caa23835da59ca3d7cd/server.jar" from "launcher.mojang.com"

How to Set up a Dedicated Minecraft Server on Linux? You can see from the output that it downloaded the Minecraft server files and saved them as server.jar.

3: Change the server.jar file to reflect the name of the downloaded Minecraft edition. The most recent version of Minecraft on servers is 1.16.4 as of this writing.

Hence, to rename the server.jar file to Minecraft server.1.16.4.jar, we used the following command:

  • Minecraft server.1.16.4.jar, mv server.jar

4: Next, carry out the following instruction:

  • minecraft server.1.16.4.jar nogui java -Xmx1024M -Xms1024M

You see an error message in the output informing you that you must accept the EULA (End User License Agreement) in order to use the service. To achieve this, proceed to the following step.

Step 6: Agree on the EULA for Minecraft

1: To confirm you have the eula.txt file, list the files in the /Minecraft directory:

  • ls

2: Use your preferred text editor to open the EULA file:

  • eula nano.txt

3: A link in the file directs you to the Minecraft end-user license agreement. Visit the website and read the license agreement there.

4: Go back to the terminal window and change the eula.txt file if you accept the terms. Eula=false should be changed to eula=true.

5: Save your changes by pressing CTRL+O, then press CTRL+X to close the text editor.

Step 7: Run the screen

With the screen command, begin a Screen session, and give the session a name by adding the -S option:

  • "Minecraft server" screen -S

Step 8: Run Your Minecraft Server

1: Try restarting the Java command that runs the jar file to restart the Minecraft server:

  • minecraft server.1.16.4.jar nogui java -Xmx1024M -Xms1024M

Watch for the system to complete its operation. The process is finished! the message should appear, indicating that the Minecraft server is now operational.

2: By pressing Ctrl+a+d, you can now exit the Minecraft screen.

3: Press Ctrl+r to reconnect to the screen.

Step 9: Set Up Your Firewall

How to Set up a Dedicated Minecraft Server on Linux? Edit the firewall setup to permit inbound connections from Minecraft. Port 25565 is what Minecraft uses by default.

Port forwarding for ufw can be enabled using the following command:

  • ufw allow 25565 in sudo

Iptables are included by default in CentOS 6. X and earlier. The tables instructions to enable port forwarding are:

  • Iptables: -I INPUT, -P TCP, -J ACCEPT
  • /etc/sysconfig/iptables iptables-save

Firewalld is a default component of CentOS 7. X and later. With firewalld, the ensuing commands enable port forwarding:

  • permanent —add-port=25565/tcp firewall-cmd
  • security-cmd —reload

Step 10: Point a Domain at Your Minecraft Server

By changing the domain’s DNS records, you can direct a domain to your Minecraft server. Add the following values to your domain’s “A” record:

  1. Host: @
  2. Value: Your Minecraft server's IP address
  3. Automatic or 30 minutes

Remember that the DNS changes may take up to 24 hours to take effect.

Conclusion

Do you need to learn How to Set up a Dedicated Minecraft Server on Linux? successfully after reading this tutorial. You can now take advantage of all the advantages that come with having total control over hardware resources when gaming.

Learn more about the advantages dedicated servers offer to end users before choosing a dedicated game server.

90%OFF

Flash Sale

Hurry Up! Offer ends in
01 days
07 hrs
20 mins
34 secs
Buy Now