O mnie

How To Set Up A Dedicated Minecraft Server On Linux

Minecraft is a popular sandbox adventure game that offers survival and creative challenges as you explore an endless world with endless modding possibilities. It was created by Mojang Studios and was first made available to the public in May 2009. Minecraft was officially released on November 18, 2011.

Monthly active users worldwidefor Minecraft reached 40 million in June 2016. That number jumped to 140 million in March 2021. In addition to a huge number of monthly users, it's also the most downloaded game of all time.

Previously, you learned how to create a Minecraft server in five steps for your virtual private server (VPS). This time, he will learn how to set up a Minecraft server using dedicated Linux hosting.

Benefits of having a dedicated server for Minecraft on Linux

With a dedicated server, you have exclusive use and control of the server's resources. Processing power, memory, and storage are available specifically for your game without noisy neighbors (as in shared hosting) or running virtualization (as in bare metal or dedicated cloud servers). Improved performance is achieved by having this type of control.

Also, all your mods (additions to the game), plugins and security settings are under your full control. You can set up your Minecraft server on Linux the way you want without other users making any changes to your settings.

server requirements

According to the Fandom wiki, there are several settings available, including minimum and optimal server settings. Here are the minimum server requirements to run a Minecraft server on Linux:

- From one to five players. - CPUs based on Intel Pentium 4 2.0 GHz or AMD Athlon and better. - 512MB of RAM. - 2 GB of available hard disk space (5 GB if you perform frequent backups). - Internet connection with 3 Mbps upload speed and 2 Mbps download speed.

Here are the optimal server requirements for running a Minecraft server on Linux:

- Twenty or more players. - Intel i5 or i7 CPUs or AMD Ryzen 5 or 7 and better based CPUs. - 6GB of RAM. - 35 GB of available hard disk space. - Internet connection with 30 Mbps upload speed and 15 Mbps download speed.

Note: Using a Solid State Drive (SSD) is recommended for additional performance due to faster data read/write speeds.

For the purposes of this article, Minecraft was installed on a Liquid Web Dedicated server with the following settings:

- Intel Xeon Processor E3-1230 v5. - 4 cores at 3.40GHz. - 16 GB of RAM. - 500GB SSD. - The operating system is CentOS 7 64 bit.

Steps to set up a dedicated Minecraft server on Linux

Step 1: Connect to your server

Connect to your server console or connect remotely via secure shell (SSH). If you are connecting remotely via SSH, use the following command to log in as the root user.

Note: Replace serveripaddress with the IP address of your server.

If this is your first time connecting to this server, you will be prompted to confirm that you want to connect to a new, previously unknown host. SCREAMYGUY'S BLOG WriteYes,and you will be prompted for the root password. Once you enter it, you log in as root.

It is recommended to create a separate user account so that if your Minecraft server is compromised, the exploiter does not have access to the root user account. Use the following command to create a user named muser.

The following command is to set the password for our new user.

You will be prompted to enter and confirm the password.

Step 2 - Update the package repository and install Java

You will need to install Java. First, make sure your package repository is up to date using the following command.

Then install Java using the following commands.

Note: As of Minecraft 1.17, the new standard for Java has been carried over to Java 16.

You can verify that it was installed correctly by confirming the version of Java.

You will see the following output.

To install Java 16, you need to make sure the server knows the package is available by updating the epel repository. You will update it with the following command.

If it is not installed yet, you will see the following output.

It will then install the latest version of Java, which is currently Java 16. Use the following command to install the latest version of Java.

While Java 16 is installed, you still need to set it as the default for the server to run applications with the latest version. You can achieve this using the following command.

You will be presented with the versions of Java installed on your server, each with a corresponding number. Choose the appropriate number and press Enter .

If you run java -version again, it will display the version number you selected.

Step 3: Screen Installation

Install Screen, a console app that keeps your server running when you're offline. To install it, use the following command.

It will confirm the installation as with the Java installation. If it is already installed, you will be informed and return to the prompt.

Step 4: Set up your Minecraft server on Linux

Start by switching users and creating a directory for your Minecraft files. You can call your directory mineserver.

You will move to that directory with the following command.

Next, you will download the necessary configuration files for Minecraft. Visit theMinecraft Java Edition server pageright-click on the Minecraft server .jar link and copy the link address.

To download the files, you must use the wget command along with the link to the files. It should look like this.

Note: this URL will change with later versions. Always get it directly from the Minecraft download page.

After running the command, the output will let you know that the files were saved.

Note: Instead of saving the files to minecraft_server.1.17.1.jar, as it appears on the Minecraft download page, the files are saved to server.jar as in the image above.

Step 5 - Start your Minecraft server and play

Start your Minecraft server for the first time by running the following command.

Before the server can start, you must agree to Mojang's license terms. To do this, you will need to open the document in your chosen text editor. The example below will use Vim. The following command will open the document.

- pressYoget inInsert mode. - Change eula=false to eula=true. - pressGet awayleaveInsert mode. - Type :wq to save your changes and exit the editor.

Once you've agreed to the terms, you can start a Screen session and start the Minecraft server again. Type the screen command to start a new terminal session within your current session. Then type the command you used earlier to start the Minecraft server.

A new random world will be created once bootup is complete.

you can pressCtrl+A+Dto disconnect from this screen session, which will put you back in the original terminal session you had while leaving Minecraft running inside the disconnected screen. You can logout without stopping the process or use screen -r to re-attach it and bring it back to the foreground.

To stop your Minecraft server, type the stop command from the Minecraft Screen session and press Enter .

Note: If you're having trouble connecting to the server, make sure the default port for Minecraft (port 25565) is open in your server's firewall.

You are now ready to play Minecraft on your newly created Linux Minecraft server. Joining the server is easily done using your direct IP address.
Wanna talk about minecraft

Managed dedicated server hosting is available through Liquid Web so you can set up a Minecraft server on Linux. You can contact us today to get your own server and follow this tutorial once it's built.