Skip to main content

[Oracle VPS] Create your own Minecraft Server always free

·34 mins· 0 · 0 ·
Tuto VPS Oracle Minecraft Server Always Free
JustinType
Author
JustinType
Cybersecurity Engineer and CTF Player
Table of Contents
VPS Oracle - This article is part of a series.
Part 1: This Article

Introduction to the series #

This article is the first in a series dedicated to hosting free lifetime services on a private server. The aim is to introduce as many people as possible to the world of computing, while sharing useful knowledge. I’m firmly convinced that it’s easier to understand a subject when you find it interesting and are willing to invest a little time. That’s why I’m going to show you how to set up your own game server, VPN server, cloud server, etc., with only one expense: a little time.

As these articles are aimed at a wide audience, I’ll try to keep the technical details as simple as possible, and I’ll assume that readers have an up-to-date Windows 10 or 11 computer.

  • Linux users: you’re smart enough to adapt these articles to your operating system.

  • MacOS users: you’re rich enough to buy a paid service giving the same result, or another computer with Windows.

Don’t forget that some tools or software may change over time, so the most important thing is to understand the methodology, if you understand the methodology you’ll can adapt it to your needs.

I hope you find these articles useful and learn something!

ready

Oracle Cloud Infrastructure (OCI) #

Presentation #

Oracle is an American company specializing in the sale of IT services, including the Oracle database management system, the Oracle Weblogic application server, the Oracle E-Business software package and the Oracle Cloud Infrastructure (OCI) cloud computing offering.

It’s the latter we’re interested in, as OCI offers “Always Free” services. By going to this page you can consult all the services eligible for this offer. There are many, and the ones we’re actually interested in correspond to the “compute” and “storage” categories.

These categories correspond to the computing power and storage space offered by Oracle. Generally, we speak of “Virtual Private Server” (VPS).

What’s important to understand is that Oracle doesn’t give us a physical server, as this type of machine is very expensive (expect to pay 5,000 dollars for a first-rate professional server). What Oracle provides us with are virtual machines (often shortened to “VM”).

A VM is simply a computer simulated by another more powerful computer!

It may sound strange, but in reality it’s very practical, because a computer can simulate several VMs, each with a different role and different characteristics. We can allocate a certain amount of computing power and storage space to a VM and modify it at any time.

This means we can be very flexible and easily manage all our services from a single machine.

“Always Free” offer #

With OCI’s “Always Free” offer, here’s what we get:

Always Free Oracle
See Oracle documentation

To sum up:

  • It is possible to create 4 VMs of Ampere A1 type or 2 VMs of Standard.E2.1.Micro type.
  • We have 4 OCPUs (you can compare this to a processor core, it’s the computing power)
  • We have 24 GB of RAM.
  • We have 200 GB of storage.
  • Each VM will be allocated at least 47 GB of storage for its proper operation.

We can do whatever we like with these resources: we can create 4 or 2 VMs and distribute the resources equally, or we can just create 1 VM with all available resources.

Obviously, the fewer resources a VM has, the less powerful it will be, so we need to choose which resources to allocate according to our needs.

All these resources are more than enough to create a powerful Minecraft server.

Other solutions #

Now let’s compare the other solutions to make your own Minecraft server, generally there are 3 solutions:

  • Host your server on your own machine
  • Use a free specialized hosting provider such as Aternos
  • Use a paid hosting provider such as OVH

choices

Using your own machine is free (if you don’t count the electricity consumed) and gives you total control over your server, but it requires a machine with good performance and a fast Internet connection, otherwise the server won’t be of good quality.

What’s more, you’ll need to open certain ports on your Internet router (your wifi box) to enable your friends to connect to your server. This may be difficult to achieve, depending on your Internet Service Provider (ISP), and may carry security risks for anyone using the router. Finally, the server will only be accessible when your machine is switched on.

This is a solution I don’t recommend, but it’s possible.

Using a specialized hosting provider like Aternos is free, simple and fast. In fact, once you’ve created your account, we can quickly generate a Minecraft server that will be accessible and playable right away.

However, this server can only accommodate a maximum of 10 people and can only be in Vanilla (no plugins, mods or custom maps). If you want to unlock these features, you’ll have to pay. Furthermore, you have no control over the server, which means that Aternos can remove it at any time. This happens regularly because they don’t have unlimited servers, so in order to offer their service to enough people they have to sort.

Generally speaking, if your server is inactive for more than one or two weeks, it will be deleted and given to another user. Yes, using cloud services is in reality using someone else’s computer, but if this service is free, don’t forget that the real owner of the machine can do whatever he wants.

