A vanilla Terraria server is one of the lightest things you can run: a large world with eight players sits comfortably inside a gigabyte, uses one TCP port, and has no server browser to register with. tModLoader is a different animal, because every mod is loaded into the same process and some of them are not shy about it. A Calamity-sized list wants 4 GB, and it wants most of that during world generation rather than during play - which is why the first world people make on an undersized plan is the one that fails. This guide covers both: installing each, every serverconfig.txt setting worth changing, the console commands, how mods are matched between server and client, and how not to lose a world that lives in a single file.
Vanilla, tModLoader or TShock: which server you are running#
Three different programs answer to "Terraria server", and they are not interchangeable.
- The vanilla dedicated server ships with the game. It is
TerrariaServer.exeon Windows andTerrariaServer.bin.x86_64on Linux, and there is no separate free Steam app for it - you copy it out of your own game install, or download the Dedicated Server package from the official terraria.org release page. It runs unmodified worlds and unmodified clients. - tModLoader is a free, separate application (Steam app id
1281930, also published on GitHub releases) that wraps the game and loads.tmodfiles. Its server isstart-tModLoaderServer.shor the matching.bat. Clients must run tModLoader too, at the same version. - TShock replaces the vanilla server with one that adds groups and permissions, region protection, server-side characters, a database and a large command set. Players still run unmodified Terraria, which is its main appeal. It does not load tModLoader mods, so you pick one or the other.
tModLoader tracks a specific Terraria version and a mod built for one tModLoader release will not load on another. That version lock is the root of most tModLoader problems, and it is why a server should pin its version rather than take every update the day it lands.
Requirements and resource usage#
Size for world generation, not for the steady state.
| Setup | RAM | CPU | Disk |
|---|---|---|---|
| Vanilla, small or medium world, 2-4 players | 512 MB - 1 GB | 0.5 core | 5 GB |
| Vanilla, large world, 8-16 players | 1-2 GB | 1 core | 10 GB |
| tModLoader, a handful of quality-of-life mods | 2-3 GB | 1 core | 15 GB |
| tModLoader, Calamity plus the usual companions | 4 GB | 1-1.5 cores | 20 GB |
| tModLoader, large content pack with generated structures | 6 GB peak | 1.5-2 cores | 30 GB |
- The peak is world generation. A big modded world is built in memory before it is written, and that moment is the high-water mark for the whole life of the server. A plan that runs the finished world perfectly can still fail to create it.
- CPU: the world update is one thread. Clock speed matters, core count barely does. Vanilla will not trouble half a core; a heavy mod list with hundreds of custom NPCs will use a full one.
- Disk: the vanilla server itself is tiny. A large world file is tens of megabytes; tModLoader adds a second file of mod data beside it that can be larger than the world. Neither is a reason to buy disk, but a rotating backup set of both is.
- Network: modest, and mostly spent on world sections. Terraria streams the tiles around each player the first time they visit an area, so eight players spread across a large world cost far more than eight players in one base.
Installing and starting a vanilla server#
On Linux, from the extracted Dedicated Server package:
$ cd /home/terraria/server/Linux$ chmod +x TerrariaServer.bin.x86_64$ ./TerrariaServer.bin.x86_64 -config serverconfig.txtWithout -config, the server asks its questions interactively: which world, or which size and difficulty to generate, then the port, the maximum players and the password. That interactive path is fine once. For anything you will restart, use the config file, because a server that stops with an unanswered prompt does not come back.
Steam lobbies are also supported, with -steam and -lobby friends or -lobby private, which lets people join through the Steam friends list rather than by address. On a rented server you almost always want the plain address route instead.
serverconfig.txt: the settings that matter#
serverconfig.txt is one key=value per line, with # starting a comment. The file that ships with the server is already documented; these are the lines that change behaviour.
world=/home/terraria/.local/share/Terraria/Worlds/Midgard.wldworldpath=/home/terraria/.local/share/Terraria/Worlds/autocreate=3worldname=Midgarddifficulty=1seed=maxplayers=10port=7777password=herring-barrelmotd=Welcome. Rules are in the Discord.banlist=banlist.txtsecure=1language=en/USupnp=0npcstream=60priority=1| Key | Default | What it does |
|---|---|---|
world | - | Full path to the .wld to load. Takes priority over autocreate |
worldpath | platform default | Where worlds are stored and created |
autocreate | - | 1 small, 2 medium, 3 large. Only used if world is missing |
worldname | World | Name of a world being created |
difficulty | 0 | 0 classic, 1 expert, 2 master, 3 journey |
seed | random | World seed, including the special seeds |
maxplayers | 8 | Hard maximum is 255. Playable is nothing like that |
port | 7777 | TCP, and the only port the server needs |
password | empty | Join password |
motd | - | Printed to each player on join |
banlist | banlist.txt | File of banned players |
secure | 0 | Extra cheat protection. Turn it on |
upnp | 1 | Port mapping on a home router. Set 0 on a hosted server |
npcstream | 60 | Lower means less enemy skipping and more bandwidth |
priority | 1 | Process priority, 0 realtime to 5 idle |
Two of these catch people. world and autocreate are mutually exclusive in effect: if world points at a file that exists, that world loads and autocreate is ignored; if it points at a file that does not exist, the server creates one with the autocreate size and the worldname, which is how a group silently ends up playing on a brand new map after a path typo. And difficulty in this file is world difficulty - journey mode worlds can only be joined by journey characters, so a difficulty=3 server excludes everyone's existing character.
Journey worlds also read a set of journeypermission_ keys that decide which of the power menu's controls each player may use. They only apply on a journey world, and they are the difference between a shared sandbox and one person freezing time for everybody.
Ports and connecting#
| Port | Protocol | Purpose |
|---|---|---|
7777 | TCP | Everything |
Terraria is one of the few multiplayer games that runs on TCP rather than UDP, which matters the moment you write a firewall rule or ask a host what to open. A UDP rule for 7777 does nothing here. TCP vs UDP for game servers explains why almost every other game went the other way and what the trade is.
There is also no server browser and no query port. Players open Multiplayer, then Join via IP, and type the address and port. That is the whole discovery mechanism, so the address is something you hand out rather than something people find. If you would rather give out a name than a number, connecting a domain to a game server covers the A record, and Terraria is one of the easiest cases because the port is fixed and visible.
Crossplay does not exist. Mobile and console Terraria are a separate multiplayer ecosystem and cannot join a PC dedicated server, whatever the version numbers suggest.
Console commands#
The server console accepts a short list of commands, typed directly into the running process:
| Command | What it does |
|---|---|
help | Lists the commands |
playing | Connected players |
say <text> | Speak as the server |
motd | Print the current message of the day |
password <text> | Change the join password live |
kick <player> | Disconnect a player |
ban <player> | Disconnect and add to the ban list |
save | Write the world immediately |
exit | Save and shut down |
exit-nosave | Shut down without saving |
settle | Force all liquids to settle |
time, dawn, noon, dusk, midnight | Read and set the clock |
seed | Print the world seed |
settle is the one worth remembering. A large flooded area with water still moving is one of the few things that will genuinely drag a Terraria server, and settling it is instant. exit-nosave is the one worth fearing: it does exactly what it says, and there is no confirmation.
The server autosaves roughly every ten minutes and on a clean exit. Anything that kills the process instead - an out-of-memory stop, a host reboot, the panel's Kill button - loses whatever happened since the last write.
tModLoader on a dedicated server#
Install tModLoader from its GitHub release or from Steam, then start the server script rather than the game binary:
$ cd /home/terraria/tmodloader$ ./start-tModLoaderServer.sh -config serverconfig.txtMods are .tmod files. On a server they go in the Mods folder inside the tModLoader save directory, alongside an enabled.json that lists the internal names of the ones to load:
[ "CalamityMod", "CalamityModMusic", "MagicStorage", "BossChecklist", "RecipeBrowser"]The internal name is not the display name. It is the mod's folder name inside the .tmod, and getting it wrong means the mod is quietly not loaded rather than an error. The reliable way to get it right is to enable the mods once in a local tModLoader client, then copy that client's enabled.json and Mods folder up to the server over SFTP - SFTP and the file manager has the connection details.
Every mod declares which side it belongs on, and this is the part that decides who has to install what:
- Both - the default. Server and every client need it, at the same version. Content mods, boss mods, anything that changes the game.
- Client - interface and quality-of-life mods. The server neither has nor cares about them.
- Server - runs on the server alone; clients need nothing.
- NoSync - loadable on either side and not checked at all.
tModLoader offers joining clients a download of the server's synced mods, which removes most of the "install this list first" friction. It does not remove the version problem: a client that already has a different version of a mod has to update or downgrade to match, and the message it shows does not always make that obvious.
Worlds, saves and the backup habit#
A vanilla world is one file: Midgard.wld, with Midgard.wld.bak beside it holding the previous save. tModLoader adds Midgard.twld for mod data, and Midgard.twld.bak. Both files belong together - a .wld restored without its matching .twld loads as a world where every modded item and tile has vanished.
| Platform | Vanilla worlds | tModLoader worlds |
|---|---|---|
| Windows | Documents\My Games\Terraria\Worlds\ | ...\Terraria\tModLoader\Worlds\ |
| Linux | ~/.local/share/Terraria/Worlds/ | ~/.local/share/Terraria/tModLoader/Worlds/ |
The whole world being a single file makes backups trivial and makes losing one trivial too. The .bak file is not a backup: it is the previous save, on the same disk, overwritten every ten minutes. A real backup is a copy somewhere else, on a schedule, that you have restored at least once - backups that actually restore makes the case better than another paragraph here would, and testing a restore before you need it is the ten minutes that proves it.
Characters are not on the server. A .plr file lives on each player's machine, which is why your inventory survives a move between servers and why a vanilla server cannot stop somebody arriving with a full set of endgame gear. TShock's server-side characters are the only way to change that, and they are the main reason large public servers run TShock.
On RE:NODE the Terraria plans include two backup slots, the panel takes them on demand or on a schedule, and restoring one is a button rather than a ticket. The Schedules tab can also run a save command before the backup task, which is worth doing - a backup taken mid-interval is a backup of the last save, not of now.
Performance and what actually causes lag#
Terraria rarely runs out of CPU. When it does, it is nearly always one of four things:
- Unsettled liquids. A large pumping or flooding project keeps thousands of tiles updating.
settlefixes it in seconds. - Item entities on the ground. Thousands of dropped items from a farm are each an entity being synchronised. They despawn eventually; a restart clears them instantly.
- Wiring and statue farms. Timers firing hundreds of times a second across a large contraption cost real time on the world thread.
- A specific mod. In tModLoader, the answer to "the server got slow after Tuesday" is the mod you added on Tuesday. Remove one at a time.
What is not usually the problem is player count. Terraria's engine copes with far more players than the game is fun with; the practical ceiling is social and about the world being shared, not technical. How many players fit on a server covers the general version of that question. If you do raise maxplayers past the default eight, raise memory with it rather than hoping.
Troubleshooting#
The server created a new world instead of loading ours. The world path is wrong, or the file name does not match exactly including capitals. The original .wld is still where it was; fix the path and restart.
Players cannot connect but the server is running. Port 7777 is open for UDP and not TCP, or upnp=1 on a hosted server has confused things. Set upnp=0.
"You do not have the same mods as the server." Version mismatch, not a missing mod. Compare the tModLoader version first, then each mod's version. A mod updated for one player and not the others produces exactly this.
World generation hangs or the server is killed while creating a world. Memory. Generation peaks well above the running figure, especially with mods that add structures. Generate the world on a plan with headroom, or generate it locally and upload it.
Modded items vanished from every chest. A mod was removed, or the .twld was lost while the .wld survived. Restore both files together from before the change.
The server freezes for a second every few minutes. That is the autosave. On a large modded world it is noticeable and there is no setting to remove it - faster storage makes it shorter.
Memory climbs all week. Normal to a point, and a scheduled weekly restart keeps it flat. If it climbs fast enough to hit the limit in a day, it is a mod.
FAQ#
How much RAM does a Terraria server need?
A gigabyte is plenty for vanilla with a large world and a full group. tModLoader is the question that matters: two to three gigabytes for a light mod list, four for a Calamity-sized one, and six if the pack generates its own structures, because world creation peaks far above the running figure.
Do players need to install mods before joining a tModLoader server?
Usually not. tModLoader offers a joining client the server's synced mods as a download. They do need tModLoader itself at the same version, and a client that already holds a different version of one of those mods has to change it rather than download over it.
Can console or mobile players join a PC Terraria server?
No. The console and mobile versions form their own multiplayer ecosystem and cannot connect to a PC dedicated server. There is no crossplay mode to enable.
Is TShock better than the vanilla server?
For a public server, yes - it adds permissions, region protection and server-side characters, which is the only real answer to people arriving with duplicated gear. For a private group on mods, no, because TShock does not run tModLoader mods.
Why does the world reset every time I restart?
It does not; you are loading a different world. Either world points at a path that does not exist and autocreate builds a new one each time, or worldpath differs from where the world you care about actually lives.
How many players can a Terraria server hold?
maxplayers accepts up to 255, and nothing about the game is designed for that. Sixteen is a busy server, eight is the default for a reason, and past about twenty-five the shared world stops making sense long before the process struggles.




Comments
Completely anonymous: no account, no email, no cookie. We store the name you type, the text and the time - nothing else. Links are limited and markup is not rendered.