KnowledgeTerraria

TShock Commands for Terraria Servers (Setup, Groups, Bans)

TShock commands that matter: claim owner with the /setup code, create accounts, set up groups and permissions, ban, regions and the most used admin commands.

Updated Oct 1, 2026 · 8 min read

On this page

To become admin on a TShock server, start it once, copy the setup code from the console (also saved in tshock/setup-code.txt), join the game and type /setup <code>. Then run /user add YourName YourPassword owner, /login YourName YourPassword, and /setup once more to switch the setup system off. After that, everything runs through TShock's commands and permission groups, which this page lists with the ones admins use every day.

What is TShock?

TShock is a free server mod for vanilla Terraria. Players join with normal, unmodded Terraria, while the server gets accounts, permission groups, protected regions, bans, anti cheat and plugins. It is different from tModLoader, which adds content mods like Calamity and needs every player to run tModLoader too.

On GamezServers you pick the server type in the panel: Vanilla, tModLoader or TShock. Pick TShock when you want admin tools on a vanilla gameplay server, and tModLoader when you want content mods. You cannot run both at once.

TShock 6 supports Terraria 1.4.5. As with vanilla, the server and players must be on the same Terraria version, see Terraria server version mismatch.

How do I make myself superadmin on TShock?

  1. Start the server for the first time. TShock prints a line like To setup the server, join the game and type /setup 1234567. The code is also written to tshock/setup-code.txt.

  2. Join with Terraria and type in chat:

    /setup 1234567
    

    You are now a temporary superadmin.

  3. Create your real account in the owner group:

    /user add YourName YourPassword owner
    
  4. Log in to it:

    /login YourName YourPassword
    
  5. Turn the setup system off so the code stops working:

    /setup
    

The setup code only appears while no user accounts exist and setup has not been finished (TShock writes tshock/setup.lock when it is). If the code is gone because someone already registered, an existing admin can promote you, or you can run user group YourName owner from the server console, which always has full rights.

Use a password you do not use anywhere else. Anyone who logs in as you owns the server.

Console or chat?

In game, every TShock command starts with /. Starting with . instead runs the command silently, so other players do not see it. In the server console, the slash is optional: user add Bob pass123 default and /user add Bob pass123 default both work. The console has every permission, so it is the safe place to fix group mistakes.

On GamezServers the Console tab is that console, and the panel has TShock buttons for common jobs, like TShock: make it noon (time noon) and TShock: ban player (ban add).

Account commands for players

Command What it does
/register <password> Creates an account with your character's name
/login <password> Logs in with your character's name
/login <username> <password> Logs in to a differently named account
/logout Logs out
/password <old> <new> Changes your password
/accountinfo <name> Shows account details

New registered accounts go to the default group. Players who are not logged in are in guest. If you want everyone to have an account before they can build, set "RequireLogin": true in tshock/config.json (inside its Settings block) and restart.

How do TShock groups and permissions work?

Every account belongs to one group, and each group has a list of permissions plus an optional parent it inherits from. TShock creates these groups out of the box:

Group Parent Meant for
guest none Players not logged in
default guest Registered players
vip default Trusted players, can use reserved slots
newadmin vip Junior moderators: kick, mute, time
admin newadmin Moderators: ban, spawn mobs, broadcast
trustedadmin admin Senior admins: items, god mode
owner trustedadmin You: groups, regions, everything

There is also superadmin, a built in group with every permission that is not stored in the database. Give your own account owner and keep superadmin for emergencies.

The group commands:

/group list
/group listperm vip
/group add builder
/group parent builder default
/group addperm builder tshock.tp.self tshock.warp
/group delperm builder tshock.warp
/group prefix builder "[Builder] "
/group del builder

And to put a player in a group:

/user group Bob builder

Permissions we hand out most often:

Permission Allows
tshock.world.modify Building and breaking blocks
tshock.tp.self /tp to other players
tshock.tp.others /tphere, pulling players to you
tshock.tp.home and tshock.tp.spawn /home and /spawn
tshock.warp Using warps
tshock.world.time.set /time
tshock.admin.kick /kick
tshock.admin.mute /mute
tshock.admin.ban /ban
tshock.item.spawn /item
tshock.reservedslot Joining a full server