matrix cloud

So this is a solution I recommend only if you want a small Vanilla server quickly and don’t intend to play with it much.

Using a paying hoster like OVH solves the problem of control, as you pay a certain amount per month for a VPS. As a reminder, VPS stands for “Virtual Private Server”, and as indicated in the name, this server is private. Your host provides it to you and won’t touch it as long as you pay (although this doesn’t rule out potential physical problems such as a fire in the premises). As you have total control over this server, you can use it as a game server, but also as a small personal cloud or VPN server or whatever you want…

In my opinion, this is the best solution, but unfortunately it’s a paying one, the more powerful the VPS you need, the more expensive it will be. Here’s an overview of prices at OVH :

OVH prices

Why such an offer? #

That’s where OCI comes in with its “Always Free” offer, which solves all the above problems, especially the cost because it’s Always free! Sounds too good to be true, so why does such an offer exist? Well, it’s simple: Oracle is one of the giants of Internet, but the company has fallen far behind its competitors in the Cloud market:

Cloud big entterprises

In such a competitive environment, with players who offer very low prices (as Amazon does with AWS) or offer a unique ecosystem that is widely used (as Microsoft does with Azure or Google with its Cloud), the only way to remain competitive is to attract people.

Oracle’s strategy is to offer its services “Always Free” to attract as many people as possible. Their aim is to get you used to their platform, their technologies and their services, until you take the plunge. And thus turn as many “Always Free” users as possible into future customers.

It’s not a problem in itself, it’s the strategy of many companies to provide you with super-efficient but limited free services, you just have to be aware of it.

In our case, it suits us just fine!

Disadvantages of the offer #

Although the offer is really very clean, it’s not perfect either. There are some disadvantages to keep in mind:

  • To create an account, you’ll need to fill in your personal and banking details, virtual cards are not accepted, so you’ll need to put in your real credit card (more information is given later).
  • You have access to all features, but if you accidentally use paid services, you will be automatically debited.
  • If you have any problems with your “Always Free” services, don’t rely on Oracle support to help you. Since you don’t make any money for the company, you are clearly not a priority or even taken into account.
  • Oracle may one day withdraw the offer and ask you to pay to continue using services that were previously “Always Free”.
Obviously this won’t happen overnight, you’ll be notified in advance if it does. The offer has been around for years, and there’s no sign of any change yet.

Creating the server #

Well, after this long (and necessary) introduction, we can now start to creating the server.

Creating an Oracle account #

First of all, go to the OCI home page and click on “Get started for free” :

OCI account creation 1

Fill in your information and validate the captcha. Here’s the first thing that’s a bit odd: you have to fill in your first and last name in capital letters (there’s a reason for this, which I’ll explain later):

OCI account creation 2

In this example, I am deliberately providing false information.

Check your e-mail address:

OCI account creation 3

You should arrive on this page:

OCI account creation 4

Create a strong password, confirm it, then select the “Individual” field (for personal use).

Create a username for your account (this is the name you’ll be asked to enter) and select your region.

OCI account creation 5

Choose the region closest to you for the best performance!

OCI account creation 6

You must now fill in your address and telephone number, as well as your first and last name, using capital letters :

OCI account creation 7

You will now have to fill in your banking information, as specified by Oracle you will not be charged, however you will have to deal with the verification system Cybersource which is … how to say … quite stupid.

OCI account creation 8

In fact, this system will check the accuracy of the information entered from the outset (surname, first name, address, telephone number, etc.) against the information on your credit card.

All the information you enter must match the information on your credit card. If you have changed your address or surname in the meantime, please enter the old informations that are written on your credit card.

Moreover, this system is case-sensitive, and the information transmitted by European banks is generally in capital letters, hence my recommendation from the start.

I tore my hair out for several days before finding the solution, and here’s some additional information I was able to find:

  • Do not create your account with an active VPN, Cybersource may detect this and consider this action fraudulent.
  • Do not use virtual or pre-paid cards, Cybersource will not be able to verify the card.

Before proceeding, please check your information:

OCI account creation 9

And add your credit card:

OCI account creation 10

You may be asked to validate a transaction for an amount of around one euro. This amount is not charged; it is simply used to check that a transaction is possible with your credit card and that it’s not empty.

If after all that you get this error, don’t count on Oracle customer service, they don’t know how Cybersource works, you’ll have to make several attempts by yourself, good luck!

OCI error

