How to make your own Minecraft java edition server 1.17.1 on Ubuntu

Introduction

Today I am going to teach you how YOU can have your own Minecraft server so you can play with your friends or even start your own adventure as a server admin.

This server requires you to do port forwarding. This means that you need to give public access to the Minecraft port (25565) from your router. Some internet providers do not allow this so you will need to make some research. To find out if your router is capable I recommend you to check out his website to learn more.

First, you will require an Ubuntu server, Ubuntu can be run on an old PC or even a Raspberry Pi, make sure it has a static IP to avoid any conflicts. I personally use an old enterprise server that can be found on eBay for a modest amount of money.

Step 1: Connect to your server

Connect to your server through SSH using a terminal.

ssh your_username@server_ip

Type your password and hit enter.

Step 2: Install Java

First, update your server repositories.

sudo apt update

Then install the latest java using the following command.

sudo apt install default-jdk

Press enter when asked if you want to install the package.

Step 3: Install screen

Screen is an application that allows processes to run while you are disconnected. This alternative requires you to log in and repeat the same process to start your Minecraft server every time the server shuts down.

sudo apt install screen

Step 4: Create a location for your Minecraft files

To create a folder in ubuntu we use mkdir, which means “make directory”.

mkdir minecraft

To enter the folder we use cd.

cd minecraft

Step 5: Download the required Minecraft server files

Here is the official Minecraft server download website, right-click on the download link and copy the address.

Then download the file on your server (In this case my link was https://launcher.mojang.com/v1/objects/a16d67e5807f57fc4e550299cf20226194497dc2/server.jar)

wget https://launcher.mojang.com/v1/objects/a16d67e5807f57fc4e550299cf20226194497dc2/server.jar

Once the file has been downloaded its name will be “server.jar”, to avoid confusion change the name to the server version. In this case, it would look like this “minecraft_server.1.17.1.jar”

mv server.jar minecraft_server.1.17.1.jar

Step 6: Comply with Minecraft EULA

We will need to modify some files to start using our server but first, we need to create them. To create them we need to execute the .jar file.

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

Once executed, it will create a file called “eula.txt”, in order to comply with the Minecraft End User License Agreement we need to modify the file from “false” to “true”.

nano eula.txt

Now to save press “Control + s” and to exit “Control + x”.

Step 7: Start screen

To use screen all we have to do is execute it.

screen

Some information is going to pop up, just hit “enter” and we can start our Minecraft server.

Step 8: Start the server

To start the server use the following command:

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

You can change the RAM amount according to your needs.

Conclusion:

I hope this guide was useful to you. If have any questions or suggestions leave a comment below, I will be happy to answer them 😀

One Comment

Comments are closed.