Editing serverconfig.txt: world, players, password and difficulty
A plain-English guide to the serverconfig.txt file that controls your Terraria or tModLoader dedicated server, including which world loads, max players, the join password, and difficulty.
3 min read · Updated Sep 24, 2026 · By GuavaHost Team
A Terraria dedicated server reads its settings from a file called serverconfig.txt. The same file works for tModLoader. You can edit it on the Server properties page of your control panel, and editing it lets you set exactly which world loads, how many people can join, the password, and the world difficulty.
Open the file
- Sign in at customer.guavahost.com, open My servers and click Manage on your server.
- Choose Server properties under Game tools in the server menu. It opens
serverconfig.txtfor you, with a box for each setting and a search box to find one by name. - Change what you need and click Save changes.
Prefer the raw file? It is serverconfig.txt in the main server folder on the Files tab. Each setting is one line in the form name=value, and a line starting with # is a comment and is ignored.
Before a big change, take a snapshot on the Backups page so you can roll back if a value is wrong.
The settings you will actually use
world=The full path to the.wldworld file you want to load, for exampleworld=/home/container/.local/share/Terraria/Worlds/Main.wld. When this points at a real file, the server loads that world every time.autocreate=Only used when the world above does not exist yet.1makes a small world,2medium,3large.worldname=The name given to a newly created world.seed=An optional world seed for a new world, the same kind of seed you would type in single player.difficulty=The difficulty of a newly created world:0for Classic (Normal),1for Expert,2for Master,3for Journey.maxplayers=How many players can be connected at once, for examplemaxplayers=8.password=The join password. Leave it blank for an open server, or setpassword=yoursecretto lock it down.port=The port the server listens on. Leave this matching the port shown at the top of your server page and in the Ports & network card on the Overview tab.motd=A short message shown to players when they join.
Important: difficulty and seed only apply to new worlds
Changing difficulty or seed does nothing to a world that already exists. Those values are only read when the server creates a brand new world. To use them, point world= at a file that does not exist yet (or move your old world aside), and let the server generate a fresh one.
Startup settings versus the file
Many GuavaHost setups expose the common options, like world name, max players, and password, as fields under Startup settings on the server's Settings tab. If yours does, prefer setting them there (click Save next to each one), because the panel can rewrite serverconfig.txt from those fields each time the server boots and overwrite hand edits. If a setting is not offered under Startup settings, edit serverconfig.txt directly.
Apply your changes
The server only reads serverconfig.txt when it starts. After you save, press Restart at the top of the server page, then watch the log on the Console tab to confirm the world loads and the settings took effect.
Troubleshooting
- Server made a new empty world instead of loading yours: the
world=path is wrong or the file is not there. Copy the exact path from the Files tab and paste it intoworld=. - Password not working: check
password=for stray spaces, and remember the server must be restarted after a change. - Difficulty did not change: the world already existed. Difficulty only applies when a world is first created.
- Players cannot connect after editing
port: put it back to match the port shown at the top of the server page.
Still stuck? Jump into our Discord at discord.gg/GuavaHost and the team will help you out.
- terraria
- tmodloader
- serverconfig
- settings
- difficulty
Host a Terraria server From $2.49/mo, with instant setup and DDoS protection.
Still need help? Our team is online 24/7 to answer questions.