If all goes well, you’ll receive an e-mail telling you that your Oracle account has been created!

When you log in for the first time, Oracle will ask you to set up two-factor authentication. It’s very simple: just install an OTP (One Time Password) application such as FreeOTP or Google Authenticator on your smartphone and scan the QR Code provided by Oracle.

You’ll get a 6-digit code that changes every 60 seconds, which you’ll need to enter when you log in to your Oracle account.

Creating an instance #

Once on your Oracle Cloud Dashboard, go to the Compute > Instances tab:

Instance creation 1

Then create a new instance:

Instance creation 2

Rename your instance and choose your compartment (a compartment is just a way of grouping things together, you can leave the root compartment as default). Let Oracle choose the domain and don’t touch the security setting, but open the choice of images:

Instance creation 3

Make sure you choose an image that says “Always-Free-eligible”.

For my part, I’ve chosen a Oracle Linux 8 image:

Instance creation 4

For the instance type I choose a VM Ampere A1 :

Instance creation 5

Then choose the resources to allocate to your Minecraft server. Usually one OCPU is enough, but RAM depends on your server:

VanillaPluginsMods
Minimal: 2 GBMinimal: 3 GBMinimal: 4 GB
Recommended: 4 GoRecommended: 6 GoRecommended: 8-10 Go

For this example, I’m going to set up the server with 1 OCPU and 10 GB RAM :.

Instance creation 6

Normally you already have a virtual network, select it and leave the default settings:

Instance creation 7

You can create another virtual network, if you create several instances in the same virtual network, these instances will be able to communicate with each other. If you want to partition your instances, you’ll need to place them in different virtual networks (note that you can only create two virtual networks). You can leave the default settings:

Instance creation 8

If you’re familiar with SSH, you can deposit your public key. In our case, we’ll generate a key pair, then upload the private key to our personal machine.

Don’t lose this key, as it allows you to connect to your instance.

Instance creation 9

This is what the file looks like:

Instance creation 10

Leave the default settings for the Boot Volume (to put it simply, Oracle manages the encryption of your instance’s boot volume, which is an additional layer of security):

Instance creation 11

Then attach a storage space to your instance. You’ll need to create a new one, give it a name, associate it with a compartment and define its size.

If you leave the default choice, your instance will have 47 GB of space, which is more than enough; if you choose “Custom”, you can add more space.

Don’t forget that you have a maximum of 200 GB for all your instances.

Instance creation 12

You can leave the other settings as default and attach your storage space:

Instance creation 13

And that’s it! All the parameters of your instance are configured, and you’re ready to create it.

If you see a price for Boot Volume, don’t pay any attention, it’s just Oracle’s automatic calculation tool, which doesn’t take the “Always Free” offer into account, you won’t be charged.

Instance creation 14

If you see this message in red when you try to create your instance, it means that Oracle currently has no space left to create VMs in your region. There’s no other solution than to wait and try again… until you succeed.

Instance creation 15

Usually you just have to wait a few minutes or a few hours, sometimes a few days, but don’t despair there will be space left for your instance. In my case, I waited ~30 minutes.

Once the instance has been created, you’ll be redirected to its page (here the instance is being provisioned):

Instance creation 16

After a few minutes, the instance is ready for use:

Instance creation 17

You can find all your VMs in the “Instances” tab:

Instance creation 18
The IP adress has been modified

Accessing your instance #

Now that our VM has been created, it’s time to connect to it remotely!

If you’ve never administered a server before, you should know that a server rarely has a “Graphical User Interface” (GUI), which saves storage space and performance.

This means that there are no buttons or windows, the only thing displayed is text, known as a CLI (“Command Line Interface”).

Here’s what a CLI looks like:

CLI example

To indicate an action to your server, instead of pressing a button we’ll send it commands. Here’s a list of 5 basic commands to remember:

# Allows you to change directories, as if you were browsing the folders on your machine
cd [directory]

# Lists folders and files in the current directory
ls

# Allows you to edit or create a file
nano [file]

# Delete a file
rm [file]

# Creates a directory
mkdir [directory]

There are a huge number of possible commands, and the aim is not to remember them all. These will suffice to create our Minecraft server. For the curious, here’s a list of commands used to administer a Linux server: Hostinger

Okay, great, but how do we get access to our server’s CLI?

That’s where the SSH protocol comes in.

The SSH protocol #

SSH stands for “Secure Shell”. A shell, commonly known as a “terminal”, is the most common way of managing Linux servers.

