December 2, 2019
5 min Read
Domantas G.

In this tutorial, we will show you how to make a Minecraft server on various platforms. This way, you’ll have more freedom to play the game with your own sets of rules. Let’s go!
With more than 66 million players, Minecraft is one of the most popular video games in the world.
The game offers unlimited possibilities to create a virtual world, and you can fill it with your favorite objects. What’s cool, you can take such experience to a whole new level by making your own Minecraft server.
By having a private server, you’ll have bigger control over the gameplay. You can invite many users, create the rules, install any mods, and much more!
Unfortunately, many people think that building a private Minecraft server is difficult and expensive. But, the truth is, you only need a little bit of knowledge about the command-line interface. What’s more, you can set up the server on your Linux, Windows, or macOS computer, so there’s no need to buy a new machine.
If everything is ready, it’s time to learn how to make a Minecraft server!

In this section, you will learn how to make a Minecraft server on a machine that runs on Ubuntu or CentOS.
Before we start, ensure that you have a root SSH access to your machine. If you are using Hostinger’s VPS plan, the login credentials are in the Servers tab of hPanel.
The process of creating a Minecraft server on these two operating systems is quite similar, but there are a few differences you’ll notice when installing the required packages.
The minimum operating system requirements for the following tutorial are Ubuntu 16.04 and CentOS 7.
ssh username@ipaddress
Don’t forget to change both values with your real username and server IP address. When prompted, enter your username and password.
java -version
Proceed to Step 2 if you already have Java installed. However, if Java is not found, follow the next step.
sudo apt-get update sudo apt-get install default-jdk
sudo yum update sudo yum install java -y
sudo apt-get install screen
sudo yum install screen -y
Now that Java and Screen are ready, we can begin installing a Minecraft server.
mkdir minecraft
cd minecraft
sudo apt-get install wget
sudo yum install wget -y
wget https://launcher.mojang.com/v1/objects/3dc3d84a581f14691199cf6831b71ed1296a9fdf/server.jar -O minecraft_server.1.14.4.jar
In this example, the latest version is 1.14.4. You should visit this link to check if a newer version is available for download.
java -Xmx1024M -Xms1024M -jar minecraft_server.1.14.4.jar nogui
At this point, the server program will not start yet. Instead, it will create an EULA (end-user license agreement) file that we need to accept first.
sudo nano eula.txt
Here’s the result:

Save the file by typing CTRL + X, and then press Y.screen -S "Minecraft server 1"
You can change the name based on your preferences.
Good job! You have successfully installed your custom Minecraft server on Ubuntu or CentOS.
Now, we are going to run the Minecraft server for real this time. Type the following command again:
java -Xmx1024M -Xms1024M -jar minecraft_server.jar nogui
The minimum requirement to run the server is 1024MB (1 GB) of RAM. That’s why we enter 1024M after the -Xmx and -Xms options. If you want to allocate more RAM, you can change the value to 2048M or above, given that your server offers such specifications.
Here’s what you should see after executing the command:

The server is now running in the background. To leave Screen, press CTRL + A, then D.
You can re-open the Screen window by typing this command:
screen -r
Should you need to customize the server’s settings, open the server’s properties file with Nano:
nano ~/minecraft/server.properties
Nonetheless, we suggest that you stick with the default configuration to prevent any issues.

You can also set up a Minecraft server on your Windows PC. What’s great, the steps are easier than the previous one.
java -version
If it matches the latest version on the official website, you can continue to the next step. In case it’s unavailable or outdated, download the installer.


5. Open the EULA file and change the value from false to true.

Alternatively, you can open the command prompt and navigate to the dedicated Minecraft folder. For example:
cd Download/Minecraft
Then, execute this command:
java -Xmx1024M -Xms1024M -jar minecraft_server.1.14.4.jar nogui
If you see a similar screen, it means your Minecraft server has successfully started:


Lastly, let’s see how we can make a Minecraft server on macOS:
java -version
If it’s not available, you may download and install a legacy version of Java from the Apple website.
#!/bin/bash cd "$(dirname "$0")" exec java -Xms1024M -Xmx1024M -jar minecraft_server.1.14.4.jar nogui
Save this file as startmc.command in the same directory where the Minecraft server file resides.
cd Desktop/MinecraftServer
Grant the required permission with this command:
chmod a+x startmc.command
The window might show you a missing file/directory warning. Don’t worry, this is completely normal when you run a Minecraft server for the first time.If you want to make Minecraft more exciting, you should consider making a private Minecraft server. You’re guaranteed to have much more freedom and fun when playing this game.
Thankfully, in this article, you have learned how to make a Minecraft server on Linux (Ubuntu and CentOS), Windows, and macOS. What’s great, the steps are easy to follow and won’t cost you much money.
Now let’s try it yourself and have fun!
September 23, 2017
I ran minecraft and its working, but once i edited the properties of the server to change game mode and max players, it doesnt update. I figure i need to end the server program then run it again, but i am unsure how to end the program?
November 19, 2017
I have to run the command as sudo otherwise it gives errors... sudo java -Xmx1024M -Xms1024M -jar minecraft_server.1.12.2.jar nogui [19:12:37] [Server thread/INFO]: Starting minecraft server version 1.12.2 [19:12:37] [Server thread/INFO]: Loading properties [19:12:37] [Server thread/INFO]: Default game type: SURVIVAL [19:12:37] [Server thread/INFO]: Generating keypair [19:12:37] [Server thread/INFO]: Starting Minecraft server on *:19132 [19:12:37] [Server thread/INFO]: Using epoll channel type [19:12:37] [Server thread/INFO]: Preparing level "world" [19:12:37] [Server thread/INFO]: Loaded 488 advancements [19:12:37] [Server thread/INFO]: Preparing start region for level 0 [19:12:38] [Server thread/INFO]: Done (0.888s)! For help, type "help" or "?" But when I add the server to minecraft, it just shows as "Locating server" and if I select the server it says "Unable to connector to world". I have tried disabling the Ubuntu firewall (ufw) and added the port forwarding on my router but it makes no difference. I am trying to get this working on an internal network (LAN) and have tried different ports with no luck.
Replied on December 14, 2017
Hey, Are you adding minecraft server IP address?
Replied on January 27, 2018
but how do you add a the server ip under the config file and if so is there a format we need to use?
Replied on February 01, 2018
Hey Domantas, I think you should have a tutorial on how to set up a Spigot Minecraft server. It's a lot more user friendly :)
Replied on February 15, 2018
Hello, Justin! Thank you for the suggestion. We'll make sure to keep it in mind when publishing future tutorials! ;)
Replied on February 25, 2018
I'm having the same problem as John. I have the server running (I can tell because I removed the "nogui" option so I can see the window of what it is doing). When I go to the iPad or Android apps and try to connect to the server I get an error that it can't connect. I am on the same network and entering the server's IP and the port number that the server is reporting (25565). Does server name matter? The name I gave the server is Step 2-6 is too long to fit in the name field in the app.
January 18, 2018
Just my two cents. First you may need to add the openjdk repository to ubuntu. sudo add-apt-repository ppa:openjdk-r/ppa sudo apt-get update sudo apt-get install openjdk-7-jdk Cheers --VC
September 18, 2019
how do you find the ip in the server terminal?
Replied on September 24, 2019
Hey Miles, It's the IP address you used to connect to the server.
CJ
Replied on January 21, 2018
I get that this is old and all, but you need to set the properties then hit [CTRL] [X] then it will prompt you to hit [y] for yes or [n] for no type [y] and hit enter