How to Make a Minecraft Server with Hostinger, Ubuntu, Windows, and macOS

Minecraft is a popular sandbox-style adventure game with a massive player base. In 2020, the Java-based game had approximately 131 million active users monthly and sold over 200 million copies worldwide.
Besides offering flexible gameplay mechanics through different mods, Minecraft is also easy to learn and promotes valuable skills, such as problem-solving and resource management. Furthermore, running a private Minecraft server allows you to create a custom world and play with friends.
The easiest way to set up your own Minecraft server is by purchasing a Minecraft hosting plan. This article will cover the steps to host a Minecraft server on Hostinger. We will specifically focus on the Minecraft Java Edition.
Additionally, we will explain how to make your own Minecraft server on different operating systems and avoid common errors during the configuration process. Lastly, we will answer some of the most frequently asked questions about hosting a Minecraft server.
Video Guide on How to Start a Minecraft Server
Too busy to read? Watch the video to learn how to run a Minecraft server instead.

How to Easily Configure a Hostinger Minecraft Plan
Purchasing Minecraft server hosting is an excellent alternative for players who don’t have the required hardware resources to do it independently. The hosting provider will streamline the setup process and manage the server in exchange for a monthly fee.
The following tutorial will cover the steps to configure a Minecraft server with Hostinger, from choosing the best hosting plan to setting up the game panel.

Step 1. Choose a Minecraft Hosting Plan

Hostinger offers three Minecraft server hosting plans ranging between $6.99 and $29.99/month. All VPS hosting plans come with the Game Panel, one-click Minecraft mod installer, DDoS protection, and automatic off-site backups.
We also support major Minecraft server software modifications such as CraftBukkit, Spigot, and Paper. With full root access, you can install .jar files of any modpack without any restrictions.
As each hosting plan allocates a different number of resources, make sure to consider your needs when choosing one. For example, your RAM usage will significantly depend on the number of players and mods added to the server.
Minecraft Wiki recommends getting 1GB of RAM to support 1-4 players. If you plan to use resource-intensive mods, you’ll need more memory.
As our hosting is highly scalable, you can pick any Minecraft server hosting plan to start with and upgrade it later in a few clicks. Server upgrades will be done in real-time, preventing data loss.
Step 2. Setup Your Minecraft Server
After making the purchase, log in to your Hostinger account to begin the Minecraft server setup process. Here’s how to do it:
- The newly purchased Minecraft server will appear under the Setup section. Click on the Setup button next to it.
- Follow the instructions to complete the setup process. It will include deciding the server name and root password.
- Your Minecraft server will be accessible from the VPS section of your hosting account homepage. Click on the preferred VPS to enter the Server Management area.

Step 3. Configure Your Minecraft Game Panel
All Hostinger Minecraft plans come with the Game Panel control panel to run the game hassle-free. Here are the steps to set up the control panel and access its dashboard:
- Navigate to the Overview section of your hosting account and you will see that the operating system is Debian 10 with Game Panel.

- Open up the Operating System section and you will see the Login URL with the username. In case you forgot your password, you can also reset it here.

- Click on the Login URL and fill in the details. If the process is successful, you will see the Game Panel’s dashboard.