A terminal will enable you to execute commands on the remote machine from your own machine. Today, remote administration is vital when you’re managing servers. As you can imagine, you’re not going to physically travel to carry out an operation, especially if you have to administer thousands of servers, sometimes in several countries.

SSH offers a wide range of features, but it’s mainly used for its numerous security mechanisms.

Some links to learn more about SSH :

Via cmd / powershell #

The SSH protocol is installed by default on the latest versions of Windows 10 and 11. To use it, open a cmd or powershell shell in the folder containing your SSH key.

You can do this by pressing the Windows key and typing the name “cmd” or “powershell”.

You’ll need to place yourself in the correct directory with the cd command.

→ Example: cd C:\Users\[your_username]\Desktop\Server_Minecraft

You can also right-click while holding down the Shift key:

SSH 1

The command to connect to your server is:

ssh opc@[ip] -i [cle_ssh]

For example:

ssh opc@69.69.69.69 -i ssh-key-2024-06-05.key

Accept the “fingerprint” by typing “yes” if prompted. If you get a “bad permissions” error, your SSH key has too many permissions. To solve this problem, go to your SSH key’s properties, then to the Security tab, select the Users group and delete inheritance.

SSH 2

No one else can use the key, so now you have to add:

SSH 3

And give you all the rights:

SSH 4

You can now connect to your Minecraft server via SSH. The red box indicates that you are connected as user opc on virtual network virtual-network-1, in the /home/opc directory, which corresponds to the symbol ~ :

SSH 5

Via PuTTY #

The above procedure is a little complicated, but practical because you don’t need to install anything on your machine. There are, however, tools available to simplify SSH connections, the best known is PuTTY..

Go to the PuTTY installation page and download the installer:

PuTTY 1

Once PuTTY has been installed, launch the “PuTTYgen” application and press “Load”:

PuTTY 2

Load your private SSH key:

PuTTY 3

Then save this private key in a .ppk format (usable by PuTTY):

PuTTY 4

You will get this kind of file:

PuTTY 5

Now open the “PuTTY” application and go to the Connection > SSH> Auth tab, import the previously created .ppk file:

PuTTY 6

Then, in the “Session” tab, enter the SSH parameters and save the session:

PuTTY 7

You won’t need to retype all your SSH settings from now on, just “Load” the session you’ve just saved.

When you connect to the server, accept the fingerprint:

PuTTY 8

And that’s it! You’re now connected to the server via SSH!

PuTTY 9

Transferring files #

Now you know how to access your instance and you’ve learned a few commands to administer your server, but how do you transfer files from your local machine to your server or vice versa?

That’s where the FTP protocol comes in!

The FTP protocol #

As its name suggests, the File Transfer Protocol (FTP) is a file transfer protocol. It enables the exchange of data between a computer, the FTP client, and a server, the FTP host. This server hosts the data from your website or applications, making it easier to put them online, migrate them or share them. In our case, it’s the Minecraft server!

Via FileZilla #

We’re going to use FileZilla to transfer files via the FTP protocol. To do this, we first need to download the software onto our local machine via this page.

Once FileZilla has been installed, we just need to set up the connection to our Minecraft server as follows:

  1. Open the site manager
  2. Create a new site
  3. Name the site
  4. Select the correct protocol (here SFTP)
  5. Enter your server’s IP address
  6. Enter the port to be used (here 22)
  7. Choose authentication with a key file
  8. Enter user name
  9. Enter key file
  10. Save settings

FileZilla 1

When you connect to your server via FTP, this is what you see:

  1. The folder tree of your local machine
  2. Your server’s folder tree
  3. Files in your local machine’s current directory
  4. Files in your server’s current directory

FileZilla 2
Files beginning with a dot (.) are hidden system files by default

To test this, I create a text file on my local machine and transfer it to my server:

FileZilla 3

From my SSH access, I list the files (with ls) and display their contents (with cat), I can see that the text file has been transferred.

FileZilla 4

We’re now ready to create the Minecraft server!

Minecraft Vanilla server #

Install java #

Every Minecraft server needs java to run, so we’re going to install the Java Development Kit (JDK) on our server. To find the latest version available, here’s the command to run:

yum list jdk*

Install Java

Don’t be surprised, I use the Hyper terminal, the appearance is slightly different but the commands don’t change.

We’re going to install the latest “headless” version, this version may be different for you, take the latest version available, here’s the command to run at home:

sudo yum install jdk-22-headless.aarch64

To check that java is installed :

java --version

Install Java 2

Installing the Minecraft server #

