How to set up a Minecraft server (Java edition)

By Timothy Lickteig On 2023-10-08

Getting a Minecraft server going might seem like a daunting process if you don't consider yourself knowledgeable about servers and networking, however I hope that this article will challenge that assumption. With just a little bit of head knowledge, you will be able to setup and maintain your very own server on the cheap.

Requirements

1. A computer to host the server



How powerful it needs to be is largely dependent on how many players you expect to be on the server at any given time, although if you just plan to have a few of your friends on it at once, then any computer made within the last ten years should do the trick. I would also consider running the server on a dedicated computer, as you don't want to have to keep your main computer running and connected to the network at all times, although it is not strictly necessary.

2. A good internet connection



If you only plan to have the server accessible over your local network, then this requirement is kinda moot, however if you would like to let people to play from across the internet then you will need both a fast internet connection, and an IP address that is unlikely to change very often (possibly a static one) to ensure that players won't be constantly having to update their server settings.

3. Java Development Kit



Since this is a Java application we are running, Java will need to be installed. We won't just need the Java runtime environment however, we are going to need the Java Development Kit which can be found here. Take care to install the correct package for the platform you are running on however, as unlike most websites, it will not choose for you automatically. On Windows, this will likely be the x64 installer or the x64 MSI installer. On Mac, this will be the ARM64 DMG installer if you are on an Apple Silicon Mac, or the x64 DMG Installer if your Mac has an Intel Processor. If on Linux, you will most likely want the x64 Debian package, or the x64 RPM package depending on what distro you are running. Once the right package is downloaded, then just run it and follow the super easy instructions in the setup wizard. If you need more help, then I would recommend finding a guide online for installing the JDK that is tailored to the specific computing platform that you plan to run the server on.

Java Development Kit download page

4. Willingness to maintain the server



In my opinion, the biggest hurdle to running your own server is not technical know-how or what computer you can scrounge up, but your willingness to put the time and energy into maintaining the server down the road. If the server is set up properly and stable, then maintenance should be fairly minimal, but it will still require updates, backups, and fixes for when it does inevitably crash. Just keep it in mind when embarking on a project like this

Getting started

1. Downloading the Software



Your first step is downloading the necessary files. Simply head to this page and download the .jar file. Since this is a Java application, the steps here on out should be the same whether you are on Windows, Mac, or Linux.

Minecraft server software download page

2. Accepting the EULA



Next, copy the .jar file that you just downloaded into its own directory, and double click on it. If everything has gone correctly, then you should see that it has deposited some new files into the directory. One of these files should be called eula.txt, which you will want to open in a text editing program (I am using Notepad since I am doing this on Windows). Inside the doc, you should be able to see a line like this: "eula=false", which you want to change to "eula=true" and save the document. Keep in mind that by doing this, you are accepting the agreement laid out on this page.

The eula.txt file that the server has created

Agreeing to the EULA in the eula.txt file

3. Running for the first time



Once you have accepted the EULA, then you should be ready to run the server! Simply double click the server.jar file once more, and you should see the server window pop up. Keep an eye on the console output that is now flowing across the screen, as you need it to know what the server is currently doing. You should see some text along the lines of "Preparing spawn area" with an increasing percentage value. Once it completes, then it should show a completion message meaning that you are ready to connect to the server.

The currently active Minecraft server window

3. Connecting to the server



Now, it's time to fire up Minecraft. Once the game is launched, click "Multiplayer" and then "Direct Connection". once there, you should see a field for an IP address. If you are running the game on the same computer as the server, then just type "localhost". If the game and server are running on different computers, then you will need to input the IP address of the machine running the server into the Direct Connection field in the game. Finding the IP address of the server is different depending on what operating system you are using, and it is easy to find how to do it online, so I am not going to go very much into detail here. That being said, if you dig around in the network settings long enough, then you will probably find it. Once that is completed, click "Join Server". If everything has gone correctly, then you should be playing on your server!

Connection to our server from within the game

Optional Configuration

1. The server.properties file



When it comes to tweaking the server parameters to your liking, the server.properties file is where you will find most of the settings for different aspects of the server. This includes the default game mode, whether you want cheats enabled, the default difficulty, and many other things. This file is automatically generated inside the same directory as the main server.jar file, and looking inside you can see that there is a list of different settings, one for each line. If you are a beginner, please make sure to only modify one value at a time, and only modify the values to the right of the = sign on each line.

The server properties file

2. The world folder



Inside the same directory as the server.jar file, you will find a folder called "world". This is the folder where the world data is stored. Looking inside, you will find that it is 100% the exact same as any other Minecraft Java Edition world. This means that you can copy it elsewhere to backup the world, replace it with one you downloaded from the internet, or transplant a world from singleplayer or another server.

The world folder inside of the server

3. Player management



Inside the main server directory, you will find the following .json files:


These are the files that store data about which players have cheats enabled, which players are banned, and which players are whitelisted. You generally will not have to mess with these files since all of that stuff is manageable via console commands, however this is where that data is stored (all in easy to read JSON format) for troubleshooting, or if you need to change something manually.

The files containing player data

4. Port Forwarding



With the server set up using methods mentioned above, you might come to find that the server is only accessible to those on the same LAN network as you. You very well might want to host this server for your friends/family from their own houses, to which I would direct you to open up a port forwarding rule inside of your router. I'm going to prefice this by saying that doing this opens up a security risk, as it allows anybody to access the server so long as they know your public IP address. In addition, I can't really give you a step by step guide for it in this article since every router is going to have a different user interface. The underlying concept is exactly the same however, and you should create a rule that looks like the image below. Just note however that the destination IP address field will be whatever the IP address of the computer hosting the server is.

Port forwarding rule in the router settings

In a nutshell, what we have done here is given our router a specific instruction. We have told it that whenever it receives an inbound connection on port 25565, then to forward it to the destination IP address on the exact same port 25565. Just in case you are not aware, a port is used by server applications on your computer to listen for incoming traffic, similar to how IP addresses can locate things across a network. So by specifying the destination IP address and port 25565 (which just so happens to be what the Minecraft server listens on by default), we can not only tell traffic to go to a specific device on the network, but also that the traffic needs to be handled via the Minecraft server running on it.

Conclusion

As you can see, running your own Minecraft server can require a little bit of technical know-how, however I don't consider it something that most tech savvy people couldn't accomplish. In addition you can avoid paying fees from a hosting provider, and you have the ability to dial the configuration into your exact liking. That all being said however, there are many advanced things that you can do, like configuring automatic backups, making the server start automatically upon boot up, and adding plugins to give your server custom functionality. I'll have to get to all of that in a different article though, as this one is long enough already. This was just to show you the basics of getting a server up and running.

Back to previous page