Terraria

Terraria Server Settings: serverconfig.txt Explained

A Terraria dedicated server can ask its questions at every start, or read the answers from one text file. Here is every line of serverconfig.txt and what it changes.

TheGameHosting Team 5 min read
Terraria serverconfig.txt Explained
Background: Terraria © Re-Logic

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:

  1. One setting per line, as key=value, with no spaces around the =.
  2. A # at the start of a line turns it into a comment. To switch a setting off, add # in front of it.

World settings

SettingValuesWhat it does
worldPath to a .wld fileLoads that world and starts the server
autocreate1 small, 2 medium, 3 largeCreates a new world if none is found
worldnameTextName of the world created by autocreate
seedTextSeed used with autocreate
difficulty0 normal, 1 expert, 2 master, 3 journeyMode of a world created by autocreate
worldpathFolder pathWhere 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

SettingValuesWhat it does
maxplayers1 to 255Player slots. The wiki gives 16 as the default since 1.4.0.1
portNumberPort to listen on; 7777 by default
passwordTextPassword players type to join
motdTextMessage of the day shown on join
secure1Adds extra cheat protection
banlistFile pathBan list file; banlist.txt by default
languageen-US, de-DE, it-IT, fr-FR, es-ES, ru-RU, zh-Hans, pt-BR, pl-PLServer language
upnp1Tries to forward ports automatically on a home router
npcstreamNumber, 0 offLower means less NPC skipping but more data sent
priority0 realtime to 5 idleProcess 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:

SettingPower
journeypermission_godmodeGod mode
journeypermission_time_setfrozenFreeze time
journeypermission_time_setspeedTime speed
journeypermission_setspawnrateEnemy spawn rate
journeypermission_setdifficultyDifficulty slider
journeypermission_increaseplacementrangePlacement 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

  1. Make a backup of the world in Backups.
  2. Stop the server from Console.
  3. Open Files and click serverconfig.txt to edit it in the browser.
  4. Change the lines you need, for example maxplayers=12 and password=caverns2026.
  5. Save the file and start the server.
  6. Join with Multiplayer, Join via IP, and check the password and the message of the day.

A full example file:

serverconfig.txt
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

ProblemFix
Server asks questions instead of loading the worldIt is not started with -config, or the path to the file is wrong
A new world appearsThe world path is wrong, so autocreate made a new one
Difficulty did not changedifficulty only applies to new worlds
Friends on phones or consoles cannot joinSee Terraria server crossplay
You want plugins or modsTShock 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