Skip to main content
[ PIER ]

Terraria Server

A dedicated Terraria server in one click.

Service #game#server#terraria

A Pier-managed Terraria dedicated server based on the official ryshe/terraria image. Auto-generates or restores a world, supports vanilla and tModLoader (modded) flavors, configurable difficulty / size / game mode, and persists across restarts.

Deploy with Pier

  1. 1 Open the Pier dashboard and click Add service.
  2. 2 Pick Terraria Server from the template list.
  3. 3 Choose the version, set a service name, and Pier provisions the container, storage, and ports automatically.
  4. 4 Attach a domain if you want HTTPS. Traefik auto-provisions the Let's Encrypt certificate.

What is a Pier-managed Terraria server?

This template wraps the community Terraria server Docker image and exposes the common configuration as Pier env vars. You choose world size, difficulty, seed, max players, password — Pier provisions the server, generates the world on first boot, persists data across restarts, and restarts on crash.

Both vanilla Terraria and tModLoader flavors are available (the latter enables the rich Terraria mod ecosystem — Calamity, Thorium, Fargo’s, etc.).

How Pier deploys it

Default port: 7777/tcp (the Terraria standard). The data volume mounts at /world (or the image’s equivalent) — .wld world files, server config, optional mods all persist there.

On first boot the server auto-generates a world according to the SIZE, DIFFICULTY, MODE, SEED env vars. Subsequent boots load the existing world. Switch worlds by changing the WORLD_FILENAME env var — old worlds stay on disk until you delete them.

Connect from the Terraria client via Multiplayer → Join via IP — point at your VPS’s public IP and port 7777, enter the password if you set one.

When NOT to use this template

For massive servers with custom event scripting, ops tools, plugin systems — use TShock (a server mod) on top of this image. For tiny private games between friends, hosting in-client from one player’s PC works without needing a dedicated server. Self-hosting on Pier is the right answer for “I want a server that’s always up so we can drop in any time.”

Key features

Auto-generates a world

Pick a world size (small/medium/large), difficulty (normal/expert/master/journey) and seed — the server generates the world on first boot.

Vanilla and tModLoader

Choose the vanilla server for unmodded play, or the tModLoader variant to enable mods. Mod folder mounts as a volume.

World persistence + multi-world

Worlds persist across restarts. Switch worlds by changing the WORLD_FILENAME env var; old worlds stay on disk in the mounted volume.

Configurable game settings

SIZE, DIFFICULTY, MODE, SEED, MAXPLAYERS, PASSWORD, MOTD all exposed as env vars. Edit live in Pier env settings.

Tiny footprint

~200 MB RAM idle, low CPU. Runs comfortably alongside other services on a small VPS.

Use cases

Friend group server

Password-protected server for a small group. Cheaper than Terraria's no-official-hosted-server alternative — you self-host or pay a hosting service.

Modded tModLoader server

Calamity, Thorium, Fargo's, big content mods — tModLoader-flavored server handles them.

Long-running world archive

Build a megabase over months on a server that's always up. Backups via volume snapshot.

PvP / event servers

Game mode set to expert/master, custom MOTD, time-limited public events.

Code examples

Basic vanilla server (Pier env) text
WORLD_FILENAME = mybase.wld
AUTOCREATE = 2          # 1=small, 2=medium, 3=large
DIFFICULTY = expert
MAXPLAYERS = 8
PASSWORD = friends2026
MOTD = Welcome to the Pier server
tModLoader (mods enabled) text
# Use the tModLoader image variant in version selector
# Drop mods into the mounted /home/terraria/.local/share/Terraria/tModLoader/Mods
WORLD_FILENAME = calamity-world.wld
AUTOCREATE = 3
DIFFICULTY = master
Custom seed text
WORLD_FILENAME = themidnight.wld
AUTOCREATE = 2
SEED = 12345-67890
MODE = 0
Server console via docker exec bash
docker exec -it pier-terraria attach   # attach to server console (Ctrl-P Ctrl-Q to detach)

How it compares

vs Re-Logic hosted Terraria server Re-Logic doesn't offer hosted servers; the only options are self-host or third-party hosts. Self-host on Pier is cheaper than dedicated Terraria hosts.
vs Minecraft (this catalog) Different games. Minecraft Java Edition has a richer modding ecosystem (Forge/Fabric) and the much bigger player base.
vs TShock (modded server) TShock is a server mod for vanilla Terraria adding admin tools, permissions, plugins. Worth running if you need ops-grade server management — drop the TShock binary into the volume.

Frequently asked questions

How do players connect?
They use the Multiplayer → Join via IP option in Terraria, point at your VPS public IP and port 7777, enter the password if set.
Can I use a domain instead of an IP?
Terraria's Join via IP accepts hostnames (some clients require literal IPs). Pier exposes the port; configure the domain externally.
How big can the world be?
Large worlds — 8400×2400 tiles — are the biggest vanilla supports. Memory use is modest (~500 MB-2 GB during play).
Mods?
Use the tModLoader image variant (selected via Pier version dropdown). Mods are placed in the mounted Mods folder; load order configured in /home/terraria config.
Backup strategy?
Stop the container (so the world flushes to disk), snapshot the data volume, restart. Or `docker exec` a `save` command into the running server console.
World corruption / recovery?
Terraria writes a `.wld.bak` automatic backup. If the main world corrupts, rename the .bak to .wld and restart.
How is the port exposed?
7777/tcp — Pier exposes it; ensure your VPS firewall allows it. Different port via the SERVER_PORT env var.

Related services

Deploy on your VPS

A Pier-managed Terraria dedicated server based on the official ryshe/terraria image. Auto-generates or restores a world, supports vanilla and tModLoader (modded) flavors, configurable difficulty / size / game mode, and persists across restarts.

Deploy this service →