Our advice: do not edit the built in groups much. Make your own small groups (like builder or mod) with a built in parent, and add only the permissions you need. It keeps upgrades and troubleshooting simple.

User management commands

Command What it does
/user add <name> <password> <group> Creates an account
/user del <name> Deletes an account
/user password <name> <newpassword> Resets someone's password
/user group <name> <group> Moves an account to a group
/userinfo <player> Shows info on an online player
/tempgroup <player> <group> [time] Gives a group temporarily

Moderation commands: kick, mute and ban

/kick Bob Spamming chat
/mute Bob
/ban add Bob Griefing 7d
/ban list
/ban details 3
/ban del 3

/ban add <target> [reason] [duration] [flags] bans by account, UUID and IP at once by default. Durations look like 1d, 12h or 0d6h30m. Leave the duration out for a permanent ban. Flags let you narrow it: -a account, -u UUID, -n character name, -ip IP address, and -e for an exact name match. Every ban gets a ticket number, which is what /ban del takes to lift it.

World and time commands

Command What it does
/time noon Also day, night, dusk, midnight, or a time like 4:30
/save Saves the world
/off Saves and shuts down the server
/settle Settles all liquids
/hardmode Toggles Hardmode
/worldmode Changes the world difficulty
/spawnboss <boss> [amount] Spawns a boss
/spawnmob <mob> [amount] Spawns mobs
/butcher Kills all hostile NPCs
/protectspawn Toggles spawn protection
/antibuild Freezes building for everyone without permission
/serverpassword <password> Changes the join password
/reload Reloads config and permissions

Player commands

Command What it does
/who Lists online players (also /playing, /online)
/tp <player> Teleports you to a player
/tphere <player> Teleports a player to you
/home and /spawn Teleports to your spawn point or the world spawn
/warp <name> Teleports to a saved warp
/item <item> [amount] Spawns an item for yourself (/i for short)
/give <item> <player> [amount] Gives an item to someone
/heal [player] Heals
/godmode [player] Toggles god mode
/broadcast <message> Message to everyone (also /bc, /say)
/whisper <player> <message> Private message (also /w, /tell)

Use /help to list every command your account can run, and /help <command> for its syntax.

How do I protect a build with a region?

Regions stop anyone without permission from building in an area. To protect a base:

/region set 1

Hit the top left block of the area.

/region set 2

Hit the bottom right block.

/region define MyBase
/region allow Bob MyBase

/region allowg builder MyBase allows a whole group. /region list, /region info MyBase and /region delete MyBase do what they say. Regions are protected when defined, and /region protect MyBase false turns protection off without deleting it.

Plugins

TShock plugins are .dll files that go in the ServerPlugins folder. Upload them in the Files tab, restart, and check the console to see they loaded. Only use plugins built for your TShock version: an old plugin is the usual reason a TShock server stops on startup after an update. Back up first with Backup in the panel.

Running TShock on GamezServers

Choose TShock as the server type, start it, and the setup code appears in the Console tab. Upload an existing world with the steps in how to upload a Terraria world to a server, and see Terraria server config explained for the vanilla settings that still apply. If you want Calamity or other content mods instead, that is tModLoader, see how to make a Calamity mod server. Plans start at 2 GB, which is plenty for TShock with a group of friends: Terraria server hosting.

FAQ

Where do I find the TShock setup code?

In the server console the first time TShock starts, and in tshock/setup-code.txt. It stops showing once a user account exists and setup is finished.

I lost my TShock admin account. How do I get it back?

Use the server console, which has full rights: user password YourName NewPassword resets the password, and user group YourName owner restores your group.

Can players join a TShock server with normal Terraria?

Yes. That is the point of TShock. Players use the regular game on the same version as the server, no mods needed.

Can I use TShock and tModLoader together?

No. They are separate server types. TShock is for admin tools on vanilla gameplay, tModLoader is for content mods. Pick one per server.

Why can't new players build on my TShock server?

Either they are not logged in and the guest group cannot build, spawn protection is on near spawn, or the area is a protected region. Ask them to /register and /login, or give the group tshock.world.modify.

Skip the setup. Your own Terraria server.

$2.49USD first month

Then $4.99/mo. Just trying it? $1.25 for 3 days

Keep reading