first commit
All checks were successful
Build and Push Image / build (push) Successful in 48s

This commit is contained in:
2026-02-01 16:09:50 +00:00
commit c6b9eee598
4 changed files with 154 additions and 0 deletions

42
README.md Normal file
View File

@@ -0,0 +1,42 @@
# 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
```