Terraria Server Admin Commands
Managing a Terraria server depends on whether you are running a Vanilla server or TShock. This guide focuses on TShock, as it provides the most robust tools for moderation and world protection.
How to Use Commands
- In-Game Chat: Start every command with a
/(e.g.,/help). - Server Console: Type the command without the slash (e.g.,
help).
1. Initial Setup (TShock)
When you first launch a TShock server, you must become a SuperAdmin:
- Check the server console for a setup code (7 digits).
- In-game, type:
/setup [code]. - Register your account:
/register [username] [password]. - Login:
/login [username] [password]. - Promote yourself:
/user group [username] superadmin(Only needed if the setup didn't auto-promote).
2. Essential Player Management
| Command | Effect |
|---|---|
/kick [player] [reason] |
Temporarily remove a player. |
/ban add [player] [reason] |
Permanently block a player. |
/mute [player] |
Prevent a player from talking in chat. |
/tp [player] |
Teleport to a specific player. |
/tphere [player] |
Bring a player to your location. |
/who |
List all online players and their IP addresses. |
3. World & Inventory Control
- /time [day/night]: Instantly change the time.
- /noon or /midnight: Specific time shortcuts.
- /rain: Toggle precipitation.
- /give [item] [amount]: Give yourself or another player any item (e.g.,
/give "Terra Blade" 1). - /butcher: Kill all monsters and hostile NPCs in the world.
- /save: Force an immediate world save to disk.
4. Region Protection (Anti-Grief)
TShock allows you to lock areas so only authorized players can build.
- /region define [name]: Start the tool.
- Select the area by hitting the top-left and bottom-right blocks with your pickaxe.
- /region protect [name] true: Locks the area.
- /region allow [name] [player]: Grants a specific friend building rights inside that region.
5. Troubleshooting
"You do not have permission"
Ensure you are logged in (/login) and that your user group is correct. If you lose your SuperAdmin rights, delete the tshock.db file in the server folder to reset the setup process.
Command syntax errors
If an item name has spaces, you must use quotes: /give "Eye of Cthulhu".