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
- Installing Minecraft
- Connecting to Your New Minecraft Server
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.
Step 1. When logged into your Ubuntu server via SSH, enter the following commands:
Copy
sudo apt update
sudo apt upgrade
Step 2. Once the system has finished updating, run the following command to install OpenJDK, a Java toolkit used by software developers:
Copy
sudo apt install default-jre
Step 3. Once Java has been updated, you then need to add minecraft as a system user with the following command:
Copy
sudo adduser minecraf
step 4. tIn your home directory, create a folder titled minecraft. This folder will be where you download Minecraft and install it.
Installing Minecraft
Step 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:
Copy get https://launcher.mojang.com/v1/objects/3cf24a8694aca6267883b17d934efacc5e44440d/server.jar
Step 2. Next, create a script called run.sh. In it, put the following command:
Copy
java -Xms1024M -Xmx2048M -jar server.jar -o true
Step 3. Finally, modify the script to make it executable using the following command:
Copy
chmod +x /home/minecraft/run.sh
Step 4. To begin the installation, use the following command:
Copy
./run.sh
Step 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 performedin by editing the server.properties file, found the /home/minecraft/ directory.
Connecting to Your New Minecraft Server
Step 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.
Step 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!
-------‐---------‐-----------------------------------------------------