c6b9eee5980821762cb0ece3bc9c3fbcc801afea
All checks were successful
Build and Push Image / build (push) Successful in 48s
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
Languages
Dockerfile
74.5%
Shell
25.5%