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

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

Download Complete Linux Commands Cheat Sheet

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 seven Minecraft server hosting plans ranging between $6.95 and $77.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 and downgrades 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. Select Manage to enter the Server Management area.
The VPS section in the hPanel.
  1. Run the server by clicking Start in the Server Status section. Once the server status has changed from Stopped to Running, you can manage the server.
The server management section in hPanel showing the server status.

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 Server Management section of your hosting account and scroll down to Other Settings. Make sure the operating system is Debian 10 with Game Panel. If it’s not, change it and click Save changes.
The Other settings section in hPanel, showing how to change the operating system
  1. Scroll up to the Notes section under Server Status. There, you will find the login details to the Game Panel’s dashboard.
The notes section under the server status in hPanel.
  1. Click on the Login Details button in the Template Details section. Click the Login URL to open the login page.
The Login Details window showing the login URL in hPanel.
  1. Enter the login details you obtained from the Server Management tab. If the process is successful, you will see the Game Panel’s dashboard.
Hostinger's game panel login.

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:

  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:
wget https://launcher.mojang.com/v1/objects/a16d67e5807f57fc4e550299cf20226194497dc2/server.jar
  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/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:

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

  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:
#!/bin/bash
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 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?

While port forwarding is essential for creating a multiplayer server, it also makes your server public. That means anyone with the external IP address of your server hardware can join the server.

Setting up a whitelist on your Minecraft server is the easiest way to manage player access to it. Alternatively, you can choose not to port forward the default Minecraft port and only share the server IP address with friends in private. This way, only players with the IP address will be able to join the server.

How Do I Protect My Minecraft Server Against DDoS Attacks?

A distributed denial-of-service (DDoS) attack is a form of cyberattack aimed to crash a server by overloading it with large volumes of fake traffic. The perpetrator may do so to shut down the server’s activity and extract players’ personal information.

We recommend choosing a web host that offers DDoS protection to mitigate DDoS risks. Here at Hostinger, we include this security measure 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. That said, you’ll need to pay extra for it.

How Much Does a Minecraft Server Cost?

The cost of making a Minecraft server varies depending on whether you run it locally or through a web host.

Minecraft hosting providers like Hostinger, Nodecraft, and Apex Hosting offer their services for $2.50-$10/month. Most hosting plans usually come with a modpack installer, plugin support, security measures, and customer support ‒ an easy and cost-effective solution for beginners and non-technical users.

The hosting plan you’ll 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. Be prepared to spend more for a high-tier plan if you want to host a large number of players and install many mods.

Free Minecraft server hosting options are available should you want to save money. However, they tend to come with limited RAM and bare minimum features. 

For example, the Server.pro free plan only allocates 1GB of RAM and supports ten players and ten plugins. It also features advertisements and doesn’t have essential features like the game firewall and backups. Therefore, we advise against using free Minecraft server hosting services.

Self-hosting your own Minecraft server may be more cost-effective if you already have a computer that meets the minimum requirements. However, keep in mind that your performance may suffer if you start other programs while the server is running. 

Ensure that your machine has enough RAM – the minimum RAM requirement is 100MB-300MB/user. Minecraft versions 1.14 and higher also tend to be memory-intensive. Not having enough memory will result in the server crashing.

Budget-aside, hosting a dedicated server locally requires advanced technical knowledge. You’ll have to maintain the server’s resource usage and security. Moreover, available support will be limited to the official Minecraft website’s knowledge base and the community forum.

Can I Make Money with a Minecraft Server?

Mojang Studios, the developer of Minecraft, allows you to monetize the server as long as you don’t violate its commercial usage guidelines

Some of the most common monetization methods include charging for access to the game server, selling cosmetics, asking for donations, and providing sponsorships for third parties.

Players who aren’t camera-shy may record or stream and monetize their gameplay on YouTube and Twitch. In 2020, the top five Minecraft players made over $8,000,000/year from ads, sponsorships, and tournaments.
Once you have made a name for yourself, other forms of monetization like selling merchandise and affiliate marketing will become available to you.

Keep in mind that Mojang Studios forbid selling in-game benefits for real money. These include in-game commands, items, and plugin functionality.

Was this tutorial helpful?

Author
The author

Jordana Alexandrea

Jordana is a Digital Content Writer at Hostinger. With her Information System and website development knowledge, she aims to help aspiring developers and enterpreneurs build their technical skills. During her free time, she travels and dabbles in freestyle writing.