TShock is the admin toolkit for Terraria servers: server-side characters, accounts, permission groups, anti-cheat, and a big library of commands. But a brand-new TShock server won't obey you until you claim it — a one-time step that proves you're the owner. This guide walks the first-run claim, then sets you up with staff accounts, the commands you'll actually use, and the config file that shapes the server.
| At a glance | |
|---|---|
| You need | A Terraria server on the TShock flavor (see the Terraria quickstart) |
| Plan | Any — TShock runs on the free plan |
| Time | About fifteen minutes |
First: how TShock organizes power
TShock doesn't use Terraria's built-in host controls. Instead it has accounts (you register a username and password) that belong to groups, and each group has a set of permissions. The important groups, from most to least power:
| Group | What it can do |
|---|---|
| superadmin | Everything — it bypasses permission checks entirely. This is you. |
| admin / trustedadmin | Broad moderation and building powers, minus a few dangerous ones |
| vip | Small perks over regular players |
| default | A logged-in regular player |
| guest | Not logged in |
Your job on day one is to get yourself into superadmin, then hand out lesser groups to staff.
1. Start the server and find the setup code
Start your TShock server and watch the Console. On the first boot TShock creates a tshock folder for its database and settings, and prints a setup code — a short number — with the exact command to use it. It looks roughly like:
To become SuperAdmin, join the game and type /setup <code>
Copy that code. (It's a one-time key; TShock turns it off once you're done.)
💡 Tip: Missed it in the console? The same instruction is written to the server log — open the Logs page from your server menu and search for
setup.
2. Claim superadmin in-game
Join your server in Terraria (Multiplayer → Join via IP, using the address and port from the Network page). Once you're in, open the chat and type the command the console gave you:
/setup 12345
TShock replies that you're now temporary superadmin. "Temporary" is the key word — this is a doorway, not your permanent status. Next you make a real account.
3. Create your permanent account
While you're temporarily superadmin, register a proper login so you keep your powers after you disconnect:
/user add YourName YourPassword superadmin
/login YourName YourPassword
Now you're superadmin through an account, not a temporary code. Do the same for staff with a lower group, for example:
/user add HelperName TheirPassword trustedadmin
Each person then logs in with /login <name> <password> (they can also register themselves with /register <password> if you allow the default group to). Because these are server-side accounts, a player's inventory and progress are tied to their login — that's how TShock stops item duplication and impersonation.
4. Turn off the setup code
Once you have a real superadmin account, disable the setup code so nobody else can claim ownership. TShock tells you how right after /setup succeeds — typically by re-running the command or removing the setup file it created. Do it before you announce the server publicly.
⚠️ Heads up: Leaving the setup code active is the classic new-server mistake — anyone who reads it (or guesses) can make themselves superadmin. Close the door as soon as you're in.
The commands you'll actually use
TShock has hundreds of commands; these are the daily core. Type /help in-game for the full, version-accurate list.
| Command | Does |
|---|---|
/kick <player> <reason> |
Remove a player for now |
/ban add <player> <reason> |
Ban an account/player |
/mute <player> |
Silence chat |
/user group <name> <group> |
Move a player to a different group |
/group addperm <group> <perm> |
Grant a permission to a group |
/spawn / /tp <player> |
Teleport to spawn / to someone |
/heal /godmode /kill <player> |
Common admin actions |
/reload |
Re-read config and permissions without restarting |
Permissions are named nodes (like tshock.admin.ban). You rarely edit them one by one — you assign people to a group and let the group carry the permissions. Build your staff ladder by cloning a close group and adjusting, rather than starting from scratch.
config.json: the server's settings
TShock keeps its settings in tshock/config.json, editable in the File Manager. The stable, commonly-changed keys:
ServerName— the name shown to players.MaxSlots— how many players can join.ServerPassword— set to require a password to join (leave blank for open).SpawnProtectionRadius/DisableSpawnProtection— protect the area around spawn from building.DefaultRegistrationGroup— the group new self-registered accounts land in.
Save, then run /reload in-game (or restart) so TShock re-reads the file.
🎯 Good to know: Falix manages the network port for you, like it does for every game — leave port and IP settings to the panel and use config.json for gameplay and admin options. Your join address and port always come from the Network page.
Honest version notes
TShock moves with Terraria, and a few things shift between releases — so trust your own console and the official docs over any fixed value here:
- Match versions. A TShock build targets a specific Terraria version; mismatched clients can't join. The Terraria quickstart covers picking the flavor.
- config.json has grown and reorganized across major TShock versions — key names and sections differ between 4.x and 5.x. Edit the file you actually have, not a screenshot from an old guide.
- The setup-code claim and the account/group model have been stable for years; that's the part you can rely on.
For the complete, current command and config reference, see TShock's official documentation at github.com/Pryaxis/TShock/wiki.
Troubleshooting
/setupsays invalid code — you typed the wrong number, or the code was already disabled. Restart and read the fresh code from the console.- Lost superadmin after disconnecting — you claimed with the temporary code but never ran
/user add ... superadminand/login. Redo steps 2–3. - A command says I lack permission — you're not logged into a superadmin account.
/loginfirst; check the account's group with/user group. - Can't connect at all — TShock aside, this is usually a missing port. Terraria needs the address and port from the Network page. See I can't reach my server.