TShock Permissions and Crossplay for Terraria via Pterodactyl
Where tModLoader is the home of single player content overhauls, TShock is the home of multiplayer Terraria. It is a server side replacement for the vanilla binary that adds permission groups, region protection, region based PvP rules, and a plugin loader rich enough to host a real economy. This guide deploys TShock on Debian 12 inside Pterodactyl, uses the one shot setup code to register a superadmin account through the panel console, and installs the Mobile Compatibility Layer plugin so mobile clients can connect to the PC server.
Prerequisites
- Debian 12 with a working Pterodactyl panel and Wings node.
- The community TShock egg (Pterodactyl/nest game_servers/terraria-tshock).
- 4 GB RAM and 2 vCPU per instance.
- TCP 7777 open at the firewall and forwarded into the container.
Step 1: Create the TShock Server
In the panel admin area, create a new server with the TShock egg, pick TCP 7777 as the primary allocation, and start the instance. The egg pulls the latest stable TShock release (currently bundled against the Terraria 1.4.4.x server). First boot generates the config tree under tshock/.
Step 2: Register the Initial Superadmin
TShock's bootstrap flow is unusual: when the server starts with a default config, it prints a one shot setup code in the console log. Type /setup CODE as that code from your in game client, and you become the initial superadmin. Then immediately disable the bootstrap code so nobody else can claim the role.
[Server] TShock Setup Mode is enabled.[Server] Use /setup 12345 in game to claim superadmin permissions.# From the in game chat:/setup 12345/user add YourName YourLongPassword superadmin/login YourName YourLongPassword{ "Settings": { "ServerName": "Vardoran TShock", "ServerPassword": "", "MaxSlots": 16, "ServerPort": 7777, "DisableUUIDLogin": false, "AnnouncementBoxColor": [255, 200, 50], "EnableTokenEndpointAuthentication": true, "RestApiEnabled": true, "RestApiPort": 7878 }}Open tshock/setup.lock (created automatically after the first /setup call) and verify it exists. While it is present, the bootstrap code is permanently disabled.
Step 3: Create Permission Groups
# Default group: chat and basic commands only/group add default "tshock.canchat,tshock.tp,tshock.tp.others.accept"# Builder group: regions and item spawning capped/group add builder "tshock.canchat,tshock.tp,tshock.world.protect,tshock.item.spawn"/group parent builder default# Moderator: kick, mute, ban scoped/group add moderator "tshock.admin.kick,tshock.admin.mute,tshock.admin.ban"/group parent moderator builder# Pin a user to the moderator group/user group ModeratorName moderatorStep 4: Install the Mobile Compatibility Plugin
Mobile Terraria speaks a slightly different protocol from the PC build. The community TerrariaMobileCompat plugin translates between the two on the fly, which lets mobile players join a PC TShock server without any modification on the client.
# Drop the plugin DLL into the ServerPlugins foldersftp -P 2022 user.xxxx@panel.example.comsftp> cd ServerPluginssftp> put TerrariaMobileCompat.dllsftp> exit# Restart the server through the panel[TShock] Loaded plugin TerrariaMobileCompat v1.x.x[TShock] Mobile protocol shim enabled on port 7777[TShock] Server listening on 0.0.0.0:7777Step 5: Region Protection for Spawn
# Stand at one corner of spawn/region define spawn 1# Stand at the opposite corner/region define spawn 2/region set spawn/region protect spawn true/region allow spawn moderatorPerformance and Tuning
- Keep
MaxSlotsat 16, the Terraria networking layer's broadcast cost grows quadratically with player count. - Run TShock's database in SQLite for any server under 30 players, MySQL is only worth it for cross server economies.
- Disable the REST API on any internet facing instance unless you have a firewall rule scoped to your admin IP.
Conclusion
TShock is to Terraria what SourceMod is to the Source engine: the difference between a toy multiplayer mode and a real, ban capable, permission scoped community server. Combined with a Pterodactyl instance for lifecycle and a mobile compat plugin for crossplay, a TShock server can host a mixed PC and mobile community without any client side tinkering.