How to set up a Minecraft server on AlmaLinux?

Renting a VPS to set up a Minecraft server is a perfect way to bring your Minecraft gaming experience to a new level. However, purchasing a VPS server is not fully sufficient for you to start organizing Minecraft multiplayer games, as your server is yet to be configured – and the setting up process will vary depending on which Linux distro you’ve chosen. If you for this or that reason were a CentOS enjoyer and now you are interested in its alternatives, VPS ROCKY LINUX or VPS ALMA LINUX will be great options. Today we want to focus on the latter and have a look at how to configure a Minecraft server on your AlmaLinux VPS.

Why use AlmaLinux VPS for hosting Minecraft games?

If you are still considering whether you need to rent a VPS for Minecraft or you can use other options like public servers etc. let’s review some of the advantages of such a solution.

  • Reliability: Renting a server from a reliable provider will ensure that your server is housed in a reliable data center infrastructure, providing great connection speed and maximum uptime.
  • Dedicated resources: Your server means all the resources are yours, so you are much less likely to experience performance issues.
  • Configurabitlity: Feel free to configure your VPS as you see fit and to get the gaming experience you want.

Setting up a Minecraft server on AlmaLinux

1. Connect to your VPS

As in any other case of using VPS, before doing anything you should connect. Connect through the terminal if you have Linux on your PC or use PuTTY if you’re a Windows user. Use the login credentials you received from your provider. Connect through SSH.

2. Update your system

Another standard procedure, enter the commands to make sure your system is up-to-date:

sudo yum update

sudo yum install epel-release

3. Install Java

Minecraft is written on Java, so installing it is a basic requirement to run Minecraft:

sudo yum install java-1.8.0-openjdk

You might as well as well choose a different version of Java depending on your preferences. Make sure, however, that the version has to be compatible with the current Minecraft version.

4. Create a Minecraft directory

To optimize your work with Minecraft files, it is recommended to create a separate folder for it:
mkdir ~/minecraft_server

cd ~/minecraft_server

5. Download Minecraft server files

Now it is time to download the files necessary for the operation of your Minecraft server from the official website of Mojang:

wget https://launcher.mojang.com/v1/objects/<version>/server.jar

<version> is to be replaced with the version you desire. Versions can be found on the Minecraft website.

6. Run the Minecraft server

Now it’s time to start the server:

java -Xmx1024M -Xms1024M -jar server.jar nogui

-Xmx and -Xms flags are used to adjust the number of RAM you want to allocate to Minecraft.

The nogui option runs the server without a graphical interface.

7. Accept the EULA

Open the eula.txt file with a text editor and change eula=false to eula=true to accept the End User License Agreement:

nano eula.txt

8. Start the server again:

Start the server one more time:

java -Xmx1024M -Xms1024M -jar server.jar nogui

This time, it should start successfully, and you’ll see the server generating the necessary files.

9. Configure your server:

Now you can fine-tune some parameters of your server by editing the server.properties file using a text editor (nano in our case):

nano server.properties

Configure the file as you see fit and save changes.

10. Access your Minecraft server

Your server can be accessed by players using your server’s IP address and the port specified in the server.properties file.

11. Run your server as a systemd service (optional)

If you want your server to start automatically when the system boots, you should create a systemd service unit file:

sudo nano /etc/systemd/system/minecraft.service

Add the following content, adjusting the paths and settings as necessary:

[Unit]

Description=Minecraft Server

[Service]

WorkingDirectory=/path/to/minecraft_server

ExecStart=/usr/bin/java -Xmx1024M -Xms1024M -jar /path/to/minecraft_server/server.jar nogui

Restart=on-failure

User=minecraft

Group=minecraft

[Install]

WantedBy=multi-user.target

Save the file and exit. Then, enable and start the service:

sudo systemctl enable minecraft

sudo systemctl start minecraft

Replace /path/to/minecraft_server with the actual path to your Minecraft server directory.

Now your server has to be fully functional and ready for operation. You can always adjust its configuration by editing the configuration files as described above. Players can connect to your server using your server’s IP address and port.

Conclusion

Now you have your Minecraft server up and running and ready to host your games. We hope that this guide was clear and now you have your AlmaLinux VPS fully prepared for running Minecraft. We wish you a pleasurable gaming experience!