It’s no surprise that Minecraft is easily one of the most popular games in the world. With millions of players from all around the globe, you become free to create your own adventure and live it out to the fullest in your little randomly generated slice of life. This alone piqued the interest of many to learn how to host a Minecraft server in order to take control of their own online worlds. Should you decide to take this route and learn how to set up a Minecraft server on Ubuntu, the possibilities are endless. Let’s get started with setting up your very own Minecraft VPS.
How to set up a Minecraft server on Ubuntu
Below, we will show you the creation process of A “Vanilla” Minecraft Java Edition server for you and your friends.
This guide has been written to show how to set up a Minecraft server on Ubuntu 16.04 LTS with a VPS provided by SkySilk. Before we get started, I’d like to mention that for this tutorial on how to host a Minecraft server, a machine with 4 GB RAM was used. These settings can, and likely will be adjusted to suit your specific needs. Here is a resource containing more information on the recommended specs for your Minecraft VPS
To deploy a SkySilk VPS for this process, you can use this link:
1. Before you begin setting up your Minecraft VPS
- Before we learn how to host a Minecraft server, be sure to follow the best server practices. This includes tasks like updating and upgrading. This Guide guide can point you in the right direction for setting up a secured server install.
- Be sure to keep your system up to date and upgraded. We can do this by using the commands:
sudo apt update && sudo apt upgrade
3. Install OpenJDK, and GNU Screen with the following commands:
sudo apt install openjdk-8-jre-headless screen
- Please keep in mind: Minecraft version 1.12 is only compatible with OpenJDK 8. If you have OpenJDK 7 then you must remove it via this command sudo apt remove openjdk-7-\* before proceeding
2. Create your Minecraft user account
The next step to complete in setting up our Minecraft VPS will then be to add our user account. One thing to note, It’s recommended that you do not run the server as Root for security purposes. For more information about securing your user account, visit This article. To start, we run this command:
Sudo adduser minecraft
3. Installing the Minecraft Server
For this step in setting up our Minecraft VPS, you should then disconnect from your current SSH session. Once that is done, reconnect to your server as the newly created Minecraft account.
You will need to download the Minecraft Multiplayer Server which can be located Minecraft.net Please note that the link will vary depending on which version of the game you wish to download. For versions other than the latest, visit MCVersions
Next, you’re going to need to create a run script, the path should be the following:
Now, use your preferred method to create this file and for purposes of this tutorial we will use nano.
BINDIR=$(dirname “$(readlink -fn “$0″)”)
java -Xms3072M -Xmx3584M -jar minecraft_server.1.13.jar -o true
- Please keep in mind that the Xms and Xmx flags displayed above are used to define the minimum and maximum amount of RAM the Minecraft server will be allowed to use. The settings above are recommended for a 4GB server which will only be used for this game server. You will need to adjust these values to fit the needs of your server. Also keep in mind that your server’s operating system will require SOME resources in order to run, so it is not recommended to set these values to your system’s maximum RAM as you may encounter issues.
If you’ve been following how to set up a Minecraft server on Ubuntu to this point but haven’t already deployed a VPS, you can find a server which meets your individual requirements here:
4. Making the Run Script Executable
Now we need to make the run script executable within our Minecraft VPS, and in order to do so we run this command:
Chmod +x /home/minecraft/run.sh
That’s it. The hardest parts are now out of the way and we can now relax and then prepare to dive in.
To run your Minecraft server
Now we can begin to run our Minecraft VPS with the simple command:
On the initial startup, you’ll now see that the server is going to create a file named eula.txt. You’ll have a lot of different options for editing the file however you wish, but for ease, you can do the following:
Echo “eula=true” > eula.txt
Alternatively, you can use nano:
Once opened, modify the line “eula=false” to “eula=true” without the quotation marks. Then, press your CTRL and X keys to begin the exit process, followed by Y, and finally, ENTER to save the changes.
5. Making Sure Minecraft Stays Running
The last thing you want to do is get everything running, only to accidentally end the server by disconnecting from your SSH session. To do this, simply run the server through a GNU Screen session.
If you want to exit the screen session without stopping the Minecraft server, hit CTRL + A, and then D after. To return to the session, you then use screen -r
6. Now you’ve learned how to host a Minecraft server, let’s play!
Now that you’ve learned how to host a Minecraft server, we can open up Minecraft. In the menu screen, select multiplayer and proceed to “Add Server”.
Next, you’ll need to input your server information. As shown in the graphic below, Input your server name and then followed by your server IP address. If you don’t know your server IP, this can be easily located within your SSH session or on your SkySilk VPS Dashboard.
And congratulations, you’ve now learned how to set up a Minecraft server on Ubuntu!
A final note and some more resources
I would like to just take a quick moment to thank SkySilk Cloud Services for giving me the opportunity to be a guest author on their blog and write about how to host a Minecraft server. Additionally, I’d like to thank SkySilk for continuing to make great strides, and in doing so, providing fantastic support and service. Here are some additional resources to help in learning how to set up a Minecraft server on Ubuntu.
A final note for the readers:
Remember to ask yourself this question every time —
“Did you try turning it off and then on again?” – Every I.T. Pro out there.