This project manages a collection of game servers using Docker and Docker Compose. It is designed for easy deployment of both vanilla and modded servers, with persistent data, modular configuration, and public access using Playit.gg tunneling. This ensures your actual server IP will not be exposed.
- Docker Compose
- Playit.gg account for tunneling (Optional but recommended)
- Install Docker Compose
- Download the latest Release and unpack it.
- Create a copy of the
.env.examplefile and rename it to.env - (Optionally) Create a Playit.gg account.
4.1. On their website create a newDocker based Agentand copy theSecret Key
4.2. Open the.envfile with a text editor and paste youSecret Keyto theAGENT_SECRETvariable. It should look like this:AGENT_SECRET="YOURSUPERDUPERUNGUESSABLEANDVERYSECRETKEY" - Open the docker-compose.yml with the editor of your choice and change values as deemed necessary.
- Build and start the docker-services:
6.1. Build with:sudo docker compose build
6.2. Run with:sudo docker compose up -d
6.3. Verify the containers are running with:sudo docker ps. It should list the services as running. - If you're using the
Playit.ggAgent, go back to their website. The Agent should have connected successfully. - Go the the
TunnelsSection and add a new tunnel.
8.1 SelectTunnel Type TCPwithport count 1andLocal Port 255658.2 Once created, update theLoacl Addressfield with the value of theipv4field of your minecraft server, as configured in thedocker-compose.ymlfile.
You should now be able to connect to your minecraft server by using the public address of your Playit.gg tunnel.
This project uses the official Playit.gg agent container to expose the Minecraft server to the public internet without needing to configure port forwarding or firewalls.
- Requires a Playit.gg account
- Set the
SECRET_KEYenvironment variable in.envfile
- Custom
server.propertiescan be placed inconfig/and will be copied at startup. - Volumes ensure persistent world data and configuration.
- All game servers are connected to a dedicated Docker bridge network (
mc-network).
gaming-servers/
├── assets/ # Extra resources (e.g. icons, maps, ...)
├── config/ # Custom config files (e.g. server.properties)
├── docker/ # Contains the files needed for building the images.
├── servers/ # Individual server folders (vanilla, modded, etc.)
│ └── vanilla/ # Vanilla Minecraft server files
├── docker-compose.yml # Main compose file to launch everything
- Server creation with initial white- and blacklist files (same as configs are copied right now)
- Add other games
- Possibly split
docker-compose.ymlinto multiple files and use compose to merge them. This should reduce clutter and allow for more organized compose files.