How to Install Minecraft on Ubuntu

While Minecraft has dedicated server support, some users prefer to set up their own Minecraft server. There are a number of advantages of setting up your own server, from better performance to higher customizability. One of the most popular platforms used for this purpose is Linux. A Minecraft server can be set up on a number of different Linux distributions, or distros, including Ubuntu and Debian. In this article we will explore how to set up your own Minecraft server on Ubuntu. Please note that this article requires the use of Linux commands and SSH connections,

Topics Include:

Updating Ubuntu and Installing Java Toolkits

Before we can start the Minecraft installation, we will first need to ensure that the Ubuntu system is up-to-date and download the necessary Java toolkits. 

  1. When logged into your Ubuntu server via SSH, enter the following commands:
    sudo apt update
    sudo apt upgrade
  2. Once the system has finished updating, run the following command to install OpenJDK, a Java toolkit used by software developers:
    sudo apt install default-jre
  3. Once Java has been updated, you then need to add minecraft as a system user with the following command:
    sudo adduser minecraft
  4. In your home directory, create a folder titled minecraft. This folder will be where you download Minecraft and install it. 

Installing Minecraft

  1. Now that your system is prepared for the Minecraft installation, we can proceed with downloading the necessary data. Since Minecraft is not available via default Linux software repositories, we will need to use the following command to download the data directly from the Minecraft developer’s website:
    wget https://launcher.mojang.com/v1/objects/3cf24a8694aca6267883b17d934efacc5e44440d/server.jar
  2. Next, create a script called run.sh. In it, put the following command:
    java -Xms1024M -Xmx2048M -jar server.jar -o true
  3. Finally, modify the script to make it executable using the following command:
    chmod +x  /home/minecraft/run.sh
  4. To begin the installation, use the following command:
    ./run.sh
  5. Once the installation script runs, the eula.txt file will appear in the /home/minecraft/ folder. Use a text editor to change the value of eula to true. Then run the script again as in Step 4. If successful, a new, default Minecraft server will be ready to access. Advanced server configurations can be performed by editing the server.properties file, found in the /home/minecraft/ directory. 

 Connecting to Your New Minecraft Server

  1. Now that you’ve installed Minecraft on your own server, you can connect to it using the Minecraft client software. Open Minecraft and navigate to Multiplayer and select Add Server. 
  2. The game will provide you with a form to enter the server IP address as well as a name associated with the server you’re connecting to. Input your server IP and then click Done. If the server is working properly, you should join the Minecraft session without issue and begin playing immediately. 

Congratulations, you now know how to set up your own Minecraft server on Ubuntu!

Don't ruin the game with lag! Get a server that offers the best gaming experience, performance, and processing power with Bare Metal Hosting!

check markTop-Tier Performance check markPerfect for Gaming check markCustomizable check markDedicated Resources

Game Server Hosting

InMotion Hosting Contributor
InMotion Hosting Contributor Content Writer

InMotion Hosting contributors are highly knowledgeable individuals who create relevant content on new trends and troubleshooting techniques to help you achieve your online goals!

More Articles by InMotion Hosting

Was this article helpful? Join the conversation!