At last we come to the exciting part! To install the Minecraft server you first need to get the .jar file from the official site.

Vanilla 1

The version on the official website corresponds to the latest stable version, if you want another version you will have to get the .jar file from another source

Vanilla 2

Once you’ve retrieved the .jar file from your local machine, create a folder on your VM for your Minecraft Vanilla server and transfer the .jar to this folder:

Vanilla 3

From your SSH access, go to this folder and execute this command:

java -Xms1G -Xmx2G -jar server.jar nogui
  • Xms allows you to specify the minimum RAM to be allocated to your server
  • Xmx allows you to specify the maximum RAM your server can use

Always check that the minimum RAM allocated is sufficient for your server and that the maximum RAM is not equal to or greater than the RAM available to your VM.

In fact, if your VM has 2GB of RAM and you allocate 2GB to your Minecraft server, your VM is likely to crash. You should always keep at least 1 or 2GB that your VM can use for other resources.

Numerous lines will appear, including this one:

Vanilla 4

This message indicates that you need to accept the EULA (end-user license agreement) in order to launch the Minecraft server.

If you list the current directory, you’ll see that the server has created all the files and folders it needs, including the eula.txt file.

Vanilla 5

Edit this file with the command :

nano eula.txt

Change the value “false” to “true” :

Vanilla 6

To save your changes and exit the nano editor, press CTRL + X then Y then the Enter key. If you don’t want to save your changes, press the N key instead of the Y key.

You can now restart your server with the same command:

java -Xms1G -Xmx2G -jar server.jar nogui

Your server is now generating the various worlds, until you get the message “Done”.

Vanilla 7

To stop the server, you must interrupt the operation in progress on your terminal with the CTRL + C combination or write stop.

Vanilla 8

You’d think our server would be up and running by now, but unfortunately not yet 😭 (cheer up, it’s almost over).

You won’t be able to connect to your Minecraft server from the game right now, simply because we haven’t opened the port for the Minecraft game!

Firewall configuration #

In reality, all the VMs we create are behind a firewall. The principle of the firewall is to authorize or block communications between our VMs and the outside world.

To communicate with the outside world, our VMs can use a lot of protocols, each of which has a default port:

  • port 80 and 443 are used by the HTTP and HTTPS protocols for a website
  • Port 25 is used by the SMTP protocol for e-mail transfer.

On an Oracle server, all ports are blocked by default except port 22 for the SSH protocol, which allows us to administer the machine.

Firewall 1

We therefore need to open the port used by the Minecraft server, port 25565:

Firewall 2

To do this, go to your server’s instance page and click on “subnet”:

Firewall 3

Then in the “Security List” of this subnet:

Firewall 4

As you can see in the “Egress Rules” list, all ports are blocked by default:

Firewall 5

Only port 22 is authorized in the “Ingress Rules”:

Firewall 6

We’re going to add port 25565, to do this press “Add Ingress Rules” then add a rule to authorize anyone (0.0.0.0/0) to access port 25565 via TCP and UDP:.

Firewall 7

Don’t forget to make one rule for the TCP protocol and one for the UDP protocol

For the server to take these changes into account, you need to run these commands:

sudo firewall-cmd --permanent --zone=public --add-port=25565/tcp
sudo firewall-cmd --permanent --zone=public --add-port=25565/udp
sudo firewall-cmd --reload

And get the message “success” :

Firewall 8

Launching the server #

Your Minecraft Vanilla server is finally ready!

Let’s go

You can try to connect to your server from the Launcher:

Vanilla Launch 1

Don’t forget to adapt the server’s IP address

And that’s it! Now all you have to do is share your server information with your friends so you can play together:

Vanilla Launch 2

Minecraft server with plugins - PaperMC #

Creating a Minecraft Vanilla server is cool, but creating a server with plugins is even better! Minecraft plugins can greatly enhance the game experience without changing Minecraft’s source code (unlike mods). The advantage is that you can add as many plugins as you like to your server (as long as it’s powerful enough), and players don’t have to do a thing.

Let’s create our Minecraft server with plugins!

Installing plugins #

To get started, you’ll need to download the .jar file for a server capable of running plugins. There are several possibilities, but for my part I’ll choose PaperMC (because it’s the most widely used):

Paper 1

Once you have retrieved the .jar file, create a folder specifically for this server and transfer the .jar to it:

Paper 2

It works in exactly the same way as a Vanilla server: go to this folder from your SSH access, then launch the server and allocate the necessary RAM:

