How to set up and run a Minecraft Server on Linux Cloud Servers

2022-08-15 By Nathan 2610 Views linux minecraft java
1 reviews

minecraft


Minecraft was first launched back in 2009 and lets players build, explore, craft, and survive in a 3D-generated block world. It was among the most successful video game developed as of early 2022.


By hosting your own Minecraft server, the server admin decides the rules and can play together with friends in this interactive adventure game.


This article explains the step-by-step procedure to install the Minecraft cloud gaming server in Linux Cloud Servers.


  1. Log in to the cloud server as root user.

  2. Create a new folder named minecraft in the home directory, and change the directory to minecraft with the below commands.

    # mkdir /home/Minecraft
    
    # cd /home/Minecraft
    

    minecraft1

  3. Copy the download link for the latest version of java from the below page.

    https://www.oracle.com/java/technologies/javase/jdk18-archive-downloads.html
    

    minecraft2

  4. Download the supported package using wget command. In this case, we are using CentOS 7 and downloading the rpm package. The command is as follows.

    # wget https://download.oracle.com/java/18/latest/jdk-18_linux-x64_bin.rpm
    

    minecraft3

  5. Install downloaded jdk-18_linux-x64_bin.rpm using the rpm command.

    # rpm -ivh jdk-18_linux-x64_bin.rpm
    

    minecraft4

  6. Once the installation is completed, run the below command to verify the version.

    # java --version
    

    minecraft5

  7. Copy the latest Minecraft Server download link from the following website.

    https://www.minecraft.net/en-us/download/server
    

    minecraft6

  8. Run the below command to download the Minecraft Server. Make sure to download using the latest download link.

    # wget https://pistondata.mojang.com/v1/objects/8399e1211e95faa421c1507b322dbeae86d604df/server.jar
    

    minecraft7

  9. Install the Minecraft server using the following command.

    # java -Xmx1024M -Xms1024M -jar server.jar nogui
    

    minecraft8

  10. Once the installation is completed, edit the eula.txt file and change the eula=false to eula=true.

    # vim eula.txt
    

    minecraft9

    minecraft10

  11. Run the below commands to open ports in firewalld for the Minecraft server.

    # firewall-cmd --permanent --zone=public --add-port=25565/tcp
    
    # firewall-cmd --permanent --zone=public --add-port=25565/udp
    
    # firewall-cmd --reload
    

    minecraft11

  12. Once firewall ports are configured, run the below command to start Minecraft server.

    # java -Xmx1024M -Xms1024M -jar server.jar nogui
    

    minecraft12


The Minecraft server is ready and running. Now the user may log in to the Minecraft game and connect using the server IP. This is the better way to start with.


Related Tutorials

What do you think about this article?

Rate this article
LayerStack Promotion
Need assistance?

Try this guide to receive free bundled services at signup on a new free account.

Sign Up

Your Feedback Is Important

We hope you’ll give the new products and updates a try. If you have an idea for improving our products or want to vote on other user ideas so they get prioritized, please submit your feedback on our Community platform. And if you have any questions, please feel free to ask in the Community or contact our Technical Support team.