Skip to main content

Need a powerful server for your projects?

Discover our offers

Configure serverconfig.txt

A Terraria server's settings live in a text file: serverconfig.txt, at the root of the server. It is used on vanilla, TShock and tModLoader. This page covers the most useful lines.

Editing the file safely​

Stop the server before editing

Always stop the server from the panel Console before editing serverconfig.txt. The file is only read at startup: a change made while the server is running is not applied.

  1. Log in to your Game Panel: game.yorkhost.fr
  2. Select your server and stop it
  3. Open the Files tab and edit serverconfig.txt
  4. Change the values you need
  5. Save, then start the server

Each setting sits on one line, in key=value format, without spaces around the =:

maxplayers=8
password=MyPassword

A line starting with # is a comment and is ignored. To enable a commented-out setting, remove the # at the start of the line.

Keep a copy

Download a copy of your serverconfig.txt before any update or reinstall of the server, and before switching modes (vanilla, tModLoader, TShock).

Startup tab parameters​

Some values (world name, player count, size…) may also be exposed in the panel's Startup tab. In that case, the Startup tab value takes precedence: the panel may write it back into serverconfig.txt on every start. If a change to the file seems to be reverted on restart, check whether the same setting is defined in the Startup tab and change it there.

The world​

KeyRole
worldPath of the .wld file the server loads. If it does not exist and autocreate is set, the server creates it
autocreateSize of the world to generate if it does not exist: 1 small, 2 medium, 3 large
worldnameName given to the world when it is created
seedGeneration seed (optional)
difficultyWorld difficulty when it is created: 0 Classic, 1 Expert, 2 Master, 3 Journey
worldpathFolder where the server looks for and saves worlds

World sizes:

autocreateSizeDimensions (tiles)
1Small4200 × 1200
2Medium6400 × 1800
3Large8400 × 2400

Example for a medium Expert world:

world=<existing path>/Worlds/MyWorld.wld
autocreate=2
worldname=MyWorld
difficulty=1
seed=

For the world line, keep the path already in your file and only change the .wld file name.

Size, difficulty and seed are chosen before playing

autocreate, worldname, seed and difficulty are only used to create a new world. Once the world is generated, changing them has no effect on it. To change size or seed, you need to create another world (by changing the file name in world). To bring back an existing world, see Importing a world.

Classic, Expert, Master, Journey

A Journey character can only join a Journey world, and a classic character cannot join a Journey world. Pick the difficulty with your whole group in mind. Special seeds (secret seeds) are entered in seed like any other seed; support for them depends on the game version.

Access and players​

KeyRole
maxplayersMaximum number of connected players (up to 255)
passwordPassword to join (empty = none)
motdMessage of the day shown to players when they join
banlistFile holding the ban list (vanilla)
secure1 enables the server's built-in cheat protection
languageLanguage of server messages (for example en-US or fr-FR)
maxplayers=16
password=MyPassword
motd=Welcome to our Terraria server!

Raise maxplayers in line with your plan: see the guidelines in Getting started.

Leave the network settings alone

Leave the port= line at the value set by the panel: the server must listen on the assigned port, otherwise it will be unreachable. The upnp setting is useless on a hosted server.

With TShock

TShock also reads serverconfig.txt, but some settings (password, number of slots, port…) also exist in its own tshock/config.json file and may take precedence there. If a value seems to be ignored on a TShock server, check that file. See Administration and TShock.

Advanced settings​

KeyRole
npcstreamReduces enemy "skipping" on screen by sending more data (default value recommended)
priorityServer process priority: keep the default value

Journey mode permissions​

On a Journey world, Journey powers (freeze time, god mode, weather, difficulty, enemy spawn rate…) are controlled by journeypermission_… lines, for example:

journeypermission_time_setfrozen=2
journeypermission_godmode=2
journeypermission_setdifficulty=2

According to the values usually documented in the file: 0 locks the power for everyone, 1 restricts it to the host, 2 allows it for every player. On a dedicated server there is no in-game "host", so use 0 or 2. Check the exact list of keys in the comments of your serverconfig.txt.

Changing a setting without restarting (vanilla)​

A few values can be changed from the panel Console for the current session:

password MyNewPassword
motd New welcome message

To make a change permanent, copy it into serverconfig.txt. See all commands in Administration and TShock.

What's next?​