java -Xms1G -Xmx3G -jar server-paper.jar nogui

The server will create the folders and files it needs to function properly, and then you’ll need to accept EULAs as described above for the Vanilla server:

Paper 3

If you restart your server, it will be operational, but for the moment we haven’t installed any plugins.

For the example I’m going to install 3 popular plugins:

  • WorldEdit → advanced build and destroy functionalities
  • EssentialX → lots of features needed by other plugins
  • BlueMap → world generation in a web interface

For each plugin you want to install, you need to make sure it’s compatible with your server.

Paper 4

Paper 5

Paper 6

Each plugin corresponds to a .jar file, once the files are downloaded I transfer them to my server in the “plugins” folder (Paper has automatically created this folder, you may have to create it yourself if you use another server such as Spigot) :

Paper 7

To install the plugins, simply restart your server!

Paper 8

Plugin configuration #

Some plugins will require you to configure them, so it’s up to you to read the documentation for each plugin to understand whether there are things you need to modify or not. In our case, we only need to configure BlueMap.

Go to plugins > BlueMap > core.conf, then agree to use BlueMap by changing “false” to “true”:

BlueMap 1

BlueMap uses the default port 8100 for the web application, as you can see in the webserver.conf file:

BlueMap 2

You can change this port if you wish, but in any case you’ll need to authorize it on the firewall for the plugin to work.

BlueMap 3

Once the port has been added to the firewall, don’t forget to reload the firewall configuration on your VM:

sudo firewall-cmd --permanent --zone=public --add-port=8100/tcp
sudo firewall-cmd --permanent --zone=public --add-port=8100/udp
sudo firewall-cmd --reload

You should get the message “Success”:

BlueMap 4

When you launch your server, it tells you that the BlueMap plugin is operational:

BlueMap 5

You can go to the url http://[IP_of_your_VM]:8100 and see that your world has been taken into account by BlueMap :

BlueMap 6

Now you know how to create a Minecraft server and install plugins!

Nice

Modded Minecraft Server - Forge #

Now we’ll take a look at how to set up a Minecraft server with mods.

The difference between a modded server and a server with plugins is that mods change the game’s source code, so two people can’t play with different source code because it’s not the same game!

This means that if you decide to create a Minecraft server with mods X and Y, all the people who want to play on your server must also have mods X and Y installed on their machine in the same version!

[Client side] - Prerequisites #

To install a mod on your local machine, you’ll need to download the CurseForge application. This allows you to install mods on a wide range of games. Go to the download page and install the “Overwolf” version :

Forge 1

Follow the installation process (it’s very simple), and once the application is installed, choose Minecraft :

Forge 2

You’ll need to link your Mojang account to CurseForge. If you haven’t bought the game and don’t have a Mojang account, you won’t be able to play with mods!

[Client side] - Installing mods #

For this example, we’re going to install the “ Pixelmon” mod, which lets you play Pokémon on Minecraft!

Click on “Browse” and on the mod you want to install:

Forge 3

The latest version of Minecraft available for this mod is 1.20.2, however this version is in “Beta” which means that the mod includes new features but is not necessarily stable.

You can find all available versions in the “Versions” tab:

Forge 4

If you click on the “Install” button (1), CurseForge will install the latest stable (release) version of the mod, here the version in 1.16.5, but you can choose to install the beta version by clicking on the button on the right (2) if you wish:

Forge 5

What’s important to remember here is that the “server” version is only available as a stable release, so we’re going to download the 1.16.5 version:

Forge 6

It is recommended to download the stable version in any case to avoid crashing your game, regardless of the mod.

Once the mod is installed, you can find it on your “My Modpacks” tab:

Forge 7

If you press “Play”, CurseForge will automatically launch your Minecraft Launcher and load the mod:

Forge 8

Now that your mod has been installed on the client side, we’re going to install it on our VM. Please note that anyone wishing to play on your server must first install the mod on their own machine.

[Server Side] - Installing mods #

A modded server is a Forge server, so the installation process differs slightly from that of a server with plugins. To begin, retrieve the mod from CurseForge, using the “Download Server Pack” button:

Forge 9

You’ve just retrieved a .zip file. In fact, I’ve been talking about mods until now, but in reality it’s a “modpack”. A modpack contains all the files needed to install your Forge server, as well as all the .jar files corresponding to the mods.

Create a folder for your Forge server on your VM and upload the modpack .zip file:

Forge 10

Unzip the contents of this file with the command :

unzip [filename]

Forge 11

You can delete the .zip file.

