Minecraft is still a very popular game, and a big part of the appeal behind it is the ability to host and run your own servers. It’s surprisingly simple to host a Minecraft server, and you can get one running quickly.
This guide covers one of many ways to get a Minecraft server running, but this method is one of the simplest and most stable server setups possible.
Before You Get Started
If you’re just planning to run a Minecraft server on your local network, this isn’t a concern, but if you want people to be able to play on your server over the Internet, you’re going to need to find hosting for your server.
There are plenty of great options that you can use to host your Minecraft server: Linode and DigitalOcean are usually a safe bet. You will need a VPS (Virtual Private Server) to host Minecraft. You can’t host on cheap shared hosting that’s typically designed for hosting simple websites.
You’re also going to be hosting the server on Linux. While it is possible to run a Windows Minecraft server, Linux is cheaper to host, and it’s generally easier to maintain. Ubuntu is a solid pick when it comes to a distribution. It’s fairly beginner friendly, stable, and it has an active community to help, should you need it.
Everything from here assumes that you have hosting and that you’ve signed in to a terminal, either through SSH or a web interface provided by your host. Any good VPS host will allow you terminal access.
Install the Dependencies
You’re going to need a few software packages before you can run the Minecraft server. You can install them directly with Ubuntu’s Apt package manager. Begin by running the following command in the terminal on your server:
sudo apt install default-jdk screen wget
If you’ve never used a Linux package manager before, wait a few seconds while Ubuntu installs your new software. It’ll let you know when it’s finished.
Download the Minecraft Server
Set up the directory where you want to run the server. This doesn’t matter too much. You can do everything out of your home directory, if that’s most convenient for you.
mkdir ~/Minecraft cd ~/Minecraft
On your regular computer, drop by the Mincraft server download page. Locate the download link for the latest version of the Minecraft server. Copy that link location with your browser.
Back in the server terminal, begin typing the line below:
wget -O minecraft_server.jar
Paste in the address that you copied, which will look something like this:
wget -O minecraft_server.jar https://launcher.mojang.com/v1/objects/3737db93722a9e39eeada7c27e7aca28b144ffa7/server.jar
You’re going to need to accept the Minecraft license in order to run your server. You do that by creating a file in the same directory as your server. The server will read the file and see that you’ve accepted the license.
echo "eula=true" > eula.txt
Write a Startup Script
You don’t need a startup script, but it’s easier to just combine things into a script so you only need to run one command to start up your server. Begin making a new file by opening it with your text editor. If you’re not familiar with Linux text editors, use Nano.
Then, fill in your script to look like this:
#! /bin/bash /usr/bin/screen -S $1 /usr/bin/java -Xmx1024M -Xms1024M -jar minecraft_server.jar nogui
Save your script and exit the text editor. You’ll also need to make your script executable before you can run it.
chmod +x start-server.sh
Start the Server
You’re finally ready to start up your server. Give it a name that you can easily identify in quotes when you run the script.
Your server will start up, and you’ll be able to connect by entering your server’s IP address in your Minecraft client. Remember to keep your server updated by replacing the server .jar file with new releases.
If you plan on making your server public, it’s worth looking into your VPS host’s tips to secure the server. It’d also be a good idea to enable a firewall. Ubuntu has an excellent option in the form of UFW.
Our latest tutorials delivered straight to your inbox