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

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.

Subscribe For more educational videos! Hostinger Academy

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's Minecraft server hosting page.

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:

  1. The newly purchased Minecraft server will appear under the Setup section. Click on the Setup button next to it.
  2. Follow the instructions to complete the setup process. It will include deciding the server name and root password.
  3. 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.
The VPS section in the hPanel.

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:

  1. Navigate to the Overview section of your hosting account and you will see that the operating system is Debian 10 with Game Panel.
The Other settings section in hPanel, showing how to change the operating system
  1. 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.
The Operating System section on hPanel.
  1. Click on the Login URL and fill in the details. If the process is successful, you will see the Game Panel’s dashboard.
Hostinger's game panel main menu.

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.


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
sudo add-apt-repository --yes
sudo apt-get update
apt-get install adoptopenjdk-16-hotspot


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:

  1. Create a new folder to store all your Minecraft configuration files by running this command:
mkdir minecraft
  1. Move to the newly created Minecraft server folder by entering:
cd minecraft
  1. Use wget command to download the Minecraft server properties file:
  1. 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
  1. 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.

  1. 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/

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:

  1. 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
  1. 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.
  2. 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.

  1. Create a new Minecraft server folder and move the .jar file there.
  2. Double-click the file to generate the End User License Agreement (eula.txt) within the same folder.
  3. 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.
  4. In that same folder, create a new text document (example: newdoc.txt)
  5. 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
  1. From the text editor, choose Save As and change the file name to run.bat. Make sure to keep the type as All types.
  2. 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 – 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:

  1. Newer releases of macOS include Java by default. Double-check the version 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 Apple’s website.
  2. Create a dedicated folder for your Minecraft server. Then, download the Minecraft server setup file 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.18.jar nogui
  1. Save this file as startmc.command in the same directory where the Minecraft server file is.
  2. 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
  1. Grant the required permission using chmod command:
chmod a+x startmc.command
  1. 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:

  1. 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.
  2. 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.
  3. 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 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.

The author

Jordana A.

Jordana is a digital marketing and web development enthusiast. She loves spending her time in front of her laptop, working on new projects and learning new things. When she's not busy with work, you can find her traveling the world in search of the best sushi!