Generate a Terraria serverconfig.txt
Terraria's config file is easy to write and just as easy to have ignored, since the server will not go looking for it unless told to.
Visual Settings
serverconfig.txt
Advertisement
The serverconfig.txt format
Nothing but key=value lines, unquoted. Two settings do most of the work — the path to the world and autocreate — and together they can bite: if the path names a world that is not there and autocreate is switched on, you get a newly generated world rather than your save, with no warning.
Advertisement
The mistake that wastes an evening
Unless the launch command explicitly passes a config argument naming this file, the server never opens it. Launched plainly, it walks you through its own interactive setup instead. That is the whole story behind 'I edited the config, restarted, and nothing changed'.
Starting the server with the file
Pass the file explicitly: TerrariaServer.exe -config serverconfig.txt on Windows, or ./TerrariaServer.bin.x86_64 -config serverconfig.txt on Linux. Put that in the start script once and the interactive setup never appears again, which is also the sign that the file is being read.
Where worlds are kept
By default, worlds live in Documents\My Games\Terraria\Worlds on Windows and ~/.local/share/Terraria/Worlds on Linux, under the account that runs the server. The world line needs the full path to the .wld file, including the folder, not just the world's name. Get it wrong with autocreate on and you will be playing in a brand-new world within a minute.
Settings that only apply once
worldname, autocreate and seed are only used when the server generates a new world. Once a world exists and world points at it, changing them does nothing, so pick the size and seed you want before the first start.