This repository contains docker images for running a dedicated server for the GT New Horizons Minecraft modpack.
Stable GTNH versions are released under the stable tag, and built manually whenever a new version releases.
Daily GTNH versions are built automatically every day and available under the daily tag.
There is also backup / rollback functionality builtin, but you shouldn't rely on it. (Don't forget to make regular backups!)
This image can be used in a docker-compose.yml file as follows:
services:
mc:
container_name: minecraft-gtnh
image: ghcr.io/ableytner/gtnh-server:daily
tty: true
stdin_open: true
ports:
- 25565:25565
- 8123:8123
volumes:
- ./server:/data
- ./additional_mods:/mods
environment:
MOTD: "GT New Horizons MODPACK_VERSION-dailyDAILY_BUILD"
EULA: "TRUE"
WEBMAP: "TRUE"
restart: nowhere ./server contains the minecraft server files (automatically downloaded) and ./additional_mods contains any additional mods (as .jar files).
Some environment variables are set to sane default that should always work with the modpack, but feel free to change them. As this image is based on itzg/docker-minecraft-server, it supports all environment variables allowed there.
'MODPACK_VERSION' and 'DAILY_BUILD' in the MOTD are placeholder variables that get substituted with the current GT New Horizons version and daily build version.
'WEBMAP' enables a web map of the server world, which is accessible through a browser on port 8123. You may need to open ports in your firewall and/or router.
As of 05.08.2025, this repository offers daily builds, which substitute the old nightly format. More information can be found here and here
To upgrade an existing server to the new format:
- stop and remove the container (
docker compose down) - open the folder server/docker-backups and move the newest backup file somewhere save, in case something goes wrong during the upgrade
- open the folder server/docker-backups and remove all files (
rm ./server/docker-backups/*) - change your docker-compose.yml file to daily releases by setting the image to ghcr.io/ableytner/gtnh-server:daily
- pull and start with the new version (
docker compose pull && docker compose up)
Many thanks to Geoff Bourne for creating the docker-minecraft-server image, which this project is based on!
Many thanks to David Lindström for forking and maintaining the GTNH-Web-Map mod, which this image includes.
- Remove existing mod if modid matches with mod from additional_mods to allow for manually adding newer versions
- Create tests for backup/rollback functionality