Terraria is the 2D action-sandbox of digging, building and boss fights. A dedicated server (vanilla or TShock) keeps your world live for the whole group, with plugins and tModLoader for deeper mods. This step-by-step guide shows you how to set up a Terraria server in minutes — no manual install, no command line.
Pick a plan sized for your Terraria community. We recommend about 1–3 GB of RAM; start smaller and upgrade in one click as you add players or mods. Terraria plans start at $3.99/mo.
Check out and your Terraria server provisions automatically in under 60 seconds, with console access right away — no manual install, no command line.
Once your Terraria server is online, share its address (IP and port) with your friends so they can join. Start, stop and restart it anytime from the control panel.
Your Terraria server supports TShock, Plugins, tModLoader, Config, FTP/SFTP. Install TShock and tModLoader straight from the one-click installer, or upload your own from the control panel — then tweak settings in the visual config editor.
Enable scheduled automatic backups, set restart timers, and monitor CPU, RAM and player counts from the dashboard. Always-on DDoS protection and 24/7 support keep your Terraria server stable.
Ready to start? Deploy your Terraria server in under 60 seconds — 7-day money-back guarantee.
The dedicated server listens on TCP port 7777 by default. The official wiki adds two situational notes. On a cloud provider such as AWS or GCP, port 7777 has to be open on both TCP and UDP. Non-NAT connections, such as a business or data centre host, usually do not need port forwarding, but may need the port allowed through a firewall.
| Port | Protocol | Used by |
|---|---|---|
| 7777 | TCP, plus UDP on cloud providers, per the wiki | Vanilla and tModLoader game traffic; also TShock's ServerPort default |
| 7878 | HTTP | TShock REST API, only while RestApiEnabled is true |
Change the listening port with the port= line in serverconfig.txt, or -port at launch. The server can map the port itself: upnp=1 enables UPnP port forwarding and -noupnp disables it.
With the REST API switched on, request a token at http://IP:7878/v2/token/create?username={username}&password={password}, then call endpoints as http://IP:7878/endpoint?token={token} — /v2/players/read, for instance, takes a token and a player name. Tokens generated this way do not persist across sessions; for tokens that survive a restart, TShock documents Application REST Tokens inside config.json.
Unpack the dedicated-server archive (terraria-server-1456.zip for Terraria 1.4.5.6) and you get one directory per platform.
TerrariaServer.exe plus two helper scripts. start-server.bat starts the server using serverconfig.txt and includes a loop that restarts it after a crash. start-server-steam-friends.bat behaves like Host & Play but runs in the console, so Steam friends can join.TerrariaServer.bin.x86_64, with a 32-bit TerrariaServer.bin.x86 beside it. Make them executable first with chmod +x TerrariaServer.bin.x86*, then run ./TerrariaServer.bin.x86_64.Terraria Server.app bundle. Remove the quarantine attribute with xattr -d com.apple.quarantine Terraria\ Server.app; the binary itself sits at Terraria Server.app/Contents/MacOS/TerrariaServer.For sizing, the wiki gives 500 MB of free RAM for the server itself on a small world, and notes that RAM use depends on world size and player count. Those world sizes are 4200×1200 tiles for small, 6400×1800 for medium and 8400×2400 for large, so the world you generate is the main lever on memory.
serverconfig.txt sits in the server installation directory. Every line of the shipped file begins with a #, which comments the line out so the server ignores it; delete the # to apply that setting. The file is passed in with -config and can have any name; relative paths resolve against the folder containing TerrariaServer.exe.
| Key | What it does |
|---|---|
world | Loads a world and auto-starts the server |
worldpath | Folder the server keeps world files in |
autocreate | Creates a world: 1 small, 2 medium, 3 large |
worldname | Name for an autocreated world |
seed | Seed used by autocreate |
difficulty | 0 Normal, 1 Expert, 2 Master, 3 Journey |
maxplayers | 1 to 255; default 16, or 8 before 1.4.0.1 |
port | Port number |
password | Password required to join |
motd | Message of the day |
secure | 1 enables cheat protection |
banlist | Banlist file location |
language | Language code: en-US, de-DE, fr-FR, zh-Hans and others |
upnp | 1 enables UPnP port forwarding |
npcstream | Enemy skipping reduction; 0 turns it off |
priority | Process priority: 0 Realtime through 5 Idle |
journeypermission_* | One key per Journey Mode power: 0 locked, 1 host only, 2 everyone |
Several of these settings can also be supplied as launch parameters.
Launch parameters documented on the wiki:
-config <file>, -world <path>, -worldname <name>, -autocreate 1|2|3, -seed <seed>, -banlist <path>-port <number>, -maxplayers <number> (also -players), -password <password> (also -pass), -motd <text>, -ip <address>, -noupnp-secure enables cheat protection, and -forcepriority overrides the settings file's process priority-steam enables Steam support; with it, -lobby friends or -lobby private narrows who may join-disableannouncementbox disables announcement box pulses, and -announcementboxrange <pixels> sets their range, where -1 covers the whole serverThe running console has its own command set: help, playing, clear, version, time, port, maxplayers and say <message>. Two pairs print or change a value: motd and motd <message> for the message of the day, password and password <pass> for the password. Moderation runs through kick <player> and ban <player>. The time jumps are dawn (4:30 AM), noon, dusk (7:30 PM) and midnight, with settle to settle all water. The counters are death, pvpdeath, alldeath and allpvpdeath. Finally, save saves the world, exit shuts down with a save and exit-nosave shuts down without one.
tModLoader is a separate Steam application (app ID 1281930) and relies on the .NET 8 runtime. It ships with its own scripts: start-tModLoaderServer.bat on Windows, start-tModLoaderServer.sh on Linux and macOS, and manage-tModLoaderServer.sh for installing and updating.
./manage-tModLoaderServer.sh install-tml --username your_steam_username
./manage-tModLoaderServer.sh install-tml --github
./manage-tModLoaderServer.sh install-mods
./manage-tModLoaderServer.sh start
The mod list comes from two files exported by the tModLoader client: open Workshop, then Mod Packs, click Save Enabled as New Mod Pack, then Open Mod Pack Folder.
install.txt lists the Workshop mods to fetch; without it, nothing is installed.enabled.json lists the mods to switch on; without it, nothing is enabled.In serverconfig.txt, modpack= takes the path to an enabled.json inside a mod pack folder, and modpath= points at the Mods folder:
modpack=/home/<user>/.local/share/Terraria/ModLoader/Mods/ModPacks/<modpack name>/mods/enabled.json
modpath=/home/<user>/.local/share/Terraria/ModLoader/Mods
On the client, Mods is a subfolder of the tModLoader saves folder — on Windows, %UserProfile%\Documents\My Games\Terraria\ followed by the save folder name matching your tModLoader version, such as ModLoader or tModLoader.
Builds come from the project's GitHub releases, and a container image is published as ghcr.io/pryaxis/tshock:stable. Match the release to the Terraria version you intend to run. Install .NET Runtime 9.x first — the project states it runs on any system .NET 9 supports — then start TShock.Server.exe on Windows or ./TShock.Server elsewhere.
The first run creates a tshock folder holding config.json, the server-side characters file sscconfig.json and the tshock.sqlite database. Defaults in config.json worth knowing:
| Setting | Default | Effect |
|---|---|---|
ServerPort | 7777 | The port the server listens on |
MaxSlots | 8 | Maximum clients connected at once |
ReservedSlots | 20 | Slots beyond MaxSlots that reserved players can join |
ServerPassword | empty | Password required to join |
EnableWhitelist | false | Whitelist based on the IP addresses in whitelist.txt |
AutoSave | true | Terraria's built-in world auto-save |
BackupInterval | 0 | Minutes between backups, which are stored in tshock/backups |
RestApiEnabled / RestApiPort | false / 7878 | The REST API and the port it uses |
Plugins are compiled assemblies. ServerPlugins already holds TShockAPI.dll; drop a plugin .dll into the same folder and it loads at startup.
Upgrading means replacing every file in the server installation with the files from the release zip, overwriting everything — hence the project's instruction to back up the existing server and all its files and folders first, tshock.sqlite and the tshock folder included.
“You are not using the same version as this server.” The client and server builds differ. tModLoader's troubleshooting page notes that this also appears when the target is an unmodded server or an outdated tModLoader server, so check that the versions match exactly on both sides.
Nobody outside the local network can connect. Work through it in order. An address beginning with 192.168 is local and only works for players on the same router, so remote players need the internet-facing address. The firewall must not block the server executable or port 7777. The router needs 7777 forwarded, with UPnP as the automatic alternative. Check reachability by entering 7777 at an external port checker such as canyouseeme.org, and rule out a dynamic public address that has since changed.
World progress is lost, or chest items disappear after the server closes. The world saves automatically only at dawn, once every 24 minutes. Enter save and then exit instead of closing the console window; the case the guide singles out for lost items is moving items between chests and closing straight afterwards.
A tModLoader server starts with no mods. Look for a missing install.txt or enabled.json, or a Mods path the server was never given. If mods load but become disabled when a player joins, server.log holds the exception naming the mod — often code touching client-only fields that are null on a server, or initialising UI that does not exist server-side.