๐ฎ Free Minecraft Server on Google Colab (with Playit.gg & Google Drive)
Host a high-performance Minecraft Server for FREE using Google Colab's cloud infrastructure (up to 12 GB RAM) and connect with friends anywhere in the world without any port forwarding using Playit.gg.
All your worlds, player inventories, and server configurations are synced directly to your Google Drive in real-time, ensuring zero data loss across sessions!
โจ Features
- โก All-in-One Background Startup: Launches Playit.gg tunneling and your Minecraft server concurrently in the background in ~5 seconds.
- ๐พ Google Drive Persistent Storage: Worlds, configs, and plugins save straight to your Drive in real-time.
- โ Latest Java 25 Support: Out-of-the-box support for the newest Minecraft releases (including 26.3+), powered by JDK 25.
- ๐ Dynamic API Version Resolution: Automatically downloads the latest builds for Vanilla, PaperMC, Purpur, or Fabric.
- ๐ Zero Port-Forwarding (Playit.gg): Easily create a public IP/domain so friends can join with zero router configuration.
- ๐ป Complete Console Output: Built-in command terminal with full output capture (no truncation when running large commands like
help).
- ๐ Cracked / Offline Support: One-click toggle for offline launchers (TLauncher, PojavLauncher, etc.) with accurate offline UUID whitelist management.
- ๐ Persistent IP: Reuses your saved Playit configuration from Google Drive, so your server IP remains identical across Colab restarts!
๐ Table of Contents
- Prerequisites
- Quick Start Guide
- Step-by-Step Instructions
- How to Connect to Your Server
- In-Game Admin & Commands
- Stopping & Restarting
- Troubleshooting & Common Errors
- Advanced Tips
๐ฆ Prerequisites
Before starting, make sure you have:
- A Google Account (to access Google Colab and Google Drive).
- A free Playit.gg account.
- A Minecraft Java Edition client on your computer.
๐ Quick Start Guide
- Click the Open In Colab badge at the top to launch the notebook directly in Google Colab (no manual file download/upload required!).
- Alternatively, download
Minecraft_Colab_Server.ipynb and upload it manually via File โ Upload notebook in Colab.
- Run the cells in sequential order (Step 1 through Step 4).
- Click the Playit Claim Link to link your account, copy the provided IP address, and join the game!
๐ Step-by-Step Instructions
Step 1: Mount Google Drive & Select Server Source
SERVER_SOURCE:
Download New Server: Downloads a clean server into your Drive folder.
Use Existing Server from Drive: Loads an existing server folder already in your Drive (preserves all existing worlds and plugins).
DRIVE_FOLDER_NAME: The name of the folder in your MyDrive (Default: Minecraft_Server).
- Click the Play (โถ๏ธ) button and authorize Google Drive access when prompted.
Step 2: Install Java 25 & Playit.gg
- Modern Minecraft releases (version 26.3+) require Java 25 (Class file 69.0).
- This step installs system dependencies, downloads Oracle JDK 25, and prepares the Playit.gg standalone tunnel agent.
- Takes approximately 10โ15 seconds.
Step 3: Server Download & Configuration
Customize your server preferences:
SERVER_TYPE: Choose between Vanilla, Paper (recommended for performance), Purpur, or Fabric.
VERSION: Keep latest to automatically fetch the latest release, or pick a specific version (e.g., 26.3, 1.21.4, etc.).
CRACKED_ACCOUNTS: Check this box if you or your friends use offline launchers (TLauncher, etc.).
FORCE_RE_DOWNLOAD: Check only if you wish to overwrite an existing server.jar.
- Run the cell. EULA will be automatically accepted (
eula=true) and server.properties will be configured.
Step 4: Launch Playit & Minecraft Server (All-in-One Start)
๐ How to Connect to Your Server
[!IMPORTANT]
Always check the Port number on Playit!
Playit free tunnels typically format their connection address as something.tun.ply.gg:12345 or something.gl.joinmc.link.
You must copy the complete address including the : and the 5-digit port number!
- Open your Minecraft Launcher and launch the version matching your server (e.g.,
26.3).
- Click Multiplayer โ Direct Connection (or Add Server).
- Paste your full Playit domain/IP (e.g.,
traded-ink.tun.ply.gg:28452 or my-server.gl.joinmc.link).
- Click Join Server!
๐ป In-Game Admin & Commands
Because the server runs in a detached background session, you can run commands anytime without freezing Colab:
1. Using Step 5 (Server Console in Colab):
Open Step 5: Server Console & Command Terminal:
2. In-Game Chat Commands:
Once you have made yourself an operator via op YourMinecraftName, you can run any command directly inside the Minecraft chat window:
/gamemode creative
/weather clear
/time set day
/tp <player>
โน๏ธ Stopping & Restarting
How to Stop:
Run Step 7: Graceful Server Shutdown & Save. This automatically sends stop to the Minecraft server, safely saves chunks and player data to Google Drive, and halts the Playit process.
How to Restart Next Time:
- Open the notebook in Colab.
- In Step 1, select
Use Existing Server from Drive (or keep Download New Server with the same folder name; it will automatically detect existing files).
- Run Step 1, Step 2, and Step 4.
- Because
playit.toml was saved to your Google Drive, Playit will automatically reconnect to the exact same domain/IP without needing to re-claim!
๐ ๏ธ Troubleshooting & Common Errors
โ Error: Connection reset by peer (-104)This error happens for two common reasons:
- Missing Port Number: Look at your Playit dashboard (
https://playit.gg/account/tunnels). If your tunnel is named xxx.tun.ply.gg, click on it to see the assigned port. You must enter xxx.tun.ply.gg:PORT into Minecraft.
- Server Still Loading: Minecraft takes 15โ25 seconds to generate spawn chunks. Run Step 6: View Live Server Logs to confirm the server has finished loading (
Done (...)!).
- Wrong Agent: Ensure your active tunnel in Playit is assigned to your
Colab Server agent (indicated by a green status dot).
โ Error: UnsupportedClassVersionError (class file version 69.0)Minecraft 26.3+ requires Java 25.
- Make sure you ran Step 2 of the notebook, which automatically downloads and installs JDK 25 into
/opt/jdk-25.
- Check the version in Step 2 output to ensure it says
openjdk version "25.x".
โ Cell hangs on "Starting Playit.gg Tunnel..."Older scripts used blocking readline pipes. The latest version of this notebook uses nohup non-blocking execution.
- Ensure you are using the latest
Minecraft_Colab_Server.ipynb from this repository.
- Step 4 should complete in ~5โ7 seconds with a green checkmark.
โ Google Colab Session DisconnectsGoogle Colab free tier instances disconnect after periods of browser tab inactivity:
- Keep the Colab browser tab open while playing.
- Prevent your computer from going to sleep.
- All world data is synced to Google Drive in real-time, so even if Colab disconnects, you can restart without losing your progress.
๐ก Advanced Tips
Sharing with Friends (Collaborative Servers)
If multiple friends want to run the server at different times:
- The world owner can share the
Minecraft_Server Google Drive folder with friends with Editor permissions.
- Friends can open the link in Google Drive, right-click the folder, and choose Organize โ Add shortcut.
- When they mount Google Drive in Colab, the shortcut acts like a native folderโany changes made while they host will save directly to the original owner's Drive!
๐ License
This project is licensed under the MIT License - feel free to modify, distribute, and build upon it!