Terraria
Terraria serverconfig.txt Explained: Every Important Setting
Terraria reads its settings from serverconfig.txt. On a panel, some of these may be controlled through startup variables, so check both places if a change does not apply.
How it is used
The server starts with a command such as TerrariaServer -config serverconfig.txt. Lines starting with # are comments. Remove the # to enable a setting. Always stop the server before editing.
Important settings
- world: path to an existing world file, for example world=worlds/MyWorld.wld.
- autocreate: creates a world if none exists. 1 is small, 2 is medium and 3 is large.
- worldname: name for a newly created world.
- seed: seed for a newly created world.
- difficulty: world difficulty for new worlds. 0 is classic, 1 is expert, 2 is master and 3 is journey.
- maxplayers: the player limit. The default is commonly 8.
- port: the port to listen on. The default is 7777.
- password: password to join. Leave it blank for a public server.
- motd: message shown when a player joins.
- worldpath: folder where worlds are saved.
- banlist: file used for bans, such as banlist.txt.
- secure: set to 1 to enable extra anti-cheat checks.
- language: server language code, such as en-US.
- upnp: automatic port forwarding. This is not used on hosted servers.
- npcstream: how fast NPC data is sent. A lower value can reduce NPC lag for players on slow connections.
World size and existing worlds
If world points to an existing file, the server loads it and ignores autocreate and difficulty, which only affect new worlds. To change world size, you need a new world.
Apply changes
- Stop the server.
- Edit serverconfig.txt in the Files tab.
- Save and start the server.
- Watch the console for the world name and port to confirm it loaded.
Tips
- Set a password if you do not want strangers joining.
- Keep the port the same as the one assigned to your server.
- Check the exact options for your Terraria version, as keys can be added in updates.
Need help? Ask on Discord.