Kenneth c6b9eee598
All checks were successful
Build and Push Image / build (push) Successful in 48s
first commit
2026-02-01 16:09:50 +00:00
2026-02-01 16:09:50 +00:00
2026-02-01 16:09:50 +00:00
2026-02-01 16:09:50 +00:00
2026-02-01 16:09:50 +00:00

Terraria Dedicated Server (Docker)

Lightweight Terraria dedicated server image built from the official server zip.

Build

docker build -t terraria-server .

To build a specific Terraria version:

docker build --build-arg T_VERSION=1451 -t terraria-server:1451 .

Run

docker run --rm -it \
  -p 7777:7777/tcp -p 7777:7777/udp \
  -v "$PWD/config:/config" \
  -v "$PWD/worlds:/worlds" \
  terraria-server

Configuration

  • Config file default: /config/serverconfig.txt
  • World path default: /worlds

You can override these with environment variables:

docker run --rm -it \
  -e CONFIG_FILE=/config/serverconfig.txt \
  -e WORLD_PATH=/worlds \
  -p 7777:7777/tcp -p 7777:7777/udp \
  -v "$PWD/config:/config" \
  -v "$PWD/worlds:/worlds" \
  terraria-server
Description
docker image for terraria server
Readme 26 KiB
Languages
Dockerfile 74.5%
Shell 25.5%