Terraria · Config reference

Terraria server config reference

Every important serverconfig.txt and TShock config.json setting for your Terraria server, what it does, which need a restart, and how to set up admins and bans.

By Last reviewed 4 min read

Vanilla and tModLoader servers keep their settings in serverconfig.txt. TShock reads that file too, and adds its own tshock/config.json. The common settings have plain labels in Settings, so most people never open either file.

How to change settings

You have three ways in, from easiest to most detailed:

  1. Settings: world name, size, difficulty, seed, max players, password and cheat protection, with plain labels.
  2. Settings > Advanced: the real config files, in an editor.
  3. Files, or SFTP on port 2022: every file on the server, including banlist.txt and the TShock folder.

Every change applies after a restart. Size, difficulty and seed only shape a new world, so set them before the first start.

serverconfig.txt

Each line is name=value. Lines that start with # are ignored.

Setting Default What it does
world Set by us The full path of the world file to load
autocreate Set by us Makes a new world if the file in world isn’t there: 1 small, 2 medium, 3 large
worldname none The name for a new world
seed random The seed for a new world. Secret seeds work too
difficulty 0 For a new world: 0 Classic, 1 Expert, 2 Master, 3 Journey
maxplayers 16 The most players at once, from 1 to 255
password none The password to join. Empty means no password
motd none The message players see when they join
secure 0 1 turns on the game’s extra cheat protection
npcstream 60 How often enemy positions are sent. Lower means less enemy skipping and more traffic. 0 is off
banlist banlist.txt The file that holds bans
port Set by us Leave it. Your real port is on the address card

Journey Mode worlds only take Journey characters, and Classic, Expert and Master worlds only take normal ones.

Journey Mode powers

In a Journey world, you choose who can use each power with a journeypermission_ line, like journeypermission_godmode=2:

Value Who can use it
0 Nobody
1 Only the host
2 Everyone

Console commands

Vanilla and tModLoader have no admin rank in the game. Admin jobs happen in the Console, typed without a slash:

Command What it does
help Lists every command
playing Lists who is on
say <message> Sends a message to everyone
kick <player> Kicks a player
ban <player> Bans a player
password <password> Changes the password until the next restart
motd <message> Changes the message of the day
time Shows the time in the world
dawn, noon, dusk, midnight Changes the time of day
settle Settles all moving water
save Saves the world

To stop or restart the server, use Overview.

Bans on vanilla

A ban adds the player’s name and IP to banlist.txt. To unban someone, stop the server, open banlist.txt in Files, delete that player’s lines and start the server again.

TShock config.json

TShock keeps its own settings in tshock/config.json, inside a Settings block. Edit it with the server stopped.

Setting Default What it does
ServerPassword none TShock’s own password to join
MaxSlots 8 TShock’s own player limit. Raise it to the group size you want
ServerName none Shown in place of the world name, when UseServerName is true
RequireLogin false true makes every player register or log in before playing
EnableWhitelist false true only lets in IP addresses listed in tshock/whitelist.txt
PvPMode normal normal, always or disabled
AutoSave true Terraria’s own world saving
BackupInterval 10 Minutes between TShock’s own backups, in tshock/backups
BackupKeepFor 240 Minutes to keep those backups

TShock’s docs suggest setting Max players 2 higher than MaxSlots, so extra players see “Server is full” instead of a plain failed join.

TShock owner and groups

TShock gives you real admin in the game. On the first start, it prints a setup code in the Console. It’s also in tshock/setup-code.txt.

  1. Join the server.
  2. In the chat, type /setup <code> with that code.
  3. Make your account: /user add <name> <password> owner.
  4. Log in with /login <name> <password>.
  5. Type /setup once more. This turns the setup code off for good.

There’s a shortcut too. The Console has full rights on TShock, so you can type user add <name> <password> owner there at any time, then log in from the game.

Players then sit in groups, from guest and default up to vip, newadmin, admin, trustedadmin and owner:

Command What it does
/user group <name> <group> Moves an account to a group
/group addperm <group> <permission> Gives a group a permission
/ban add <player> [reason] [duration] Bans a player
/ban list and /ban del <number> Shows bans and removes one
/whitelist <ip> Adds an IP address to the whitelist

tModLoader settings

tModLoader uses the same serverconfig.txt. Mods that have settings keep them in the ModConfigs folder, next to Mods. Change them with the server stopped. See mods for which mods load.

Questions

Where is serverconfig.txt on my Terraria server?

In the server's main folder. Open it in Settings, under Advanced, or in Files. TShock servers also have their own config.json in the tshock folder.

How do I make myself admin on a Terraria server?

Vanilla and tModLoader have no admin rank, so you run admin commands in the Console. On TShock, use the one-time setup code from the Console to make an owner account for yourself.

How do I unban someone on a vanilla Terraria server?

Stop the server, open banlist.txt in Files, delete the player's name and IP lines, then start the server again.

Sources we checked

  1. Server (configuration file and commands)Terraria Wiki
  2. TShock config file descriptionsPryaxis
  3. TShock documentationPryaxis

Run your Terraria server on Wilderack

Daily backups, DDoS protection and free game swaps come with every plan. Wakes the moment you join.

Wait! Get 25% off your server

Don’t miss the best Terraria hosting.

Date of birth

We keep only your email and where you signed up, to send you launch news and your code. Your birth month and year are checked, never stored. Every email has an unsubscribe link, or write to privacy@wilderack.com. Your data, in plain words.

25% off your first payment, for new customers. Your code arrives by email. Then the normal price; cancel any time.