Congratulations, your Minecraft server is now up and running. You can start playing different Minecraft versions and mods after creating an instance.
How to Setup Minecraft on a Server Running Linux
This section will show you how to create a Minecraft server on a machine running on Ubuntu or CentOS. The minimal operating system requirements are Ubuntu 16.04 or CentOS 7.
Keep in mind that this setup process also requires root SSH access to the server. Hostinger users can find the login credentials in the Server Management area of the hosting account.
Step 1. Install Java, Screen, and wget
Linux Screen is a terminal application that allows users to use a remote terminal from multiple locations over SSH. It maintains your work session in case there are network issues that may disrupt the connection.
First, connect to your server via SSH (PuTTY for Windows users). Open the built-in terminal shell and enter the following command:
ssh username@ipaddress
Important! Don’t forget to replace both values with your real username and server IP address. When prompted, enter your username and password.
Proceed to the following steps based on the server’s operating system.
Ubuntu:
Obtaining the latest Java version for Ubuntu requires a GNU Privacy Guard (GPG) key and adding a new repository. Download and install the newest version of Java, Screen, and wget by executing the following commands in your command line terminal:
apt-get update
apt-get install software-properties-common screen wget
apt-transport-https gnupg-curl
apt-key adv --fetch-keys https://adoptopenjdk.jfrog.io/adoptopenjdk/api/gpg/key/public
sudo add-apt-repository --yes https://adoptopenjdk.jfrog.io/adoptopenjdk/deb/
sudo apt-get update
apt-get install adoptopenjdk-16-hotspot
CentOS:
Run the following commands to install the latest version of Java and other required software packages:
sudo yum update
sudo yum install java -y
sudo yum install epel-release java-latest-openjdk wget screen -y
Step 2. Configure the Minecraft Server
After installing Java, Screen, and wget, you can set up the Minecraft server by following these steps:
- Create a new folder to store all your Minecraft configuration files by running this command:
mkdir minecraft
- Move to the newly created Minecraft server folder by entering:
cd minecraft
- Use wget command to download the Minecraft server properties file:
wget https://launcher.mojang.com/v1/objects/a16d67e5807f57fc4e550299cf20226194497dc2/server.jar
- Run the Minecraft server properties file by entering the command below. If you want to use the graphical user interface, omit nogui.
java -Xmx1024M -Xms1024M -jar minecraft_server.1.18.jar nogui
- The server program will create a EULA file. To accept Minecraft’s EULA, open the eula.txt file with the Nano text editor by entering:
sudo nano eula.txt
Modify the eula value from false to true and save the changes.
- Activate Screen so the server can run in the background. Feel free to change the server name based on your preference.
screen -S "Minecraft server 1"
Important! As of writing this tutorial, the latest Minecraft server version is 1.18. Be sure to use the correct version number in your commands by cross-checking it against the official Minecraft website.
Step 3. Run Your Minecraft Server
Run the Minecraft Java edition server once again by entering this command:
java -Xmx1024M -Xms1024M -jar minecraft_server.1.18.jar nogui
The server requires at least 1024MB (1 GB) of RAM to run. That’s why we’ve entered 1024M after -Xmx and -Xms. You can allocate more RAM by changing the value to 2048M or more if your server has it.
The server will be 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 modify the server settings, open the server properties file with Nano:
nano ~/minecraft/server.properties
That said, we recommend sticking with the default configuration to prevent any issues.
How to Setup Minecraft on Windows
If you don’t want to set up a remote Minecraft server, you can do so locally on your computer. The process of setting up a dedicated Minecraft server will depend on your operating system. It can be done if your computer meets the hardware and system requirements.
The following steps will guide you through setting up a Minecraft server on Windows:
- Open the command prompt by pressing Win + R and entering cmd. Then, check the version of Java installed on your computer using the following command:
java -version
- Minecraft and its servers require Java SE Development Kit 17.0.1 or higher. If you have it, proceed to the next step. Otherwise, download the Java installer from an official source.
- Download the Minecraft Java edition server software (.jar file) from the official Minecraft page.
Important! A warning message may pop up when you download the server .jar file. This is normal and safe as long as you’ve obtained the file from a credible source.
- Create a new Minecraft server folder and move the .jar file there.
- Double-click the file to generate the End User License Agreement (eula.txt) within the same folder.
- Open eula.txt using a text editor like Notepad and change the eula value from false to true. All Minecraft servers require users to agree to the Minecraft EULA before running the game.
- In that same folder, create a new text document (example: newdoc.txt)
- Open the new text file in text editor and paste in the script to run Minecraft. In this case, -Xms256M and -Xmx1G are the minimum and maximum RAM of your server, allocated for the game.
@echo off start "My Server" /min java -Xms256M -Xmx1G -jar server.jar nogui
- From the text editor, choose Save As and change the file name to run.bat. Make sure to keep the type as All types.
- Run the server by double-clicking the run.bat Minecraft file. You might need to allow the program to connect to the internet through the firewall.
If you don’t want to create a Minecraft server bat file or cannot do it, you can still run your server manually – open the command prompt and navigate to the dedicated Minecraft folder. For example:
cd Documents/Minecraft
Then, run the command manually to execute the server .jar file:
java -Xmx256M -Xms1024M -jar server.jar nogui
Pro Tip
In that same folder, you’ll find the file server.properties – open it with text editor to adjust your server settings, such as default Minecraft port, game mode, maximum amount of players and more.
How to Make a Minecraft Server on macOS
Setting up a Minecraft server on macOS also involves installing the latest version of Java. Here’s how to do it:
- Newer releases of macOS include Java by default. Double-check the version by entering this command on your terminal:
java -version
- If it’s not available, you may download and install a legacy version of Java from Apple’s website.
- Create a dedicated folder for your Minecraft server. Then, download the Minecraft server setup file and put it in that folder.
- Open TextEdit and set the format to plain text (Format -> Make Plain Text). Paste the following line:
#!/bin/bash cd "$(dirname "$0")" exec java -Xms1024M -Xmx1024M -jar minecraft_server.1.18.jar nogui
- Save this file as startmc.command in the same directory where the Minecraft server file is.
- The startmc.command file requires the execute permission to work. To grant it, open the terminal and navigate to your Minecraft folder. For example:
cd Documents/MinecraftServer
- Grant the required permission using chmod command:
chmod a+x startmc.command
- If the process is successful, double-clicking on the startmc.command file will start the server in a new terminal window.
Pro Tip
A missing file or directory warning might appear. This is completely normal when you run a Minecraft server for the first time.
Common Errors While Configuring a Minecraft Server
Configuration and internet connection issues may prevent you from accessing the Minecraft server. Here are some of the most common server errors and how to fix them to allow you and your friends to join in the game.
How to Fix “This Server Responded With An Invalid Server Key” Error?
This Server Responded With An Invalid Server Key error indicates that the server or the Minecraft launcher might be outdated.
If it’s your server, try accessing the localhost or the server address. Alternatively, restart the client and see if that solves the problem.
As this error commonly occurs to Minecraft servers started via a .exe file, we recommend setting up the server using the .jar file download instead.
How to Fix “You Are Not Whitelisted On This Server” Error?
A whitelist includes the list of players that have access to the server. Even if someone has the server’s IP address, they won’t be able to join the server if they aren’t whitelisted.
Encountering the You Are Not Whitelisted On This Server error means that the server operator hasn’t whitelisted the player’s username. The easiest way to solve this error would be to add the player to the whitelist.
First, activate the whitelist by running the following command on the server console:
whitelist on
If you want to add your friend to the server, use the following command. Make sure to replace playername with their username.
whitelist add [playername]
Here’s the command to see the list of players on the whitelist:
whitelist list
Pro Tip
If you want to use these commands in-game, begin each of them with a slash symbol. For example, /whitelist add [playername].
How to Fix “Connection Refused: Connect” Error?
The Connection Refused: Connect error message is triggered when a server drops or cancels a connection request. Some of the most common causes include a bad network connection, an incorrect Minecraft launcher version, and firewall issues.
Here’s what you can do to fix this error:
- Try joining the server via a different internet connection. There might be a connectivity issue on your end. If that doesn’t help, there’s a problem with the server itself.
- Add Minecraft and the game launcher to the list of firewall exceptions. If the error persists, allow the Java binary (javaw.exe) to bypass the firewall as well.
- Reinstall your client and restart the server. Do this if you have no issues connecting to other servers.
Enhance Your Minecraft Server Further
Now that you’ve set up your own Minecraft server, all that’s left to do is manage and improve the server.
Here are some things you should consider to take your Minecraft server to the next level:
- Port forwarding ‒ forwarding a port for your server allows users outside of your network to join the game you’re hosting.
- Minecraft mod installation ‒ there are plenty of Minecraft mods you can install on your server to enhance the gameplay experience. Some are aimed at performance optimization, while others introduce new mobs, gameplay mechanics, and more.
Conclusion
Minecraft is a sandbox game that has been popular among users of all ages for the last decade. Its main draw is the freedom to explore, build whatever you want, and alter the gameplay.
Making your own Minecraft server will allow you to attract a community and facilitate custom multiplayer gaming experiences. Plenty of players have even turned their servers into sources of income.
There are plenty of Minecraft hosting services available on the market that will allow you to set up a server to play with others. That said, if your computer is powerful enough, you can run a Minecraft server locally.
We hope this article has helped you understand how to make and how to run a Minecraft server. If you have any questions or tips, leave them in the comments section below.
Minecraft Server FAQ
This section will answer some of the most common questions players have about Minecraft server hosting and maintenance.
How Do I Only Allow My Friends to Access My Server?
Setting up a whitelist on your Minecraft server is the easiest way to manage access. You can also choose not to port forward the default Minecraft port. Only share the server IP address with friends in private, so that only players with the IP address can join the server.
How Do I Protect My Minecraft Server Against DDoS Attacks?
Choose a web host that offers DDoS protection to mitigate DDoS risks. At Hostinger, this security measure is included with all Minecraft plans by default. Another way to protect your Minecraft server involves getting a DDoS protection service from a third-party company like Cloudflare.
How Much Does a Minecraft Server Cost?
Minecraft hosting providers like Hostinger, Nodecraft, and Apex Hosting offer hosting for $7-$30/month. The plan you need will depend on the number of players you wish to support and how many mods you install. The average cost of hosting a server for 20 players is $15/month.
Can I Make Money with a Minecraft Server?
Yes. Some of the top monetization methods include charging for game server access, becoming a streamer, selling cosmetics, and getting sponsorships through third parties. You’re not allowed to sell in-game benefits for real money, like in-game commands, items, and plugin functionality.
Can I Run a Minecraft Server for Free?
Free Minecraft server hosting plans tend to come with limited RAM and bare minimum features, resulting in poor gameplay overall. Self-hosting your own Minecraft server may be more cost-effective if you already have a computer that meets the minimum requirements.
Comments
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?
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
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.
December 14 2017
Hey, Are you adding minecraft server IP address?
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?
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 :)
February 15 2018
Hello, Justin! Thank you for the suggestion. We'll make sure to keep it in mind when publishing future tutorials! ;)
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
June 12 2019
On minecraft.net/download 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.
September 18 2019
how do you find the ip in the server terminal?
September 24 2019
Hey Miles, It's the IP address you used to connect to the server.
October 30 2019
Nice, this tutorial helped me a lot.
February 26 2020
how can i let my server stay 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 ./run-minecraft-server.sh
:)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
April 24 2020
hey Eric, Glad this tutorial helped you. thanks for pointing out the mistake. It has been fixed.
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
April 13 2020
Hey Ben, this setup will support cross-platform play.
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.
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.
July 03 2021
Hi, I tried to press contact in the help section of your site but the link doesn't work. I've just purchased minecraft hosting, but have no game control panel that I can see in my server settings. I don't know where to login and how to direct my minecraft to the server etc. Please help. Also I need the domains to direct my domain to, as in, ns1.xxx.com and ns2.xxx.com. I hope to hear from you soon as we are waiting to set all up as we speak.
September 16 2021
Hi Emanuel, You can check out our starting guide for Minecraft here and if you're looking to point your domain name to your VPS, here's a step-by-step tutorial!
October 18 2021
can i put ANY mod i want? like literally ANY ONE in the world?
October 19 2021
Hey, yes - you can add any mod you like, as long as you have enough resources to run it :)