Numerous files and folders have been created, including .sh, these files are scripts, but for the moment these scripts are not executable. To give them this right, we need to write the command :

chmod u+x *.sh

Forge 12

You’ll notice that all these files have turned green, meaning that they can now be executed.

Run the “Install.sh” file, which will install the Forge server and all the .jar files corresponding to the mods in the modpack:

./Install.sh

Forge 13

You can now start your modde server with the command:

./ServerStart.sh

Forge 14

And then the worst happens: the server doesn’t launch and a big error appears on the screen!

Error

But don’t panic, it’s perfectly normal. This mod is quite old, in fact we’ve installed a version of java that’s too recent for it, I deliberately used this modpack to show you this scenario, as it happens regularly.

If we consult the Pixelmon mod documentation, we can see that we need Java 8 (for the stable version) and not a higher version:

Forge 15

Always check the mod or plugin documentation before installing it, this will help you solve most problems.

We will therefore install Java 8 (corresponding to jdk11) with the command :

sudo yum install jdk-11-headless.aarch64

We now have 2 versions of Java available on our VM. To use the correct one, simply run the following command, then choose the number corresponding to the version we want to use:

sudo update-alternatives --config java

Forge 16

To check that we have changed version, let’s run the command :

java --version

Forge 17

Now we can restart the server with ./ServerStart.sh, then accept the EULA :

Forge 18

And our modded server is ready! We can now play on it with the Pixelmon modpack installed:

Forge 19

Now you know how to create your own modded Minecraft server!

Very Nice

Improvements #

We’ve covered in detail how to create a Minecraft Vanilla, Paper and Forge server, as well as the configuration of multiple plugins and mods. However, it would be a shame to stop there, as we’re not yet exploiting all our VM’s potential.

Let me show you some of the improvements that change everything!

One VM, multiple servers #

You may have noticed up to now that we’ve only been running one Minecraft server at a time, but in reality it’s possible to run several on the same VM!

If you open several SSH terminals accessing your VM and try to launch the Vanilla and Paper servers at the same time, you’ll get an error message informing you that port 25565 is already in use.

This is normal, as both servers have the same default port configuration, but it’s possible to change this!

If you open the configuration of one of the two servers in the server.properties file, you’ll see 2 parameters with the number 25565:

  • query.port which corresponds to the server’s UDP port
  • server.port which corresponds to the server’s TCP port

Improvment 1
ArchLinux Documentation

If you change these parameters to the number 25564 for example, open this port on the Oracle firewall and don’t forget to load the firewall configuration into the VM as described in the previous points, you can now launch your Vanilla server and your Paper server at the same time!

Improvment 2

Always keep 1 or 2 GB of RAM strictly allocated to your VM and nothing else.

Here, our VM has 10GB and the maximum allocated RAM for both servers is : 2+3=5 GB, so no worries.

The more servers you have at the same time, the more computing power you’ll need, so don’t forget OCPUs too.

Open your server to cracked versions #

Maybe some of your friends haven’t bought the game but would still like to have some fun with you: it’s totally possible to open your server to cracked versions!

To do so, go to the server.properties file and change the online-mode parameter to false :

Improvment 3

Improvment 4

This file contains many interesting parameters, and I strongly advise you to have a look at the game documentation concerning it.

Managing your world - saving and resetting #

After hours of playing on your server, constructing numerous buildings and mining endless resources, your world crashes for no reason and you have to start all over again!

To avoid this situation, it’s a good idea to make regular backups of your world. It’s so simple!

Simply download the folders corresponding to the worlds on your server from your FTP client. There are 3 basic folders:

  • overworld, corresponding to the normal world
  • world_nether, which corresponds to the nether world
  • world_the_end corresponds to the end

Improvment 5

Once you’ve retrieved these folders, store them in a safe place, and simply put them back on your server to retrieve your current progress.

This can be very useful if you want to “go back in time”, or if you change server.

Alternatively, you can stop your server and delete these folders. When you restart your server, it will automatically regenerate a new, blank world.

Importing a world #

With what we’ve just seen in the previous section, you can imagine that it’s possible to import a world created by anyone!

The world must be compatible with your server version.

You can find maps on this site, we’ll use the Far Far Away kingdom from the Shrek universe as an example:

Improvment 6

Download the map (which is a simple compressed file), then upload it to your server:

Improvment 7

In the server.properties file, change the level-name parameter to the name of the map folder:

Improvment 8

Restart your server, and you’re ready to play on the map you’ve imported!

Improvment 9

