Skip to content

Latest commit

 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

Minecraft Server on GitHub Codespaces using Playit.gg

image
82 ping on GitHub Codespaces Asia Region, playit.gg Anycast Global Region

This project lets you host a Minecraft Java Edition server inside a GitHub Codespace, with public access enabled through Playit.gg.

⚠️ Note: GitHub Codespaces aren't designed for long-term server hosting. You may only get up to ~30 hours/month on the highest-performance machines for free.


πŸ’‘ Features

  • πŸš€ Launches a Minecraft server in a Codespace with 16 GB RAM (depending on region & machine type).
  • 🌍 Easily share your server via Playit.gg tunneling (free and firewall-friendly).
  • πŸ”„ Automatically fetches the latest release of Minecraft server.
  • βš™οΈ Generates all required configs and startup scripts.
  • 🐧 Built for Ubuntu-based Codespace environments.

πŸ› οΈ Requirements

  • A GitHub account with Codespaces access.
  • A Playit.gg account (for persistent tunnels and easier management).
  • (Optional) A GitHub Pro or Teams plan for more Codespace hours.

πŸš€ Getting Started

1. Create Codespace

Click the green "Code" button on this repo β†’ "Create codespace on main"

πŸ’‘ You can select the region and machine type (e.g., 4 cores, 16GB RAM) when creating the codespace.


2. Run Setup Script

Once inside the Codespace terminal, run:

chmod +x setup.sh
./setup.sh

This will:

  • Install Java & dependencies
  • Download the latest Minecraft server
  • Set up the world and server config
  • Install Playit.gg tunnel agent
  • Create start scripts for server and tunnel

🧩 Files Created

  • ~/minecraft-server/server.jar: Latest Minecraft server.
  • ~/minecraft-server/server.properties: Default config.
  • ~/minecraft-server/start.sh: Starts Minecraft server (2G RAM by default).
  • ~/minecraft-server/start_tunnel.sh: Starts Playit tunnel agent.
  • ~/minecraft-server/eula.txt: EULA acceptance.

▢️ Running the Server

  1. Start Minecraft Server
cd ~/minecraft-server
./start.sh

▢️ Start Tunnel with Playit.gg

cd ~/minecraft-server
./start_tunnel.sh

You'll get a link like:
your-server.playit.gg:12345
Share this with your friends to connect!

βš™οΈ Customization

  • Modify start.sh to change RAM usage (e.g., -Xmx4G).
  • Edit server.properties to configure gameplay settings.
  • Use /op <username> in Minecraft console to grant yourself admin.

⏳ Limits

GitHub Codespaces are not designed for 24/7 servers. Free-tier usage is limited:

Machine Type Monthly Hours Notes
2 cores, 8 GB RAM 60 hrs Standard performance
4 cores, 16 GB RAM 30 hrs Higher Performance

πŸ“¦ Future Improvements

  • Auto-backup world saves to repo
  • Add whitelist support
  • Optional plugin/mod installation
  • Auto-start on Codespace boot

πŸ™ Acknowledgements

  • Minecraft
  • Playit.gg - Free tunnel service for games
  • GitHub Codespaces - Dev environments in the cloud

πŸ“œ License

This project is released under the MIT License.

About

github codespaces + playit.gg + bash (minecraft java server in the cloud)

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages