Terraria serverconfig.txt Explained: Every Setting and Value
Terraria's dedicated server reads serverconfig.txt at startup; on ChicagoServers that is the Server config file on the Configs tab. The keys that matter most are world (which world file to load), autocreate and worldname (to generate a new one), difficulty, maxplayers, port (7777 by default) and password. A line that starts with # is a comment and is ignored, so remove the # to enable a setting.
Everything here was checked against the Terraria Wiki's server page, which documents Desktop 1.4.5.x (1.4.5 was released 27 January 2026; the latest listed is 1.4.5.8), on 2026-11-01. Terraria's server is simple, but a few values are easy to get wrong, and those are called out below.
world=loads an existing world file (on ChicagoServers, pick the world on the Worlds tab);autocreate=(1 small, 2 medium, 3 large) only creates one if none is found.difficulty=,seed=andworldname=only apply when a world is being auto-created (the New world size / difficulty / seed and World name fields on the Startup tab). Values: 0 Classic, 1 Expert, 2 Master, 3 Journey.maxplayersmust be between 1 and 255 in the file, but on ChicagoServers the player slots come from your plan. The game's default port is TCP 7777; the panel assigns your port.- Anything starting with
#is a comment, and a commented line does nothing. - Stop the server with Stop at the top of the page (or the
exitcommand on the Console tab) so the world is saved.
On this page
Where serverconfig.txt is used and how to edit it
On your own Windows machine, start-server.bat starts the server using serverconfig.txt; on Linux you run ./TerrariaServer.bin.x86_64 and can point at the file with -config. You do none of that on ChicagoServers: the panel starts the server, and you edit the file on the Configs tab. Many of the same options can also be passed as command-line parameters; the table below lists both forms where the wiki documents one.
- Sign in at panel.chicagoservers.co, open your server, then the Configs tab.
- Pick Server config from the list (Ban list and, on a TShock server, TShock config are listed too).
- Edit in the Settings view for the common settings, or switch to Text for the whole file.
- Click Save, then Restart at the top of the page.
# serverconfig.txt - a lightly annotated working example
world=/home/terraria/.local/share/Terraria/Worlds/MyWorld.wld
autocreate=2
worldname=MyWorld
difficulty=0
maxplayers=16
port=7777
password=ChangeThis
motd=Welcome to the server
secure=1
language=en-USAll serverconfig.txt keys
| Key | What it does | Command-line form | On ChicagoServers |
|---|---|---|---|
world= | Path to a world file to load. The server starts straight into it. | -world | Pick the world on the Worlds tab |
autocreate= | Creates a world if none is found at that path. 1 = small, 2 = medium, 3 = large. | -autocreate | New world size / difficulty / seed on the Startup tab (size) |
seed= | Seed for the auto-created world. | -seed | New world size / difficulty / seed on the Startup tab |
worldname= | Name of the auto-created world. | -worldname | World name on the Startup tab |
difficulty= | Difficulty of the auto-created world: 0 Classic, 1 Expert, 2 Master, 3 Journey. | none listed | New world size / difficulty / seed on the Startup tab |
maxplayers= | Player limit, 1 to 255. The wiki gives 16 as the default (8 before 1.4.0.1). | -maxplayers or -players | Player slots come from your plan |
port= | Listening port. Default 7777 (TCP). | -port | Assigned by the panel (Startup tab, Network) |
password= | Server password. Leave empty for none. | -password or -pass | Join password on the Startup tab |
motd= | Message of the day shown on join. | -motd | Message of the day on the Startup tab |
worldpath= | Folder where world files are stored. | none listed | Managed by the panel |
banlist= | Path of the ban list. Defaults to banlist.txt in the working directory. | -banlist | Edit the Ban list file on the Configs tab |
secure= | 1 adds additional cheat protection. | -secure | Cheat protection on the Startup tab |
language= | Server language code (see below). | none listed | Server config on the Configs tab |
upnp= | 1 forwards ports automatically with UPnP. Irrelevant on a hosted server. | -noupnp disables it | Not needed; the panel assigns your port |
npcstream= | Reduces enemy skipping at the cost of more bandwidth. 0 turns it off; the wiki's example is 60. | none listed | Server config on the Configs tab |
priority= | Process priority: 0 Realtime, 1 High, 2 AboveNormal, 3 Normal, 4 BelowNormal, 5 Idle. | -forcepriority | Server config on the Configs tab |
Other command-line options from the wiki include -ip (address to listen on), -steam and -lobby friends|private (Steam join support), -disableannouncementbox, and -announcementboxrange (use -1 for server-wide messages). Launch options are staff-only on ChicagoServers, so for one of these with no Startup field, contact support.
How world, autocreate and difficulty interact
This is where most confusion comes from. There are two ways to give the server a world, and they behave differently:
- Existing world:
world=points to the file (on ChicagoServers, choose it on the Worlds tab). The server loads it and keeps its type.difficulty,seedandworldnameare ignored. - New world:
autocreate=is set andworld=points to a file that does not exist yet. The server generates a world usingworldname,seedanddifficulty, and saves it to that path. On ChicagoServers these are the World name and New world size / difficulty / seed fields on the Startup tab.
That means changing difficulty on a server that already has a world does nothing. You would need to create a new world with a new World name, or remove the old world file on the Files tab (take a backup first on the Backups tab). World size values are 1 for small, 2 for medium and 3 for large.
Journey is difficulty=3, which the wiki notes was added alongside Master in Desktop 1.4.0.1. Journey worlds have their own per-power permission keys, covered in the difficulty and Journey guide.
Three common setups
These put the rules above together. They are game-level examples of what the file looks like; on ChicagoServers the world, port, password and player count are set from the Worlds tab, the Startup tab and your plan. All values are examples.
# 1. Load an existing world, no auto-creation
world=/home/terraria/.local/share/Terraria/Worlds/MyWorld.wld
maxplayers=16
port=7777
password=ChangeThis
motd=Welcome back# 2. Create a new large Expert world the first time, then reuse it
autocreate=3
worldname=Expert1
difficulty=1
seed=hello
world=/home/terraria/.local/share/Terraria/Worlds/Expert1.wld
maxplayers=10
port=7777# 3. Public server with extra cheat protection and more bandwidth for smoother enemies
world=/home/terraria/.local/share/Terraria/Worlds/MyWorld.wld
secure=1
npcstream=60
maxplayers=16
language=en-USIn setup 2 the world is created once. On later starts the file exists, so the server loads it and difficulty, seed and worldname are not used again. Higher npcstream values reduce enemy skipping but cost bandwidth, so raise it only if players actually see skipping.
Language codes
The wiki lists these supported values for language=. Use them exactly:
| Code | Language |
|---|---|
en-US | English |
de-DE | German |
it-IT | Italian |
fr-FR | French |
es-ES | Spanish |
ru-RU | Russian |
zh-Hans | Chinese |
pt-BR | Portuguese |
pl-PL | Polish |
Ports, saving and stopping the server
- Port. The wiki says the server runs on TCP 7777 by default, and the port must be forwarded if you host from behind a router. On ChicagoServers the panel assigns your port (Startup tab, Network) and shows the address at the top of the server page, so you do not forward or change it.
- Autosave. The wiki says the server saves the world periodically but gives no interval. Since Desktop 1.4.5.0 the server also saves when the last player leaves.
- Stopping. Click Stop at the top of the server page: it saves the world and shuts the game down properly. In the Console tab,
exitalso saves, whileexit-nosavediscards recent changes.
Before a big edit, open the Backups tab, choose World and settings and click Back up now; Restore from Your backups if a bad edit corrupts something. The Terraria server hosting page lists what is included, such as free server backups and SFTP file access.
Common mistakes
- Leaving the
#in front of a key. The line is a comment and the server uses its default instead. - Expecting
difficultyto change an existing world. It only applies at creation. - Setting
maxplayersabove 255 or below 1, or assuming the example values in a sample file are defaults. They are examples. On ChicagoServers the player limit comes from your plan. - Typing a language name ("English") instead of a code (
en-US). - Pasting paths from sample files. Sample files often use Windows-style folders, and the examples here use Linux ones. On ChicagoServers choose the world on the Worlds tab instead of typing a path.
- Forgetting the version match. Players need a client on the same Terraria version as the server.
- Editing a value the panel controls. A password, message of the day or world name changed in the file is overwritten from the Startup tab at every start.
Frequently asked questions
What is the default port for a Terraria server?
7777 is the game's default; the Terraria Wiki says the server runs on TCP port 7777 unless changed with port= in serverconfig.txt or -port on the command line. On ChicagoServers the panel assigns your port (Startup tab, Network) and shows the address at the top of the server page.
Why does my Terraria server ignore the difficulty setting?
The difficulty setting only applies when the server creates a world. If a world file already exists, it keeps the difficulty it was created with. On ChicagoServers the difficulty is one of the New world size / difficulty / seed fields on the Startup tab.
What are the world size and difficulty values in serverconfig.txt?
autocreate: 1 small, 2 medium, 3 large. difficulty: 0 Classic, 1 Expert, 2 Master, 3 Journey.
How many players can a Terraria server hold?
The maxplayers setting accepts 1 to 255, and the Terraria Wiki lists 16 as the default (it was 8 before 1.4.0.1). On ChicagoServers the player slots come from your plan, and actual capacity depends on the server's resources.