Terraria
评价数不足
Terraria Dedicated Server / Docker Container
由 Zünda 制作
A quick guide to a Docker powered dedicated server for Terraria
   
奖励
收藏
已收藏
取消收藏
Preparations
Docker Engine
  • Make shure Docker is installed

Port Forwardings
You need some port forwardings on your fire wall. The default ports are:
  • 27300/TCP

Persist Data
Create a directory for Steam, for the binaries and for the save game:
mkdir -p $HOME/terraria/world

Mod Control
Download Config File [gist.github.com] or creat your own. Edit the mod config file, then copy it on the docker host to:
$HOME/terraria/terrariaserverconfig.txt
Run Container
docker run --name terraria -it --rm -e PORTGAME=27300 -p 27300:27300/tcp -v $HOME/terraria/terrariaserverconfig.txt:/terraria/terrariaserverconfig.txt -v $HOME/terraria/world:/.local/share/Terraria/Worlds dockrbyter/terraria
Docker Compose
Docker Compose
cd /path/to/file docker-compose up
Settings
Environment Variables (and their defaults)
  • PORTGAME=27300

Locations
  • Config Files: ~/terraria
  • Save Games: ~/terraria/world
  • Config File: ~/terraria/terrariaserverconfig.txt
Links
5 条留言
Zünda  [作者] 2022 年 7 月 4 日 上午 5:11 
No problem, you're welcome! :D You may want to check out my other Steam guides, I'll put them in the Links section. On Steam I only write guides for Docker images written by my selve. On my GitHub repo I have also guides for third party images, like Valheim.
CB 2022 年 7 月 4 日 上午 4:49 
Thanks for clarifying! i currently only really host a singular terraria server, but i am probably gonna be hosting more on different game so this will definitely be useful, Thanks again!
Zünda  [作者] 2022 年 7 月 4 日 上午 3:33 
Hey CB! With Docker you could do things quicker. Imagine you would host on a single machine Terraria, ööhmm.. CS:GO, ARK and another instance of Terraria. To install and configure that on your own may takes hours, with Docker a few Minutes. So ok, theres may no advantage if you want to run just a Terraria server. But if you want to run multiple instances and games on a single host - Docker is your friend. Last but not least, it's much more perfomant to run your game servers in containers, than in single VM's. Further questions? :D
CB 2022 年 7 月 4 日 上午 1:33 
hello! i'm wondering what are the advantages of using docker instead of running the normal terraria server?
Pengi 2022 年 6 月 28 日 上午 8:30 
r