You are on page 1of 10

Firefox https://www.hp.

com/us-en/shop/tech-takes/how-to-make-minecraft-server

HP TECH TAKES /...


Exploring today's technology for tomorrow's possibilities

1 of 10 14/01/2024, 10:49
Firefox https://www.hp.com/us-en/shop/tech-takes/how-to-make-minecraft-server

How to Make a Minecraft Server

Cameron Cashman | November 29, 2022


Reading time: 9 minutes

With so many massive randomly generated worlds to explore, you can only
get so far playing Minecraft on your own. Since its initial release in 2010,
Minecraft has become one of the top multiplayer gaming experiences,
allowing players from around the world to connect, explore, and build
together.

Minecraft: Java Edition facilitates multiplayer via user-hosted servers.


Setting up and hosting a Minecraft server isn’t difficult, but it does require
some basic knowledge of computers and networking. If you’ve never run a

2 of 10 14/01/2024, 10:49
Firefox https://www.hp.com/us-en/shop/tech-takes/how-to-make-minecraft-server

server before, the process can seem daunting.

There’s a lot to learn, so we’ve gathered the most up-to-date information


on how to quickly and easily set up and launch a Minecraft server for you
and your friends.

Why set up a Minecraft server?


There are already countless different servers to choose from - but
perhaps you’re interested in creating your own so you can customize it to
your heart’s content.

Creating a Minecraft server gives you full control of both the in-game
world itself and the back end - you can use admin commands to teleport,
spawn items, change the time of day, and so much more. If you want to go
a step further, there’s even a whole world of player-made modifications
that alter the gameplay in various ways - a server can be used to test out
those mods with your friends!

Hosting a Minecraft server yourself is also a great way to play online with
a small group of friends without having to set up a VPN or spend extra
money for a third-party hosting service.

How to set up a Minecraft server

To set up a basic Minecraft server using the server software provided by


Mojang, follow these instructions.

STEP 1: INSTALL/UPDATE MINECRAFT

Start by downloading the Minecraft launcher via the official website here.

3 of 10 14/01/2024, 10:49
Firefox https://www.hp.com/us-en/shop/tech-takes/how-to-make-minecraft-server

Run MinecraftInstaller.exe (or Minecraft.dmg on MacOS). The installer


will download the necessary files and prompt you to start the launcher
once it has finished.

To access the game, you’ll need to log into a Microsoft account that has
purchased Minecraft.

Once inside the Minecraft Launcher, you should make sure that you’re
playing the most recent version of the game. Ensure MINECRAFT: Java
Edition is selected in the left-hand column and that you’re launching the
Latest release.

This guide assumes you are using Minecraft version 1.19.2, the latest
release at the time of writing.

Click Play. Once on the main menu, you can close Minecraft and move on
to the next step.

STEP 2: INSTALL/UPDATE JAVA

Running a Minecraft server requires a specific version of Java, and you


may need to install it before continuing.

To check what version of Java is installed on your machine follow the


appropriate instructions according to your operating system:

WINDOWS

Open a command prompt window. You can do so by typing “cmd” (no


quotations) in the start menu search bar at the bottom left corner of your
screen.

Inside the prompt, type “Java -version” and hit enter. If Java is installed, it
should list a Java version number.

MACOS

Open Terminal by opening Finder, clicking Applications, then Utilities,


then Terminal.

Type Java -version and hit return. Make a note of the Java version that is
installed, if any.

4 of 10 14/01/2024, 10:49
Firefox https://www.hp.com/us-en/shop/tech-takes/how-to-make-minecraft-server

To run a Minecraft 1.19.2 server, Java build 19.X.X or higher is required.

If the command prompt returns a Java Runtime Environment other than 19,
or if you receive an error message stating that “java” is an unrecognized
command, you’ll need to install the correct version of Java.

Version 19 of the Java Development Kit can be found here. Make sure
“Java 19” is selected, then download the appropriate file according to
your OS. The installer version is recommended.