24/7 Open Server - Service creation #

Of all the possible improvements, this is certainly the best.

In fact, if you’re observant, you’ll have noticed that from the start, my server has been linked to the terminal of my SSH connection. If I close my SSH connection or this terminal, I stop all processes linked to it, so I stop my Minecraft server. If I want my server to be open 24/7, my SSH access would also have to be open 24/7, and so would my own machine, which is very annoying!

I’m going to show you how to open your server 24/7 without having to keep your own computer on.

Jesus

To do this, we’ll need a service.

A service is a program that runs in the background on an operating system. Unlike ordinary applications, they have no graphical interface.

Services are used for a variety of essential tasks that need to run continuously or at regular intervals, for example:

  • Network management: Services that manage network connections.
  • Web servers: Services that provide web content (such as Apache or Nginx).
  • Databases: Services that manage databases (such as MySQL or PostgreSQL).
  • Security: Monitoring and protection services (such as firewalls or antivirus).
  • Task scheduling: Services that execute scheduled tasks at specific times or continuously.

It’s this last type of service that we’re interested in.

On Windows, you can view all the services running on your local machine from the services.msc console:

Service 1

On Linux, the most common service management system is systemd, and the tool for interacting with it is systemctl.

To list all services (active, inactive, …) you can use the command :

systemctl list-units --type=service --all

For this example, I’m going to create a service that will run the Forge server continuously.

First, create the service with the command :

sudo nano /etc/systemd/system/[service_name].service

Here, I’ll name my service : server-forge.service

Then we need to write the service configuration. Here’s what ours looks like:

[Unit]
Description=Forge Server Service
After=network.target

[Service]
WorkingDirectory=/home/opc/server-forge
ExecStart=/bin/bash ServerStart.sh
Restart=on-failure
RestartSec=60

[Install]
WantedBy=multi-user.target

The [Unit] section contains general information about the service.

  • Description=Forge Server Service: Provides a description of the service.
  • After=network.target: Indicates that our service should start after the network.target service, it means after the network is available.

The [Service] section defines how the service is to operate.

  • WorkingDirectory=/home/opc/test-forge: Specifies the working directory for the service. Commands will be executed from this directory.
  • ExecStart=/bin/bash ServerStart.sh: Defines the command our service will execute. Here, our service executes the bash script ServerStart.sh to start the Forge server.
  • Restart=on-failure : Indicates that the service is to be restarted automatically if an error occurs.
  • RestartSec=60: Defines the delay in seconds before attempting to restart the service after a failure. Here, we wait 60 seconds before restarting.

The [Install] section defines when and how the service should be installed or activated.

  • WantedBy=multi-user.target: Indicates that this service should be started when the system reaches the multi-user.target operating level, which is a typical operating state for non-graphical (multi-user) systems.

Once the configuration has been written, save it and close the file editor.

We need to make our system take our new service configuration into account with the command:

sudo systemctl daemon-reload 
If you change the service configuration, you must always execute this command so that the system takes the changes into account.

To inform the system that this service must be started each time your VM is restarted, run the command :

sudo systemctl enable server-forge

Finally, to start your service, run the command :

sudo systemctl start server-forge

You can view the status of your service with the command

sudo systemctl status server-forge

As you can see, our service is fully functional:

Service 2

It’s possible to create and run multiple services to have multiple Minecraft servers, these servers just need to be configured on different ports.

You can stop your service (and therefore your Minecraft server) with the command :

sudo systemctl stop server-forge

Your Minecraft server is now run by a service set up to never stop and restart automatically in the event of problems.

So it’s accessible 24/7, without you having to keep your SSH access open!

Perfect

Conclusion #

In this article, I introduced you to Oracle Cloud Infrastructure’s “Always Free” offer, which lets you create your own private server.

The aim was to share useful knowledge while introducing you to the world of IT.

In fact, after reading this article, you should now be familiar with system and network administration concepts such as :

  • VM creation and resource allocation
  • Remote administration protocols such as SSH and FTP
  • Basic CLI commands for interacting with a Linux system
  • Configuring a firewall by opening ports
  • Creating and configuring a service

As I myself fell into the world of computing thanks to video games and in particular Minecraft, it seemed logical to start this series of articles with a complete tutorial on this iconic game.

I hope you’ve enjoyed reading the article, if you have, please feel free to like it and share it with your friends.

Keep an eye on this blog, as I’ll be publishing many more articles in this style in the near future!

See you

VPS Oracle - This article is part of a series.
Part 1: This Article