Files
terraria-docker/README.md

43 lines
822 B
Markdown
Raw Normal View History

2026-02-01 16:09:50 +00:00
# Terraria Dedicated Server (Docker)
Lightweight Terraria dedicated server image built from the official server zip.
## Build
```bash
docker build -t terraria-server .
```
To build a specific Terraria version:
```bash
docker build --build-arg T_VERSION=1451 -t terraria-server:1451 .
```
## Run
```bash
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:
```bash
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
```