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,
- Updating Ubuntu and Installing Java Toolkits
- Installing Minecraft
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.
- When logged into your Ubuntu server via SSH, enter the following commands:
sudo apt update
sudo apt upgrade
- 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
- Once Java has been updated, you then need to add
minecraftas a system user with the following command:
sudo adduser minecraft
- In your home directory, create a folder titled
minecraft. This folder will be where you download Minecraft and install it.
- 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:
- Next, create a script called run.sh. In it, put the following command:
java -Xms1024M -Xmx2048M -jar server.jar -o true
- Finally, modify the script to make it executable using the following command:
chmod +x /home/minecraft/run.sh
- To begin the installation, use the following command:
- 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
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.propertiesfile, found in the
Connecting to Your New Minecraft Server
- 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.
- 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!