We are your new 5-Star Hosting Company. At least according to ★ Trustpilot

Following along with a Terraria server? Deploy yours in minutes.

All servers come with a 24-Hour Trial, Free Backups, and 40Gbps DDoS Protection included!

Use code SAVE15 to take 15% OFF Your First Invoice with ChicagoServers! Limited Time!
Terraria guide

Terraria serverconfig.txt Explained: Every Setting and Value

By the ChicagoServers team · Updated · 7 min read

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.

Quick answer
  • 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= and worldname= 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.
  • maxplayers must 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 exit command on the Console tab) so the world is saved.
On this page
  1. Where serverconfig.txt is used and how to edit it
  2. All serverconfig.txt keys
  3. How world, autocreate and difficulty interact
  4. Three common setups
  5. Language codes
  6. Ports, saving and stopping the server
  7. Common mistakes
  8. Frequently asked questions

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.

  1. Sign in at panel.chicagoservers.co, open your server, then the Configs tab.
  2. Pick Server config from the list (Ban list and, on a TShock server, TShock config are listed too).
  3. Edit in the Settings view for the common settings, or switch to Text for the whole file.
  4. Click Save, then Restart at the top of the page.
Example for a Linux server, for reference. On ChicagoServers the world, port, password and player count come from the Worlds tab, the Startup tab and your plan.
# 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-US

All serverconfig.txt keys

KeyWhat it doesCommand-line formOn ChicagoServers
world=Path to a world file to load. The server starts straight into it.-worldPick the world on the Worlds tab
autocreate=Creates a world if none is found at that path. 1 = small, 2 = medium, 3 = large.-autocreateNew world size / difficulty / seed on the Startup tab (size)
seed=Seed for the auto-created world.-seedNew world size / difficulty / seed on the Startup tab
worldname=Name of the auto-created world.-worldnameWorld name on the Startup tab
difficulty=Difficulty of the auto-created world: 0 Classic, 1 Expert, 2 Master, 3 Journey.none listedNew 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 -playersPlayer slots come from your plan
port=Listening port. Default 7777 (TCP).-portAssigned by the panel (Startup tab, Network)
password=Server password. Leave empty for none.-password or -passJoin password on the Startup tab
motd=Message of the day shown on join.-motdMessage of the day on the Startup tab
worldpath=Folder where world files are stored.none listedManaged by the panel
banlist=Path of the ban list. Defaults to banlist.txt in the working directory.-banlistEdit the Ban list file on the Configs tab
secure=1 adds additional cheat protection.-secureCheat protection on the Startup tab
language=Server language code (see below).none listedServer config on the Configs tab
upnp=1 forwards ports automatically with UPnP. Irrelevant on a hosted server.-noupnp disables itNot 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 listedServer config on the Configs tab
priority=Process priority: 0 Realtime, 1 High, 2 AboveNormal, 3 Normal, 4 BelowNormal, 5 Idle.-forcepriorityServer 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, seed and worldname are ignored.
  • New world: autocreate= is set and world= points to a file that does not exist yet. The server generates a world using worldname, seed and difficulty, 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.

Existing world
# 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
New Expert world
# 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
Public server
# 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-US

In 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:

CodeLanguage
en-USEnglish
de-DEGerman
it-ITItalian
fr-FRFrench
es-ESSpanish
ru-RURussian
zh-HansChinese
pt-BRPortuguese
pl-PLPolish

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, exit also saves, while exit-nosave discards 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 difficulty to change an existing world. It only applies at creation.
  • Setting maxplayers above 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.

We are your new 5-Star Hosting Company. At least according to ★ Trustpilot

Following along with a Terraria server? Deploy yours in minutes.

All servers come with a 24-Hour Trial, Free Backups, and 40Gbps DDoS Protection included!

We offer quality support, a detailed knowledgebase, video tutorials on most topics, and even live support in case you prefer a live human.

Use code SAVE15 to take 15% OFF Your First Invoice with ChicagoServers! Limited Time!