How to create a cloud based Minecraft server

Complete guide with all the relevant SSH commands.


Remote Access & Setup

The server is now live, but we are not even half way done with our server creation. What we’ve created is an online virtual server. But to work on it and access it, we need PuTTY. PuTTY is SSH client that allows you to remotely and securely connect to your instance.

First, go to the official PuTTY website, download and install the application.

Download the x86 version installer.

Before you can use PuTTY to access your server remotely, you need to create a PuTTY-compatible private key. This is quite easy and can be done using PuTTYgen. PuTTYgen is a small tool automatically installed with the PuTTY SSH client.

You can search in your windows search bar to find PuTTYgen.

Open up PuTTYgen and click on the ‘Load’ button.

It is best to open it up as an administrator.

Navigate to the original SSH key you downloaded while creating your instance on Oracle Cloud and select it.

If you cannot see the key, change the file type to ‘All Files.’

Once you’ve loaded the key, you will get a message saying you’ve successfully imported the key. Press OK. After that, click on ‘Save private key’ to save a PuTTY-compatible SSH key.

Put it in a folder where you won’t forget about it. Ideally the same folder as the original SSH key from the cloud.

Once saved, you will get a PuTTY private key file.

It has a computer icon as opposed to the plain white icon of the original key.

Now that we have the PuTTY key, we can go ahead and open up PuTTY. Open up PuTTY as an administrator and you can find it by searching it in your windows search bar.

PuTTY Application.

Once opened, go to the ‘Session’ and type in ‘ubuntu@yourpublicIP.’ This is the same public IP which was generated upon Oracle Cloud instance creation.

Leave the port as it is. By default it should be 22.

After that navigate to Connection > SSH > Auth > Credentials. Here you need to browse for the PuTTYgen created key to access your server.

Browse to the key which was generated using PuTTYgen and select it.

I named that key ‘Private Key.’

Once you’re done, click on open, and a terminal console will open. You can now access your server remotely from here. You can also enter useful commands and set up everything for your server through this console, which we will do now.

When you open it up for the first time, you will get a security alert. Press accept to continue.

Setting Up Passwords

This is an optional step, but you can setup a password for your sessions. It is best to do it as it can be useful in case you ever lose your private SSH key. It is still good practice to do it, regardless.

First, type ‘sudo -s’ to gain root access. It is also worth noting that if you want to paste something in the terminal after copying, you need to right-click. CTRL+V won’t work here.

You can tell you are now using as a root user as the name will change from ubuntu to root.

After that type in ‘nano /etc/ssh/sshd_config’ and you will see the following screen.

You can navigate this screen by using your navigational keys (up, down, left, and right) on the keyboard.

Scroll down (by pressing the down button) until you see PasswordAuthentication. There will be a ‘No’ in front of it. You must change it to a ‘Yes.’

Change the ‘No’ next to PasswordAuthentication to a ‘Yes’ as shown.

Now you can set a password for both ubuntu and root user. To exit this screen, first press CTRL+X. It will then ask whether you want top save modified buffers. When it does, press Y and then enter to exit.

Save modified buffers screen.

To set the password, type ‘passwd ubuntu.’ It will show you a new line where it reads ‘New Password.” You must enter your password and hit enter. Once you’ve done it, it will ask to retype. Retype it and enter to successfully set a password. You won’t be able to see the passwords for security reasons, but they are being typed.

Do the same for root user by typing ‘passwd root.’

Installing Java

This is one of the most important steps and your server won’t work if you do not install Java. For starters, you need to check whether you have Java installed or not.

To do that, run this command ‘java -version’, and if you have Java installed, you will get the following output.

It shows the Java version installed.

If you do not have Java installed, it will give you the following output (or something similar).

It lists all the available Java versions ready to be installed from the default Ubuntu OS package (repository).

If you do not have, you need to install Java. Here’s how you can do that. First, you must update your default Ubuntu OS repository by typing ‘sudo apt update’.

When it is done updating, you need to run two more commands to install Java fetched from these repositories.

• To install Java 17 JDK: sudo apt install openjdk-17-jdk

• To install Java 17 JRE: sudo apt install openjdk-17-jre

I didn’t have to run the command as I had already installed Java 17.

When they are successfully installed, you can move onto the next step.

Firewall Setup

This is also one of the most important steps in creating your Minecraft server. The firewall determines whether or not your friends will actually be able to connect to your server. We need to open the same ports we added as ingress rules in our Oracle Cloud instance.

But before we do that, we need to install firewall on our server. To do that, type ‘apt install firewalld’

Once again, I already had it on my server. That is why it shows the message stating that it is already installed.

After installing firewall, you need to enable it by running a command ‘sudo systemctl enable firewalld’

Do not confuse the “L” in systemctL for 1. Sometimes people confuse it and wonder why their command didn’t work.

Once you’ve installed it, you can run another command ‘sudo systemctl start firewalld’ just to be sure. And if you want to ensure firewall is running, you can do so by typing ‘sudo firewall-cmd –state’

It will return the status as ‘running.’ If it is not, you might have missed some commands.

