Terraria
Terraria servers are light. Most problems come from griefing, lost worlds and version mismatches after game updates, not from performance. This checklist covers all three.
Checklist
- [ ] Setup mode turned off after creating your owner account (
/setupwith no code). Setup - [ ] A server password for friends-only servers, or
RequireLogin: truefor public ones. - [ ] Staff in the lowest group that does the job, never shared accounts.
- [ ] Spawn protection on, and important builds protected with
/region. - [ ] TShock's own backups on (
BackupInterval) and panel backups every 6 hours. Backups - [ ] A locked backup before boss fights, events and updates. Nothing else can roll a Terraria world back.
- [ ] Plugins matched to your TShock version, added one at a time.
How much memory
| Server | Memory |
|---|---|
| Vanilla/TShock, 2–8 players, any world size | 1–2 GB |
| 8+ players, or several plugins | 2–3 GB |
| tModLoader with one big mod (Calamity, Thorium) | 4–6 GB |
| tModLoader with several big mods | 8 GB+ |
World size barely changes memory use; players and mods do. Lag during boss fights or big events is usually the CPU, not memory, so more memory won't fix it. Lowering enemy spawns helps instead: TShock's /maxspawns and /spawnrate commands set how many enemies can exist and how often they spawn.
Accounts and protection (TShock)
Set these in tshock/config.json with the server stopped, then start it. Full settings
| Setting | Recommended | Why |
|---|---|---|
RequireLogin |
true on public servers |
Players must /register and /login before they can do anything, so griefers can't just join and dig. |
SpawnProtection |
true |
Nobody but staff can break blocks around spawn. |
SpawnProtectionRadius |
10 (default) or more |
Size of the protected area, in tiles. |
MaximumLoginAttempts |
3 (default) |
Kicks players who guess passwords. |
DefaultRegistrationGroupName |
default |
New accounts get only the basic permissions. |
ServerPassword |
Set on friends-only servers | Asked before anyone can join. |
Protect builds with regions: stand at one corner and run /region set 1, then the opposite corner and /region set 2, then /region define <name>. Use /region allow <player> <name> to let a builder in.
Backups
TShock can back up the world by itself:
| Setting | Example | Meaning |
|---|---|---|
BackupInterval |
30 |
Minutes between backups (0 = off, the default). |
BackupKeepFor |
1440 |
Minutes to keep each backup (1440 = one day). |
Those copies go to tshock/backups/, on the same disk as the world, so keep panel backups too: every 6 hours, with a save command just before the backup task. TShock keeps the world in memory and only writes it to disk when it saves. Backup schedules
To restore, stop the server first. A running server overwrites the restored world the next time it saves.
Restarts
Terraria doesn't need restarts for performance. A restart once a day at a quiet time is still a good habit, because the world saves cleanly on shutdown and plugins reload. Use save first, then Restart.
Updating Terraria and TShock
When Terraria updates, players' games update automatically from Steam, but they can't join until TShock supports the new version, which usually takes a few days.
- Check the TShock releases page for a version supporting the new Terraria.
- Make a backup and lock it.
- Settings → Reinstall Server (with TShock Version on
latest) to download the new TShock. Your world andtshockfolder are kept. - Start, and update plugins that stop loading.
Until TShock updates, players can roll back Terraria in Steam (Properties → Betas) to keep playing.
Modded servers (tModLoader)
tModLoader servers are a different server type from TShock: TShock plugins don't work on them, and they need more memory (see above). Ask us to switch your server; your world can come along. On a tModLoader server:
- Everyone needs exactly the same mods and versions. tModLoader offers to download the server's mods when players join from the in-game server list.
- Which mods load is decided by
Mods/enabled.json. If a mod isn't listed there, it doesn't load, even if it's installed. - The easiest way to move a mod list to the server: in game, open Workshop → Mod Packs, choose Save Enabled as New Mod Pack, and send us the pack. We'll install it with its
install.txtandenabled.json. - Worlds come in pairs:
<World>.wldand<World>.twld. Always copy both. - Make a locked backup before adding or updating mods. Removing a content mod deletes its items and blocks from the world.
Common problems
| Problem | Fix |
|---|---|
| Lost connection right after joining | Version mismatch between the game and TShock. See updating, above. |
| World resets to a new one | World Name on Startup doesn't match your .wld file name. |
| Can't use any commands | You're not logged in. /login Name password. |
| Setup code doesn't work | Setup was already finished, so the code is disabled. Sign in with your owner account. Lost the owner password? Contact us: we can reset it in the account database. |
| Plugin crashes on start | It's built for an older TShock. Remove it from ServerPlugins. |
Settings in config.json change back |
Max players and the password are set on the panel's Startup page and replace the config's values at every start. Change them there. |
| Modded: players kicked for mod mismatch | Their mods or versions differ from the server's. Join from the in-game server list so tModLoader syncs them. |
