Terraria server settings live in a plain text file, usually called serverconfig.txt, that the server reads when it starts with -config serverconfig.txt. Each line is key=value: world picks the world file, maxplayers the slots, password the join password, difficulty the mode and motd the welcome message. Lines that start with # are ignored. Stop the server, edit the file, save and start it again.
Without the file, the vanilla server asks the same questions in the console every time it starts. With it, the server boots straight into your world. Below is every setting from the official Terraria Wiki server page, with an example you can copy.
How the Terraria server reads its settings
The dedicated server takes the file with the -config <file path> launch option. A relative path is read from the folder that holds the server program. If the file is not found at boot, the server falls back to asking for each value in the console.
Two rules keep the file readable:
- One setting per line, as
key=value, with no spaces around the=. - A
#at the start of a line turns it into a comment. To switch a setting off, add#in front of it.
World settings
| Setting | Values | What it does |
|---|---|---|
world | Path to a .wld file | Loads that world and starts the server |
autocreate | 1 small, 2 medium, 3 large | Creates a new world if none is found |
worldname | Text | Name of the world created by autocreate |
seed | Text | Seed used with autocreate |
difficulty | 0 normal, 1 expert, 2 master, 3 journey | Mode of a world created by autocreate |
worldpath | Folder path | Where world files are stored |
difficulty and seed only matter when autocreate makes a new world. An existing world keeps the mode it was created with. If you want to bring the world you play on your PC, upload its .wld file and point world at it.
Player and connection settings
| Setting | Values | What it does |
|---|---|---|
maxplayers | 1 to 255 | Player slots. The wiki gives 16 as the default since 1.4.0.1 |
port | Number | Port to listen on; 7777 by default |
password | Text | Password players type to join |
motd | Text | Message of the day shown on join |
secure | 1 | Adds extra cheat protection |
banlist | File path | Ban list file; banlist.txt by default |
language | en-US, de-DE, it-IT, fr-FR, es-ES, ru-RU, zh-Hans, pt-BR, pl-PL | Server language |
upnp | 1 | Tries to forward ports automatically on a home router |
npcstream | Number, 0 off | Lower means less NPC skipping but more data sent |
priority | 0 realtime to 5 idle | Process priority on the machine |
On TheGameHosting the port is assigned by the panel. Leave port as it is and give your friends the address and port shown in your panel. upnp does nothing on a hosted server, since there is no home router to open.
Journey mode permissions
On a Journey world, fifteen settings decide who can use each power. Each one takes 0 (locked for everyone), 1 (only the host) or 2 (everyone). Some of the most used:
| Setting | Power |
|---|---|
journeypermission_godmode | God mode |
journeypermission_time_setfrozen | Freeze time |
journeypermission_time_setspeed | Time speed |
journeypermission_setspawnrate | Enemy spawn rate |
journeypermission_setdifficulty | Difficulty slider |
journeypermission_increaseplacementrange | Placement range |
The rest cover dawn, noon, dusk and midnight, wind, rain and biome spread. On a server, set the important ones to 0 or 1 so a guest cannot switch on god mode for everyone.
How to change your Terraria server settings
- Make a backup of the world in Backups.
- Stop the server from Console.
- Open Files and click
serverconfig.txtto edit it in the browser. - Change the lines you need, for example
maxplayers=12andpassword=caverns2026. - Save the file and start the server.
- Join with Multiplayer, Join via IP, and check the password and the message of the day.
A full example file:
world=worlds/Caverns.wld
autocreate=2
worldname=Caverns
difficulty=1
maxplayers=12
password=caverns2026
motd=Welcome! Be nice to the Guide.
secure=1
language=en-US
journeypermission_godmode=1
Console commands that change settings live
Some settings can be changed while the server runs, from the console, without a restart: password shows the password and password <text> changes it, motd <text> sets a new message, and maxplayers shows the slot limit. Other useful ones are save, kick <player>, ban <player>, dawn, noon, dusk, midnight and settle to settle liquids. Changes made this way do not touch serverconfig.txt, so copy them into the file if you want them to last.
Common problems
| Problem | Fix |
|---|---|
| Server asks questions instead of loading the world | It is not started with -config, or the path to the file is wrong |
| A new world appears | The world path is wrong, so autocreate made a new one |
| Difficulty did not change | difficulty only applies to new worlds |
| Friends on phones or consoles cannot join | See Terraria server crossplay |
| You want plugins or mods | TShock and tModLoader are separate server builds; see how to host a Terraria server |
Host your Terraria world on TheGameHosting
A server on your PC closes when your PC does. A Terraria server from TheGameHosting runs 24/7 on AMD 9950X and 7950X3D CPUs with DDR5 and NVMe, in Dallas or Amsterdam, with DDoS protection on every plan. You edit serverconfig.txt in Files or over SFTP, keep backups one click away and restart from Console. Terraria runs from the 2 GB plan at $1.90 USD a month with no per-player fees. See the plans and prices and use FULL2026 for 15% off for life.
FAQ
Where is the Terraria server config file?
It is a text file you pass to the server with -config, usually serverconfig.txt in the server folder. On TheGameHosting you open it in Files.
How do I change max players on a Terraria server?
Set maxplayers= to a number from 1 to 255 in serverconfig.txt and restart. Check the Startup tab too, in case the panel sets it.
How do I set a password on a Terraria server?
Add password=yourpassword to serverconfig.txt and restart, or type password yourpassword in the console for the current session.
Can I change the difficulty of an existing Terraria world?
Not with difficulty, which only applies when autocreate makes a new world. Journey worlds can use the in-game difficulty slider if permissions allow it.
Hosting for this game
Written by TheGameHosting Team, the people who run our servers in Dallas and Amsterdam and answer your tickets.
All posts
TheGameHosting Team