Now we are ready to add the ports in our firewall to enable a smooth connection. To add the ports, you need to run commands in the following format:

• sudo firewall-cmd –permanent –zone=public –add-port=YOURPORT/IPPROTOCOL

The port and the IP protocol will change for each command. You need to run this command for all the ports and each port must be added for both TCP and UDP IP protocols.

For example, for 25565 we will run the following two commands:

• sudo firewall-cmd –permanent –zone=public –add-port=25565/tcp

• sudo firewall-cmd –permanent –zone=public –add-port=25565/udp

And you must repeat the same for ports 8080 and 5657. So you will enter six commands in total.

It shows a warning because I had already port forwarded. For you, it will only show ‘success.’

When you’re done, it is best to restart your firewall by typing the following command:

• sudo firewall-cmd –reload

Firewall reloaded.

PufferPanel & Server Setup

Okay, we’re past the hard part, it is a walk in the park from here on out. Now, we need to install PufferPanel and set up our Minecraft server. Once you’ve installed PufferPanel, you can directly create your Minecraft server from PufferPanel.

Installing PufferPanel

To install PufferPanel, we need to first add the official PufferPanel repository by running the following curl command:

• curl -s https://packagecloud.io/install/repositories/pufferpanel/pufferpanel/script.deb.sh | sudo bash

Once you’ve added the repo, you can install PufferPanel.

To install PufferPanel from the repo, run the following command:

• sudo apt-get install pufferpanel

PufferPanel installed.

However, we’re not done just yet. We need to ensure that PufferPanel is enabled and running. To do that run the following commands:

• sudo systemctl enable pufferpanel

• sudo systemctl start pufferpanel

Finally, you need to add an admin user so you can log into the panel and manage your server. For that, type in the following command:

• pufferpanel user add

You will get a prompt to set your username, email, password, and whether you want the user to be an admin or not. Make sure you type in ‘Y’ when it asks to confirm you want the user to be an admin. You can review the official PufferPanel installation documents on their website.

You can either continue adding more users here or use the PufferPanel UI to add more without using the command.

To access PufferPanel, go to your browser and type in yourpublicIP:8080. Once again, this is the same public IP you get by creating your Oracle Cloud instance.

You can use your PufferPanel credentials, which you just created, to sign in here.

Creating Minecraft Server

Once logged into PufferPanel, you can start creating your Minecraft server. First, navigate to the ‘Templates’ and click on the small icon at the bottom right corner to import a server template.

Do not click on the ‘Addition’ icon, but the one above it.

From the templates drop-down menu, you can select the type of Minecraft server you want to create. I recommend selecting minecraft-paper, as it is widely supported and allows for easy plugin installation.

PufferPanel can be used for a wide range of games and not just Minecraft.

After that go to the ‘Servers’ and click on the plus icon to start the server creation.

It is best to just create one server if you are on a free tier Oracle Cloud account.

On the first page select ‘Paper – Minecraft’ template and click on ‘Use this template’ to continue.

Click on the green button to continue.

Here name your Minecraft Server whatever you want and continue by clicking on ‘Next.’

Leave Node and Environment on default selections (LocalNode and Standard).

On the next page, you will be asked to add a user, but you are already added. You can just click on ‘Next’ and continue.

Finally, you get to the main server creation page where you must add proper build number and game version for it to work.

You can click on the ‘Paper version build’ to find out what is the latest build and Minecraft game version.

When you click on the ‘Paper version build’ you will navigate to the official paper website.

You can see the build version (71) and the game version (1.20.1).

Go back to PufferPanel and change your build number to the latest version. For me, it was 71. After that, turn on EULA to accept the EULA agreement.

EULA agreement accepted.

Leave the IP alone. Change your memory to 4096 MB, port to 25565 (default), and version as per your paper build. For me, for build 71, it was 1.20.1 as seen on the official paper website.

You can also edit your Message of the Day.

Once done, click on ‘create’ and it will allocate a server. After that, click on the ‘install’ button at the top-right corner to install your Minecraft server.

Server successfully installed (but not running).

The Minecraft server is now installed, but it is still not running. Click the ‘start’ button at the top-right corner to start the server.

The button will change to ‘restart’ once started.

Joining the Server

You and your friends can join the server by using the Oracle Cloud public IP and 25565 port. Simply go to Minecraft and open up the Multiplayer section.

Multiplayer section.

Click on ‘Add Server’ and name it whatever you want. But for the IP put yourpublicIP:25565. You need to give the same info to your friends for them to join your server.

Click ‘Done’ to add the server and it will start pinging.
The pinging doesn’t stay for too long. You can join the server even when it is pinging.

Once done, you will see your Minecraft Server with the message of the day.

Minecraft server is ready for players to join.
You can tell this is the latest version 1.20.1 from the new Cherry Blossoms.
,
Hassan Sajid
Hassan Sajid // Articles: 728
With lifelong gaming experience across platforms and genres, Hassan creates meticulously researched guides to help both veteran and new gamers by offering in-depth insights and strategies for all aspects of gameplay. // Full Bio