Setting Up a Minecraft Server on Google Cloud

Are you an avid Minecraft player looking to create your server on the reliable and scalable platform of Google Cloud? Setting up your own Minecraft server can be an exciting endeavor, allowing you to customize your gameplay, play with friends, and enjoy uninterrupted gaming sessions. In this step-by-step guide, we will walk you through the process of creating a Minecraft server on Google Cloud, from start to finish.

In this guide, we’ll walk you through the process of setting up a Minecraft server on Google Cloud. With Google Cloud’s robust infrastructure, you can ensure a seamless and lag-free gaming experience for you and your friends.

1. Prerequisites

Before you begin, make sure you have:

  • A Google Cloud account.
  • Basic familiarity with Minecraft and server management.

2. Creating a Google Cloud Account

If you don’t have a Google Cloud account, visit the Google Cloud Console and create an account. You might need to provide billing information, but Google often offers free credit to get you started.

3. Setting Up a Virtual Machine Instance

  1. Log in to your Google Cloud Console.
  2. Navigate to the “Compute Engine” section.
  3. Click “Create Instance” to set up a virtual machine.
  4. Choose the machine configuration and specifications that suit your needs. (use Ubuntu server for easy management)
See also  Top 10 Minecraft Mods You Should Try

4. Installing Java

Java is essential for running the Minecraft server. Connect to your virtual machine through SSH by clicking the highlighted button

google cloud minecraft server setup

Once connected, install Java using the package manager using the command on SSH Window:

sudo apt update
sudo apt install openjdk-17-jre-headless

5. Downloading and Configuring Minecraft Server Files

  1. Create a directory for your server files:
mkdir minecraft-server
cd minecraft-server

Download the Minecraft server files from the official websites

Vanilla

wget https://piston-data.mojang.com/v1/objects/84194a2f286ef7c14ed7ce0090dba59902951553/server.jar

Paper

wget https://api.papermc.io/v2/projects/paper/versions/1.20.1/builds/164/downloads/paper-1.20.1-164.jar

For Paper and other users rename your jar file (here we are renaming paper-1.20.1-164.jar to server.jar)

mv paper-1.20.1-164.jar server.jar

Create start.sh file for the server starting

nano start.sh

Now a blank window will open like this

ssh google cloud

Now paste the code to this window

sudo java -Xms1G -Xmx2G -jar server.jar nogui

Here you can see the -Xms1G and -Xmx2G , -Xms1G signifies that the server minimum RAM usage is 1GB its denoted by the ending 1G and -Xmx2G signifies that the maximum RAM usage which is 2GB denoted by the ending of 2G

Use that code according to your server requirements

Now Save the file using Ctrl + X then Press Y to save the file, and the window will confirm the file name, press enter to confirm

Now give permission to the start.sh file by using this command

sudo chmod 777 start.sh

Now initiate the primary server starting by using the command

./start.sh

It will start the server and close with an error, Now its time to edit eula.txt, for that enter the below command

nano eula.txt

It will open a window and edit the code into this (change false into true)

#By changing the setting below to TRUE you are indicating your agreement to our EULA (https://aka.ms/Minecraft>
#Thu Aug 24 04:23:51 UTC 2023
eula=true

Now we need to install the screen on our server

apt install screen

Press Y if asked for any confirmation

See also  Setting Up a Minecraft Server on Windows and Linux

Now open a new screen by typing

screen

On the console press Space Bar for further move

The Screen is the service that allows the service to run background

Now you can see a fresh console in that console you can start the server and close the ssh window

6. Adjusting Server Settings

Modify the server properties file using a text editor of your choice:

nano server.properties

Customize settings such as game mode, difficulty, and server name.

7. Opening Firewall Ports

Open the necessary ports in the firewall to allow players to connect to your server

For that, you need to open the Firewall Rules in Google Console

setup firewall for minecraft in GCP

Now add rules on the window

Minecraft Firewall Rules in GCP

Click highlighted button and open the below window

Minecraft firewall on GCP

Add Name in the Name* column

Scroll down and you will see this settings

Target Section in Google Cloud Platform Firewall

Setup the server target here , I used All instances in the network

Now Scroll down and add Ports here

Port Section in Google Cloud Platform

Tick mark TCP and UDP and add your server Port , The Default port is 25565

If you are making a crossplay server make sure you add 19132 too

Now Click Create button

Now all server setup is finished , now open the SSH tab again and enter screen then enter the command to start server

./start.sh

8. Connecting to Your Server

In Minecraft, add your server’s IP address to the server list and connect to it.

IP is available in the VM Instances tab under the column of External IP

9. Enabling Mods and Plugins

To enhance your gameplay, you can install mods and plugins. Ensure compatibility and follow installation instructions.

See also  Buy Cheap Games Keys Online: Your Ultimate Guide to Affordable Gaming

10. Backing Up Your Server

Regularly back up your server data to prevent loss in case of technical issues.

11. Managing and Scaling Your Server

Learn how to manage player permissions, handle server moderation, and consider scaling up as your player base grows.

12. Optimizing Performance

Implement performance optimization techniques to ensure smooth gameplay and reduce lag.

13. Conclusion

Congratulations! You’ve successfully set up your Minecraft server on Google Cloud. Enjoy playing with friends and exploring endless possibilities.

FAQs

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top