Run the Java installer and follow the instructions. Java will install the
necessary files. The program might prompt you to remove a previous
version.

Once complete, you can Close the installer.

STEP 3: DOWNLOAD SERVER .JAR FILE

After setting up Minecraft and Java, download the official server file from
the Minecraft website here. Ensure that the server version matches the
version of Minecraft you installed, in this case, 1.19.2.

Save the server.jar somewhere easy to access, the default Downloads


folder should be fine.

STEP 4: CREATE A MINECRAFT SERVER FOLDER

Next, create a new folder. It can go anywhere, but we recommend


somewhere easy to access, such as your Desktop or the Documents
folder. Name it something like Minecraft Server.

This is where all the necessary files, including the Minecraft world itself,
will be stored.

Finally, cut and paste or click and drag the server.jar file from its
original location into the Minecraft Server folder.

STEP 5: FIRST-TIME STARTUP

To run your Minecraft server, you’ll need to open another Command


Prompt (Windows) or Terminal (MacOS).

First, perform the change directory command by entering “cd” followed by


the path to your Minecraft Server folder. For instance, if you’re using

5 of 10 14/01/2024, 10:49
Firefox https://www.hp.com/us-en/shop/tech-takes/how-to-make-minecraft-server

Windows and the folder resides in the Documents directory, the command
would look like this:

cd C:\Users\YOUR USERNAME\Documents\Minecraft Server

The command line should update to the new folder location. This ensures
that the command prompt is looking for the server.jar file in the correct
location.

To start the server for the first time, input the following command:

java -jar server.jar --nogui

This will generate the necessary files within the Minecraft Server folder
you previously created. However, the server won’t launch until the End
User License Agreement is accepted.

Stop the server by entering the /stop command within the prompt. Next,
enter the Minecraft Server folder, locate the eula.txt file, and open it.

Change the bottom line from eula=false to eula=true. Save and close
the text document.

STEP 6: RESTART THE SERVER

You are now ready to complete the server setup. Launch the server again
using the following command:

java -jar server.jar

The server will fully initialize this time. You may be prompted to allow the
software through your machine’s firewall, which you should accept.

A server graphical user interface (GUI) window will open. This displays the
same information as the command prompt on the right-hand side, as well
as a list of active players and technical statistics such as memory usage
in the left column.

The server should be up and running now, and accessible from the
machine you’re running it on. You can test this by running Minecraft,
selecting Multiplayer, then Direct Connection. In the server address
box, type in “localhost” then click Join Server.

Once you’ve successfully connected to the server, you should see your
username appear under the “Players” tab in the server GUI.

6 of 10 14/01/2024, 10:49
Firefox https://www.hp.com/us-en/shop/tech-takes/how-to-make-minecraft-server

username appear under the “Players” tab in the server GUI.

STEP 7: CREATE AN AUTOMATIC SCRIPT

It’s not necessary to open a Windows command prompt or MacOS


Terminal every time you want to launch your server - you can program a
simple command file to do it for you automatically. Follow the appropriate
instructions according to your operating system:

WINDOWS: BATCH FILE

On Windows, batch files can be used to execute command lines. Open


your Minecraft Server folder, right-click, move your pointer to New, and
select Text File. A New Text Document.txt will be created.

Highlight the file’s entire name (including the .txt extension) and replace it
with “start.bat” then hit enter. If done correctly, Windows will warn you
about changing the file’s extension. This is OK, so click Yes.

Right-click start.bat and hit Edit. A notepad document will open where
you can type in the necessary command:

java -Xms1G -Xmx1G -jar server.jar

Save the file and exit Notepad.

MACOS: SHELL SCRIPT

On Mac, shell script files are used to execute commands. Navigate to the
Minecraft Server folder and create a new text file within it. Rename it to
“start.sh” and enter the following command:

#!/bin/sh

cd "$(dirname "$0")"

exec java -Xms1G -Xmx1G -jar server.jar

