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.
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.
Open up PuTTYgen and click on the ‘Load’ button.
Navigate to the original SSH key you downloaded while creating your instance on Oracle Cloud and select it.
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.
Once saved, you will get a PuTTY private key file.
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.
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.
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.
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.
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.
After that type in ‘nano /etc/ssh/sshd_config’ and you will see the following screen.
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.’
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.
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.
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.
If you do not have Java installed, it will give you the following output (or something similar).
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
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’
After installing firewall, you need to enable it by running a command ‘sudo systemctl enable firewalld’
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’
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.
When you’re done, it is best to restart your firewall by typing the following command:
• sudo firewall-cmd –reload
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
To install PufferPanel from the repo, run the following command:
• sudo apt-get install pufferpanel
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.
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.
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.
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.
After that go to the ‘Servers’ and click on the plus icon to start the server creation.
On the first page select ‘Paper – Minecraft’ template and click on ‘Use this template’ to continue.
Here name your Minecraft Server whatever you want and continue by clicking on ‘Next.’
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.
When you click on the ‘Paper version build’ you will navigate to the official paper website.
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.
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.
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.
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.
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.
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.
Once done, you will see your Minecraft Server with the message of the day.