Published on · last updated on
Structure of the serverconfig.txt
The file consists of key=value lines and sits in the server directory. You edit it via the config editor in the web interface or via WebFTP/SFTP. tModLoader uses exactly the same format as Vanilla.
worldname=My World
maxplayers=8
port=7777
password= Terraria server hosting from €3.99 / month
Prepaid without a contract, DDoS protection up to 250 Gbit/s.
View plans & pricesLoad a world or generate one automatically
There are two ways: load an existing world or have a new one generated. For an existing world, set world= to the path of the .wld file (see upload a world). For a new world, use autocreate:
autocreate=3 # 1=small, 2=medium, 3=large
seed=myseed # optional world seed
worldname=My World Set the difficulty
The difficulty value determines the world mode:
difficulty=0- Classic (normal)difficulty=1- Expertdifficulty=2- Masterdifficulty=3- Journey mode
The value applies when a new world is created automatically. Existing worlds keep the mode they were created with.
Port, slots & password
With port (default 7777), you set the game port - what counts is the port shown in the panel. maxplayers sets the number of slots, password protects joining and motd defines the welcome message. After changes, a server restart is required.
A word about the port, because it regularly causes confusion: 7777 is only Terraria's default. Your server has a fixed address made up of IP and port, both shown in the web interface. Enter the port shown there in the configuration - and give your fellow players both together, in the form 123.123.123.123:7777. Details under join a server.
An empty password= means: anyone who knows the address can join. Terraria has no whitelist in the proper sense; the password is the only built-in protection. How to lock the server down beyond that is explained under make your server private.
All important values at a glance
| Key | Example | Effect |
|---|---|---|
world | My World.wld | Path to the existing world. If set, autocreate is ignored. |
autocreate | 3 | Generates a new world if there is none under world. 1=small, 2=medium, 3=large. |
worldname | My World | Name of the newly generated world. Does not change an existing world. |
difficulty | 1 | World mode, only effective at generation. |
seed | myseed | Optional seed. Secret seeds such as for the worthy work here too. |
maxplayers | 8 | Simultaneous players. Takes effect right after a restart, on existing worlds too. |
port | 7777 | Game port. Has to match the port from the web interface. |
password | secret | Join password. Empty = open to everyone. |
motd | Welcome! | Message on joining. |
secure | 1 | Activates Terraria's own anti-cheat. |
upnp | 0 | Not needed on a rented server - the panel takes care of port forwarding. |
Why do my changes not take effect?
Almost always, one of three reasons is behind it, and all three are quickly checked:
- No restart. Terraria only reads the file at startup. As long as the server is running, nothing changes - no matter how often you save.
- The value only applies at world generation.
difficulty,seedand the world size fromautocreateare fixed once when the world is created. On an existing world, they have no effect. If you really want to change the mode, you need a new world - see Journey mode. worldoverridesautocreate. If there is a world under the given path, the server loads it and ignores all generation parameters. That is the most common case when a new world simply refuses to appear.
A fourth, rarer case: spaces around the equals sign. maxplayers = 8 is not read reliably, maxplayers=8 is. Write the lines without spaces and do not put comments after the value - the # for comments belongs at the start of the line.
Frequently asked questions
Rent your own Terraria server
Vanilla, TShock or tModLoader with Calamity & co., mods & plugins of your choice, your own worlds & config editor - prepaid, made in Germany.
View plans & pricesTerraria server hosting
from €3.99 / month
Prepaid without a contract, DDoS protection up to 250 Gbit/s, hosted in Frankfurt am Main.
View plans & pricesRead more
- Terraria server - overview
- Upload a world (.wld)
- Install tModLoader & Calamity
- Set up TShock & plugins
- Join a Terraria server
- Journey mode on the server
- Make your server private
- Update the server
Discover more