How to Set Up TShock on a Terraria Server
TShock is a server mod for Terraria that adds permissions, groups, bans, region protection, a REST API and plugin support. Players use a normal Terraria client, with no client mod required.
Install
- Make sure your server uses a TShock build made for your Terraria version. Version mismatches are the most common problem.
- Stop the server and upload the TShock files to the Files tab, or choose a TShock option if we offer one for your server.
- Start the server and open the Console tab. TShock creates a tshock folder with its config, logs and database.
First-run setup code
On first start TShock prints a setup code in the console. Until setup is finished, players who try to use admin commands are told to authenticate. To complete setup:
- Join the server in game.
- Type /setup followed by the code shown in the console.
- Register an account with /user add username password superadmin.
- Log in with /login username password.
- Disable the setup requirement by running /auth-verify in the console, or follow the on-screen prompt.
The exact prompts vary a little by version, so read the console output. Use a strong password.
Config files
The main settings are in tshock/config.json, including server port, max slots, spawn protection and ban options. Server settings such as world and port are also used from serverconfig.txt where supported. Edit files while the server is stopped, then restart.
Useful commands
- /user group username groupname to change someone's group.
- /ban add name to ban a player.
- /region and /worldmode type commands for protection and world control. Check /help in game.
- /reload to reload the config files.
Plugins
Plugins are DLL files placed in the ServerPlugins folder. Only use plugins built for your TShock version, and add them one at a time.
Common issues
- Version mismatch: update TShock when Terraria updates.
- Cannot use commands: you are not logged in, or your group lacks permission.
- Check the logs folder in tshock for error details.
Contact us on Discord for help.