Save the file and open Terminal. Use the previously mentioned change
directory command to point Terminal to the correct folder, then run the
following command:

chmod a+x start.sh

This makes the start.sh file an executable.

7 of 10 14/01/2024, 10:49
Firefox https://www.hp.com/us-en/shop/tech-takes/how-to-make-minecraft-server

This makes the start.sh file an executable.

After creating the necessary command file, you can simply double-click it
and the server should start automatically.

Hosting a Minecraft server: Port forwarding

The server software is now up and running on your computer - but making
it public for other players to join will require a few extra steps.

The simplest way to connect this type of server to the internet is to host it
yourself using a process called port forwarding.

When there is an outside request to access a private network, such as a


Minecraft player connecting to a server, it goes through one of a router’s
many ports. When the ports are closed, no traffic is allowed.

Port forwarding opens specific ports so users can connect to servers


hosted on your network.

WARNING: While port forwarding is not an inherently dangerous


process, opening access to your WiFi router can pose a significant
security risk, and caution should be taken.

Port forwarding is effective for small servers for use between


personal friends and family. If you plan on opening your server to a
wider public audience, you should consider third-party server
hosting options, which do not put your home network at risk.

The port forwarding process varies greatly depending on the type of


router you use. If you’re unsure, you can find your router’s default gateway
address and access its settings via your web browser.

8 of 10 14/01/2024, 10:49
Firefox https://www.hp.com/us-en/shop/tech-takes/how-to-make-minecraft-server

WINDOWS

Open a command prompt. Type the command “ipconfig” and press enter.
The prompt will return several different IP addresses - scroll down until you
see the Default Gateway address in an X.X.X.X format. Copy these digits
by highlighting the text and pressing CTRL+C on your keyboard.

MACOS

Open the terminal app and enter the command “/sbin/ifconfig/” then hit
return. Locate the Default Gateway IP address in the X.X.X.X format.
Highlight it and use CMD+C to copy.

Paste the default gateway IP address into your web browser’s navigation
bar and hit enter or return.

If successful, you should be prompted to log into your router to access its
settings. Unless you changed the credentials, the default login information
should work. Try:

Username: admin
Password: admin

OR

Username: admin
Password: password

Once you’ve logged into your router, you should locate the Port Forwarding
section, which can sometimes be found in an advanced settings menu.

You’ll want to add a new Port Forwarding option, named something like
“Minecraft.” You also may need to input the host machine’s IP address.

You’ll also need to identify the internal (TCP) and external (UDP) port
numbers and fill them in. The Minecraft default is 25565 which should be
fine for both in most cases.

Once you’ve successfully opened the appropriate ports, Minecraft players


from outside your network can connect to your server via your IP address,
found by performing the ipconfig (Windows) or /sbin/ifconfig (MacOS)
command and locating your IPv4 address, which should follow a
XXX.XXX.XXX.XXX format.

9 of 10 14/01/2024, 10:49
Firefox https://www.hp.com/us-en/shop/tech-takes/how-to-make-minecraft-server

Provide your players with this IP address and ensure that they use :25565
as a suffix, like so:

XXX.XXX.XXX.XXX:25565

Players can connect to your Minecraft server by entering your IP address


under Server Address after clicking Direct Connect.

For router-specific instructions and more detailed information about port


forwarding, visit PortFoward.com.

Setting up your own Minecraft server


While it may look daunting, setting up a Minecraft server is quite simple. It
just requires a bit of patience.

After installing or updating Minecraft and Java, ensuring that you’re using
Java version 19 or higher for Minecraft 1.19.2, it’s just a matter of
familiarizing yourself with simple command lines - and once you’ve set up
a command file to automatically start the server for you, your Minecraft
server is just two clicks away!

This article only scratches the surface of Minecraft server hosting - but
should be all you need to know to get a basic server up and running, and
you should have no problem getting countless hours of playtime from this
setup.

10 of 10 14/01/2024, 10:49

You might also like