Terraria Field guide

Set up a Terraria TShock server on Linux and secure the owner account

Start TShock and configure an administrator account, groups and permissions without exposing login credentials.

Set up a Terraria TShock server on Linux and secure the owner account

Use TShock when you need Terraria accounts, permission groups and server-side administration while players use a compatible ordinary PC client. Content mods from tModLoader belong to a different server stack; .tmod files are not TShock plugins.

This walkthrough installs TShock 6.2.1 for Terraria 1.4.5.8 on Linux x86-64, the stable release checked on 25 October 2026. Match the release's Terraria version to your clients before downloading. Do not assume a current mobile or console client can join this PC server.

The setup code is temporary access. The owner account and permission database must survive future restarts.

Prepare a private first start#

Use a non-root account with a writable home. Install curl, unzip and tar through your distribution, plus the .NET 9 runtime using Microsoft's Linux instructions for your distribution and architecture. Check the runtime before proceeding:

bash
dotnet --list-runtimes

For this release, look for Microsoft.NETCore.App 9.0.x. The launcher targets .NET 9; older tutorials prescribing Mono or .NET 6 do not describe this build. Install its named native Linux dependencies if startup reports them missing.

Initially allow the game port only from the administrator's address, in both host and provider firewalls. Anyone with the setup code can obtain temporary elevated access. Keep the console, setup file, backups and any screen sharing private until setup is finished.

Download and fully extract the matching release#

Create a new directory separate from an existing vanilla or modded server. This example downloads the pinned, checked linux-x64 release matching Terraria 1.4.5.8:

bash
mkdir -p "$HOME/terraria-tshock"
cd "$HOME/terraria-tshock"
curl -fL -o tshock-release.zip \
  https://github.com/Pryaxis/TShock/releases/download/v6.2.1/TShock-6.2.1-for-Terraria-1.4.5.8-linux-x64-Release.zip
unzip -l tshock-release.zip
unzip tshock-release.zip

The Linux 6.2.1 ZIP contains TShock-Beta-linux-x64-Release.tar. Extraction is not complete until you unpack that archive too:

bash
tar -tf TShock-Beta-linux-x64-Release.tar
tar -xf TShock-Beta-linux-x64-Release.tar
chmod +x TShock.Server
mkdir -p Worlds tshock

Keep TShock.Server, bin, ServerPlugins and the other distributed files together. TShockAPI.dll is an essential shipped plugin; an empty replacement plugin directory breaks the installation. For a different platform or future release, choose its real asset on the official release page and inspect the archive layout before adapting these commands.

Select a world and start the server#

For a new small world, run:

bash
./TShock.Server -world "$PWD/Worlds/Coop.wld" -autocreate 1 \
  -port 7777 -maxplayers 8 -configpath "$PWD/tshock"

For an existing compatible vanilla world, copy its stopped-server backup into Worlds and use its actual filename. Omit -autocreate 1: a path error must not create a replacement world. Do not import a tModLoader world expecting TShock to preserve its content mods.

The explicit -configpath keeps TShock's settings and local database under this installation. -world selects the world independently. Check the startup version, loaded world and errors. Connect from the matching PC Terraria client through Multiplayer → Join via IP, using the reachable address and TCP port 7777. A process or open port alone does not establish a working session.

Turn temporary setup access into a permanent owner#

Read the code printed by this server's console, or its private tshock/setup-code.txt. In the in-game chat, run these commands in order, replacing the uppercase placeholders without angle brackets:

text
/setup <SETUP_CODE>
/user add AdminCharacter <UNIQUE_OWNER_PASSWORD> owner
/login AdminCharacter <UNIQUE_OWNER_PASSWORD>
/setup

Use your chosen account name in place of AdminCharacter; if the configuration restricts account names to character names, use the current character's exact name. Confirm account creation and successful login before the final /setup. That final command verifies the permanent login, disables bootstrap, writes setup.lock and removes setup-code.txt in this configuration directory.

Create an owner, following TShock's setup instructions. Permanent superadmin grants broader bypasses, including server-side-character checks, and is not an interchangeable label. Never publish an actual setup code or owner password in a ticket, screenshot or shared log.

The game joining password and account password serve different purposes. Set a distinct ServerPassword in the generated tshock/config.json if the world is private; stop the server before editing its JSON and preserve the existing structure. Review DisableUUIDLogin for a public server: disabling automatic UUID login reduces reliance on an identifier other servers can obtain. Do not publish the REST interface as part of opening the game port.

Give moderators a smaller permission group#

As the authenticated owner, this example creates a group that inherits normal player permissions and adds the ability to kick:

text
/group add helpers
/group parent helpers default
/group addperm helpers tshock.admin.kick
/user group HelperAccount helpers

HelperAccount must already exist; ask that player to register normally first. Inspect inherited permissions with /group listperm helpers and verify from the helper's session that the intended command works while owner commands remain unavailable. Add specific permission nodes as duties expand, rather than granting * or owner to everyone.

Add third-party plugins only after a successful baseline join, using plugins compatible with the selected TShock/TSAPI version. Restart and read loading errors after each addition. -ignoreversion suppresses an API compatibility check; it does not repair an incompatible plugin.

Save the world and preserve the account database#

Disconnect players, issue save and then off in the trusted server console, and wait for process exit. Back up the full stopped installation outside itself, including Worlds, tshock, ServerPlugins, launch settings and the working release. With the default local database, tshock.sqlite carries accounts and permissions; retaining only .wld cannot restore them. An externally configured database needs its own consistent backup.

For subsequent starts, keep the same absolute world/config paths and remove the new-world -autocreate option. Reconnect, log into the owner account and confirm bootstrap is disabled before broadening network access. On an unexpected setup prompt, first verify the account, working directory and database path; deleting the database to fix login destroys administrative state.

Before upgrades, review the exact Terraria version, plugin compatibility and release notes. Keep a recoverable copy of the old files and data before any migration. Nexardo can help administer the infrastructure you own; TShock's account policy and compatible plugins still need this server's deliberate configuration.

Sources#