Docker images to run a Terraria Server. Images with TShock Server or Vanilla Server are available.
1M+
Docker images to run a Terraria Server. Images with TShock Server or Vanilla Server are available.
docker run --rm -dit \
--name=terraria \
-v <path to data>:/config \
-e world=<world_file_name>.wld \
-p 7777:7777 \
ghcr.io/beardedio/terraria:latest
Docker Images are available on ghcr.io and Docker Hub
Dockerfile linksWhere to get help:
The TShock Discussions or the Terraria Forum
Where to file issues:
https://github.com/beardedio/terraria/issues
Maintained by:
Henry Skrtich of Bearded.io
Supported Docker versions:
We support the latest release
A Terraria server provides a platform for players to connect over the internet or other network for multiplayer games of Terraria.
To run without user intervention Terraria Server needs to be configured to use an already generated world. This means you can use one that you have already generated or you can generate one via docker by running this command:
sudo docker run --rm -it -p 7777:7777 \
-v $HOME/terraria/config:/config \
--name=terraria \
ghcr.io/beardedio/terraria:latest
You can then follow the prompts to create a new world.
The world file needs to exist in the config folder. To start a server using an already generated world, use this command:
sudo docker run --rm -dit \
--name=terraria \
-v $HOME/terraria/config:/config \
-e world=<world_file_name>.wld \
-p 7777:7777 \
ghcr.io/beardedio/terraria:latest
If you get an error from docker saying the container name already exists, it means you need to remove your old docker container process.
sudo docker rm terraria
If you want to reattach to any running containers:
sudo docker attach terraria
Now you can execute any commands to the terraria server. Ctrl-p Ctrl-q will detach you from the process.
Here is an example docker-compose file that runs the vanilla server
services:
terraria:
image: ghcr.io/beardedio/terraria:latest
ports:
- '7777:7777'
restart: unless-stopped
environment:
- world=<world_file_name>.wld
volumes:
- $HOME/terraria/config:/config
tty: true
stdin_open: true
TShock is a server modification for Terraria, written in C#, and based upon the Terraria Server API. It uses JSON for configuration management, and offers several features not present in the Terraria Server normally.
Vanilla Terraria server is the server software provided by the developers of Terraria. This version has only basic features but new releases are added to this repo by hand, so there may be a short delay after a game update.
If a docker image isn't available of the latest versions please contact us about the new release so we can update this repo.
-v <path to plugins folder>:/tshock/ServerPlugins. If you want to maintain any of the plugins that ship with tshock, you will need to copy them into the ServerPlugins folder. Mounting the plugins folder will override the plugins that ship with tshock.The MIT License (MIT) Copyright (c) 2026 Henry Skrtich
docker pull beardedio/terraria:latest