---
title: "How to install TShock for Terraria"
description: "Toggle your server type to TShock, reinstall, claim ownership using your panel setup code, and configure config.json permissions."
url: "https://www.gameserverkings.com/knowledge-base/terraria/tshock/"
category: "Terraria"
category_url: "https://www.gameserverkings.com/knowledge-base/terraria/"
published: "2026-07-24T02:43:03.695Z"
updated: "2026-08-07T21:07:36.577Z"
source_format: "markdown"
site: "GameServerKings"
---

# How to install TShock for Terraria

TShock replaces the vanilla Terraria server with a far more capable one: a command system, groups, permissions, anti-cheat, plugins, and region protection. The vanilla server it replaces has [its own small console command set](/knowledge-base/terraria/terraria-server-commands/), which works differently: no slash, typed in the Console tab of your [rented Terraria server](/games/terraria-server-hosting/), and no permissions at all.

## Step 1: Change the Terraria Server Type

1. In the **Startup** tab, set **Server Type** to `tshock` (the other options are `vanilla` and `tmodloader`).

2. Go to **Settings** and click **Reinstall Server**. This swaps the server files to TShock; it does not touch your worlds or data.

3. Start the server.

> [!NOTE] Your world and TShock data survive the switch
> Switching is non-destructive: your world in `worlds/` carries straight over from vanilla, and if you later switch away and back, your TShock accounts, permissions, and config in `tshock/` are still there.

## Step 2: First TShock Boot on Your Terraria Server

TShock's first boot generates `tshock/config.json`, `tshock/sscconfig.json`, and `tshock/tshock.sqlite`. It also prints a one-time **setup code** in the console:

```text title="Console output"
To setup the server, join the game and type /setup 2566305
This token will display until disabled by verification. (/setup)
```

Nothing to type in the console; you claim admin in-game with that code (next steps). The code is also saved to `tshock/setup-code.txt` if it scrolls away. The yellow notices about UUID login on boot are TShock's normal defaults, not errors.

## Step 3: Configure tshock/config.json

Open it in the File Manager. Highlights:

```json title="tshock/config.json"
{
  "ServerNickname": "My TShock Server",
  "ServerPassword": "",
  "MaxSlots": 8,
  "PreventBannedItemSpawn": true,
  "DisableTombstones": true,
  "RestUriEnabled": true,
  "EnableWhitelist": false
}
```

Restart after edits.

> [!IMPORTANT] The Startup tab wins over config.json
> Two values are managed by the panel and override the config: the player cap comes from the **Max Players** variable and the join password from **Server Password**, both in [the Startup tab](/knowledge-base/terraria/getting-started-with-your-server/).

## Step 4: Claim Superadmin with /setup

Join the server, open chat with **Enter**, and run these in order:

```text
/setup 2566305
/user add YourName YourStrongPassword owner
/login YourName YourStrongPassword
/setup
```

Line by line: `/setup <code>` (using the code from the console or `tshock/setup-code.txt`) grants you temporary superadmin. `/user add` creates your permanent account in the **owner** group. `/login` signs you in. Running `/setup` again closes setup mode, which also stops the "setup-code.txt is still present" notice on future boots.

Players create their own accounts with `/register <password>`, and you can [promote staff](/blog/game-server-moderation-tips/) later with `/user group <name> owner`.

## Step 5: Common Commands

```text
/help                          Show available commands
/group list                    List groups
/user add <user> <pass> <group> Create a user in a group
/user group <user> <group>     Set a user's group
/region                        Region protection commands
/ban add <player> <reason>     Ban a player
/give <item> <player> <count>  Give an item
/spawn                         Teleport to spawn
/save                          Save the world now
/reload                        Reload configs
```

## What to Read Next

- [TShock Plugins](/knowledge-base/terraria/tshock-plugins/) to extend TShock
- [TModLoader and Mods](/knowledge-base/terraria/how-to-install-tmodloader/) if you also want modded content

---

Made with 💜 by GameServerKings
