Skip to the content.

Day 01: Introduction to Google Cloud

Not the page you want to view? Back to home page

In this theory session, we will be going through the introduction to cloud computing and Google Cloud as a whole. We will learn:

Some details about the event can be found in the Event Page. Below are some of the useful links that are relevant to the theory today.


Hands-On: Host your own Minecraft server

This manual is written by Lee Weng Hong and Ariq Ramdhany, edited by by Lim Jun Yi.

In the workshop today, we will host our own Minecraft server on a Google Cloud VM Instance.

Step 01: Downloading the server.zip file

The server.zip file can be downloaded in this link. Download it to a local directory in your computer and remember where the directory.

Note
The video tutorial can be found here.

Step 02: Setup GCP free trial account

You can skip this step if you already have a billing account linked to your GCP account.

- Developing in progress ...

Note
If you encounter errors, try using different account (non organizational account), or different cards.

Step 03: Enable Compute Engine API

Type “VM instance” in the search tab of the Google Cloud Platform Console or navigate by “Compute Engines > VM instances” from the navigation bar. A page should appear for you to enable the Compute Engine API.

Click “Enable”.

Step 04: Setting up firewall rule

Type “firewall” in the search tab of the Google Cloud Platform Console or navigate by “VPC Network > Firewall” from the navigation bar.

In the Firewall page, click “Create Firewall Rule” and make the following configurations:

Then click “Create”.

Step 05: Creating a VM

Type “VM instance” in the search tab of the Google Cloud Platform Console or navigate by “Compute Engines > VM instances” from the navigation bar.

In the VM Instance page, click “Create Instance” and make the following configurations:

Then click “Create”.

Step 06: Uploading server.zip file to VM

After your VM instance starts running, click on the SSH button and a SSH terminal window will pop up.

In the SSH terminal, click on “Upload File” at the top right corner of the window. Then, choose the server.zip file. It will take some time for the file to finish uploading into the VM instance.

After the upload completes, type the following command to list the files available in the current directory:

ls

By default, only the server.zip will be shown in the output.

Step 07: Setting up VM environment

In our VM instance, we will only be installing two things: unzip and jdk (Java Development Kit). We will start with the installation of unzip.

Type the following to install unzip in the VM instance. It will be used to unzip our server.zip file uploaded just now:

sudo apt install unzip

Then, check the version of unzip with the following command:

unzip --version

Note
The --version flag is used in Linux to display the version of the application / program installed.

Now we will proceed with the installation of jdk. Type the following command to install jdk in the VM instance. It will be used to launch our Minecraft server on the VM isntance:

sudo apt install openjdk-17-jdk

We are installing this version of jdk since it is the required version to run a 1.19.3 Minecraft Java server. Again we can check the version of the installed jdk with the --version flag:

java --version

Step 08: Unzipping server.zip

In your SSH terminal, type the following code to unzip the server.zip file:

unzip server.zip

After the file completes unzipping, you can type the following to see the files in the current directory:

ls

Now you should see there is a server beside the server.zip. Navigate into the server folder with the following command:

cd server

cd stands for Change Directory. So, now we already changed our directory to the server folder. Let’s look at the content in the folder:

ls

You should be able to see a server.jar file in the output.

Step 09: Start a Minecraft server

We will start the Minecraft server by typing the following command in the SSH terminal:

java -jar server.jar

Many lines of logs will be shown, after a few minutes, the server will be started. You can try and type the following command in the SSH terminal to see the condition of the server:

tps

This shows the Tick Per Second of the Minecraft server. A TPS of 20.0 will be ideal. Now you can go back to the VM Instance page and copy the external IP address. That IP address will be the IP for your Minecraft server.

In your Minecraft multiplayer tab, you can choose Join a Server or Direct Connection and paste your external IP address in the IP Address box. Then you should be able to join the Minecraft server.

Step 10: Clean up

To stop the Minecraft server, you can just close the SSH terminal window or type the following command in the SSH terminal:

stop

In the VM Instances page, you can click on the dropdown icon beside the “SSH” button and click “Delete VM”.

Complete!

You have successfully hosted your own Minecraft server!

More Readings