Skip to content

Ableytner/GTNH-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

82 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GTNH server docker images

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!)

Usage example

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:
      MEMORY: 12G
      MOTD: "GT New Horizons MODPACK_VERSION-dailyDAILY_BUILD"
      EULA: "TRUE"
      WEBMAP: "TRUE"
    restart: no

where ./server contains the minecraft server files (automatically downloaded) and ./additional_mods contains any additional mods (as .jar files).

As this image is based on itzg/docker-minecraft-server, it supports all environment variables allowed there. All possible variables are listed here.

'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.

Upgrading from nightlys (old) to dailys

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)

Credits

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.

TO-DO

  • Remove existing mod if modid matches with mod from additional_mods to allow for manually adding newer versions
  • Create tests for backup/rollback functionality

About

Docker image which contains the dedicated server for the GT New Horizons Minecraft modpack.

Resources

License

Stars

Watchers

Forks

Packages