How to Make a Minecraft Server on Ubuntu, Windows and CentOS

How to Make a Minecraft Server on Ubuntu, Windows and CentOS

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.

Or you can use a special offer from Hostinger and get your own Minecraft server up and running in just a few clicks.

Get Started

How to Make a Minecraft Server in hPanel?

Setting up a Minecraft server with Hostinger has never been easier. Once you have chosen your plan and made your purchase, login to your Hostinger account. From there, we’ll take you through the rest of the steps:

  1. In the hPanel, under the Setup section, you’ll see your newly purchased Minecraft server ready to be set up. Click the Setup button on the right.
  2. Follow the given instructions, such as filling in your server name and root password, to complete the initial setup process.
    Configuring a new Minecraft VPS server in hPanel.
  3. Once that’s done, you’ll find your Minecraft VPS server under the VPS section in your hPanel’s home screen. Click Continue to go to the Server Managment screen.
  4. To start your newly set up server, simply click the Start button under the Server Status and wait for a couple of minutes.

Congratulations, your Minecraft server is now live. In the Server Managment page, you’ll find the Minecraft Control Panel login details under the Notes section along with any additional information you might need when when managing your server.

How to Make a Minecraft Server on Linux?

Making a Minecraft server on Linux

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 Minecraft Hosting plan, the login credentials are in the Servers tab of hPanel.

The process of creating servers for Minecraft on these two operating systems is quite similar, but there are a few differences you’ll notice when installing the required packages.

1. Installing Java and Screen

Before we begin, keep in mind that the minimum operating system requirements for the following tutorial are Ubuntu 16.04 and CentOS 7.

Connect to your server via SSH. Open the built-in terminal shell (PuTTY for Windows users) and type the following command:

ssh username@ipaddress

NOTE: Don’t forget to change both values with your real username and server IP address. When prompted, enter your username and password.

  1. A Minecraft server requires Java. Therefore, check whether it’s installed on your system by executing this command:
java -version
  1. Proceed to the second section of this tutorial if you already have Java installed. However, if Java is not found, follow the next step.
  2. Run these two commands to download the latest software packages and install Java:
    • On Ubuntu:
sudo apt-get update
sudo apt-get install default-jdk
    • On CentOS:
sudo yum update
sudo yum install java -y
  1. Once Java installation is complete, you can install Screen:
    • On Ubuntu:
sudo apt-get install screen
    • On CentOS:
sudo yum install screen -y

2. Installing and Running Minecraft Server on Linux

Now that Java and Screen are ready, we can begin installing a Minecraft server.

  1. Create a new directory where you will store all your Minecraft configuration files. This step is optional, but we highly recommend it so you can keep your system organized. To do this, type:
mkdir minecraft
  1. Move to the newly created directory by entering:
cd minecraft
  1. Before we can download the required configuration files, install wget:
    • On Ubuntu:
sudo apt-get install wget
    • On CentOS:
sudo yum install wget -y
  1. Use wget command to download the Minecraft server properties file:
  1. In this example, the latest server version is 1.15.2. You should visit this link to check if a newer version is available for download. If so, change the link for the command above.
  2. Run the Minecraft server properties file by entering this command. If you want to use the graphical user interface, simply remove the nogui part from the command:
java -Xmx1024M -Xms1024M -jar minecraft_server.1.15.2.jar nogui
  1. At this point, the server program will not start yet. Instead, it will create a EULA (end-user license agreement) file that we need to accept first.
  2. To accept Minecraft’s EULA, open eula.txt file with Nano text editor:
sudo nano eula.txt
  1. Find the line that says:

Then change it to:


Once done, don’t forget to save your changes.

  1. Once that is done, activate Screen so the server can run in the background:
screen -S "Minecraft server 1"
  1. You can change the name based on your preferences.

Good job! You have successfully installed your custom Minecraft server on Ubuntu or CentOS.

3. Running Minecraft Server

Now, we are going to run the Minecraft server for real this time. Type the following command again:

java -Xmx1024M -Xms1024M -jar minecraft_server.1.14.4.jar nogui

The minimum requirement to run the server is 1024MB (1 GB) of RAM. That’s why we’ve entered 1024M after the -Xmx and -Xms parts. 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:

A terminal screen showing Minecraft server is running in the background

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 settings, open the server’s properties file with Nano:

nano ~/minecraft/

Nonetheless, we suggest that you stick with the default configuration to prevent any issues.

How to Make a Minecraft Server on Windows?

Making a Minecraft server on Windows

You can also set up a Minecraft server on your Windows PC. What’s great, the steps are easier than the previous one.

  1. Open the command prompt and check the Java version on your computer:
java -version
  1. If it matches the latest server version on the official website, you can continue to the next step. In case it’s unavailable or outdated, download the installer.Java installation for Windows
  2. Download the setup software (.jar file) from the official server page.
  3. Create a new folder for the Minecraft server and move the .jar file to that folder.
  4. Double-click the setup program to create a eula.txt file.
  5. Open the EULA file and change the value from false to true.
  6. Run the Minecraft server by double-clicking the .jar file. To do this, you might need to allow the program through the firewall.

Alternatively, you can open the command prompt and navigate to the dedicated Minecraft folder. For example:

cd Documents/Minecraft

Then, execute this command:

java -Xmx1024M -Xms1024M -jar minecraft_server.1.15.2.jar nogui

If you see a similar screen, it means your Minecraft server has successfully started:

Successfully running a Minecraft server on Windows

How to Make a Minecraft Server on macOS?

Making a MInecraft server on macOS

Lastly, let’s see how we can make a Minecraft server on macOS:

  1. Note that Java is included by default on newer versions of macOS. You can double-check by entering this command on your terminal:
java -version
  1. If it’s not available, you may download and install a legacy version of Java from the Apple website.
  2. Create a dedicated folder for your Minecraft server. Then, download the Minecraft server setup program and put it in that folder.
  3. Open TextEdit and set the format to plain text (Format -> Make Plain Text). Paste the following line:
cd "$(dirname "$0")"
exec java -Xms1024M -Xmx1024M -jar minecraft_server.1.15.2.jar nogui
  1. Save this file as startmc.command in the same directory where the Minecraft server file resides.
  2. To make startmc.command file work, the execute permission is needed. To do so, open the terminal and head to your Minecraft folder. For example:
cd Documents/MinecraftServer
  1. Grant the required permission using this command:
chmod a+x startmc.command
  1. If the steps are done correctly, you should be able to start the server by double-clicking the startmc.command file. It will open a new terminal window.
  2. A missing file or directory warning might appear at this time. Don’t worry, this is completely normal when you run a Minecraft server for the first time.

Why You Should Make Your Own Minecraft Server?

With more than 68 million players, Minecraft remains one of the most popular video games in the world.

Minecraft offers unlimited possibilities to create a virtual world, a place where you can let your imagination loose and build some incredible pieces of work. What’s great, you can take such experience to a whole new level by making your own Minecraft server.

Owning a private server gives you more control over your gameplay. You can invite your friends or other users, create your own rules, install any mods, and much more.

Unfortunately, many people think that building a private Minecraft server is difficult and expensive. However, 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 Windows, Linux, or macOS computer, so there’s no need to buy a new machine.

If you’re ready, it’s time to learn how to make a server for Minecraft.


If you want to make Minecraft more exciting, you should consider making a private Minecraft server. You’re guaranteed to have much more freedom when playing Minecraft.

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 a fortune.

Good luck and happy building!

The Author


Domantas G. / @domantas

Domantas leads the content and SEO teams forward with fresh ideas and out of the box approaches. Armed with extensive SEO and marketing knowledge, he aims to spread the word of Hostinger to every corner of the world. During his free time, Domantas likes to hone his web development skills and travel to exotic places.

Related tutorials


Josh Reply

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?



    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


John Reply

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.


    Domantas G.

    Replied on December 14 2017

    Hey, Are you adding minecraft server IP address?


      jack salmick

      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 :)


        Gediminas B.

        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! ;)


      Steve G

      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.


Valdecir Carvalho - Homelaber Reply

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


Zekeplayzz Reply

June 12 2019

On it only shows the latest minecraft server version. Most people like to use 1.8 for their servers, maybe you should include how to get that minecraft server to.


Miles Reply

September 18 2019

how do you find the ip in the server terminal?


    Domantas G.

    Replied on September 24 2019

    Hey Miles, It's the IP address you used to connect to the server.


Kappa Reply

October 30 2019

Nice, this tutorial helped me a lot.


DanielDark Reply

February 26 2020

how can i let my server stay on?



    Replied on March 12 2020

    Hi DanielDark, What OS are you using? If you are using a Debian try the screen command: sudo apt-get install screen screen ./ :)


Eric Reply

March 29 2020

Hey Domantas, This was the best tutorial, hands down!!! Just spun up a vm ubuntu server in Azure then ssh into the server. I followed your directions exactlly and I got it up and running. I updated to the newer minecraft version 1.15.2 which you even thought of placing the link right there. Superb! Man I can't thank you enough!! P.S. The Step 3 has a slight might have a slight mistake it shows the command [ java -Xmx1024M -Xms1024M -jar minecraft_server.jar nogui ] i think you meant [ java -Xmx1024M -Xms1024M -jar minecraft_server.1.14.4.jar nogui ] Thank you1


    Domantas G.

    Replied on April 24 2020

    hey Eric, Glad this tutorial helped you. thanks for pointing out the mistake. It has been fixed.


Ben Kennish Reply

April 12 2020

Is this for setting up a Minecraft server that'll support the Windows 10 client and cross platform play or will it only work for the Java edition? Cheers, Ben


    Andrius S.

    Replied on April 13 2020

    Hey Ben, this setup will support cross-platform play.


Ivar Reply

May 07 2020

Hi, I stream chess on twitch and are thinking about making a small minecraft server where me and my views can just relax and have some fun inbetween long hours playing chess. I have done this in the past and used a bukkit server on my mac. I was all fun untill we got hacked/greafed. Can i use bukkit plugins if I use hostinger and make the server how I want it. And how does the support work? I was thinking to try it for a month but I will use you guys longer if I like it.


    Andrius S.

    Replied on May 08 2020

    Hey Ivar, awesome! I love chess, whats your Elo rating? You will receive 24/7 live chat support when buying any web hosting plan, and by following this tutorial, you will have your Minecraft server up and running in no time. Let me know if you have more questions.

Leave a reply




This site uses Akismet to reduce spam. Learn how your comment data is processed.

Become a part of Hostinger now!

More in VPS
Iptables Tutorial - Securing Ubuntu VPS with Linux Firewall
Iptables Tutorial – Securing Ubuntu VPS with Linux Firewall