What serverconfig.txt is and where to find it
The dedicated server is a separate download from the game - "Terraria Server 1.4.5.8" on the wiki's Server page - and the zip unzips to three folders: Windows, Linux and Mac. Each one contains the server program for that platform and its own copy of serverconfig.txt sitting next to it.
The file introduces itself in two comment lines: "#this is an example config file for TerrariaServer.exe" and "use the command 'TerrariaServer.exe -config serverconfig.txt' to use this configuration or run start-server.bat". The bundled start-server.bat runs exactly that command, and the wiki confirms the mechanism: "The config file must be called using the -config parameter." The name is not fixed - "The file can have any name" - and "relative paths will be resolved relative to the folder containing TerrariaServer.exe". Our test server, started with a config that set worldpath=testworlds, wrote its new world to a testworlds folder beside the server binary, which is that rule in action.
Two behaviours worth knowing before you edit it. First, every setting in the shipped file is commented out with a leading # except one - priority=1 - and the file's own instruction is to "remove the # in front of commands to enable them". Second, if you point -config at a file that is not there at boot, the server does not fail; it asks you its startup questions one by one, exactly as if no config file had been named (Server). That silent fallback is why a typo'd filename reads as "my config is ignored". The full install walk-through, including where to get the zip, is in our Terraria dedicated server setup guide.
Every setting in serverconfig.txt (Terraria Server 1.4.5.8)
Values and wording are the shipped file's own; where the wiki's Server page documents the same setting it is linked inline. The only line enabled as shipped is priority=1.
| Setting | Values | What it does |
|---|---|---|
world |
path to a .wld file | Loads that world and starts the server on it without asking any questions. If the file does not exist, autocreate builds a world at that path. |
autocreate |
1, 2, 3 | "Creates a new world if none is found. World size is specified by: 1(small), 2(medium), and 3(large)." There is no separate worldsize key - the number here is the size. Our test world, autocreate=1, came out 4200 by 1200 tiles: small. |
seed |
text or number | "Sets the world seed when using autocreate". A plain number is used as-is; the dotted 1.4.5 format lower on this page is parsed into size, difficulty, evil, special seeds and identifier. |
seed_celebration, seed_theconstant, seed_notthebees, seed_notraps, seed_fortheworthy, seed_remix, seed_drunk, seed_zenith |
0, 1 | "Sets special seed options, overrides the seed text if enabled. 0(disabled), 1(enabled)". One line per special seed, eight in total. |
worldname |
any name | "Sets the name of the world when using autocreate". |
difficulty |
0, 1, 2, 3 | "Sets the difficulty of the world when using autocreate 0(classic), 1(expert), 2(master), 3(journey)". A dotted seed overrides this - see the seed section. |
maxplayers |
1-255, example 8 | "Sets the max number of players allowed on a server. Value must be between 1 and 255". The default when unset is higher than the example: "The default max number of players is 16 (8 pre-1.4.0.1)" (Server). |
port |
default 7777 | "Set the port number". "The server runs on TCP port 7777 by default" (Server). |
password |
text | "Set the server password". The shipped example value is p@55w0rd. |
motd |
text | "Set the message of the day" - shown to players as they join. |
worldpath |
a folder | "Sets the folder where world files will be stored". Relative paths resolve against the server program's folder, which our test confirmed. |
worldrollbackstokeep |
default 2 | "Sets the number of rolling world backups to keep". This key is documented in the shipped file itself; the wiki's Server page does not carry it. |
banlist |
default banlist.txt | "The location of the banlist. Defaults to "banlist.txt" in the working directory." |
secure |
0, 1 | "Adds additional cheat protection." (Server; the shipped file's own comment line says the same with a stray typo.) |
language |
12 codes, default en-US | "Sets the server language from its language code": en-US, de-DE, it-IT, fr-FR, es-ES, ru-RU, zh-Hans, pt-BR, pl-PL, ja-JP, ko-KR, zh-Hant. |
upnp |
0, 1 | With 1, the server asks the router to open its port through UPnP at startup - that is what the setting's comment in the shipped file and its row on the wiki both describe, in the file's spelling "uPNP". The -noupnp command-line flag switches the behavior off. On many home routers and CGNAT lines UPnP still fails, so a manual forward of TCP 7777 remains the reliable route (Server). |
npcstream |
default 60 | "Reduces enemy skipping but increases bandwidth usage. The lower the number the less skipping will happen, but more data is sent. 0 is off." |
priority |
0-5 | "Default system priority 0:Realtime, 1:High, 2:AboveNormal, 3:Normal, 4:BelowNormal, 5:Idle". The one line enabled in the file as shipped: priority=1. |
slowliquids |
0, 1 | "Reduces maximum liquids moving at the same time. If enabled may reduce lags but liquids may take longer to settle." |
journeypermission_* |
0, 1, 2 | Fifteen keys, one per Journey Mode power. "0: Locked for everyone, 1: Can only be changed by host, 2: Can be changed by everyone" - the full table is next. |
The Journey Mode permission keys
Journey Mode is "a difficulty option that can be selected during character and world creation" (Journey Mode), which on a server means difficulty=3. Its powers are governed per player by fifteen journeypermission_ keys, all shipped commented out at 2. The file explains the scale in one line: "Journey mode power permissions for every individual power. 0: Locked for everyone, 1: Can only be changed by host, 2: Can be changed by everyone".
| Key | The power it governs |
|---|---|
journeypermission_time_setfrozen | Freezing time |
journeypermission_time_setdawn | Setting time to dawn |
journeypermission_time_setnoon | Setting time to noon |
journeypermission_time_setdusk | Setting time to dusk |
journeypermission_time_setmidnight | Setting time to midnight |
journeypermission_godmode | Godmode |
journeypermission_wind_setstrength | Setting wind strength |
journeypermission_rain_setstrength | Setting rain strength |
journeypermission_time_setspeed | Changing the speed of time |
journeypermission_rain_setfrozen | Freezing rain |
journeypermission_wind_setfrozen | Freezing wind |
journeypermission_increaseplacementrange | The extended placement range |
journeypermission_setdifficulty | The in-world difficulty slider |
journeypermission_biomespread_setfrozen | Freezing biome spread |
journeypermission_setspawnrate | The spawn rate slider |
Command-line equivalents
The shipped file documents its own command-line parameters in a comment block at the top, and the wiki's Command-line parameters page carries the same list plus one. Anything set on the command line does the same job as the matching config line:
| Config setting | Parameter | Documented as |
|---|---|---|
| - (names the file) | -config <file path> | "Specifies a configuration file to use" |
port | -port <number> | "Specifies the port to listen on." |
maxplayers | -players / -maxplayers | "Sets the max number of players." |
password | -pass / -password | "Sets the server password." |
motd | -motd <text> | "Set the server motto of the day text." - on the wiki's parameter page only; the shipped file's header does not list it. |
world | -world <file path> | Loads the world and starts the server. |
autocreate | -autocreate <number> | "Creates a world if none is found in the path specified by -world." Sizes 1 small, 2 medium, 3 large. |
banlist | -banlist <file path> | "Specifies the location of the banlist. Defaults to "banlist.txt" in the working directory." |
worldname | -worldname <world name> | "Sets the name of the world when using -autocreate." |
secure | -secure | "Adds additional cheat protection to the server." |
upnp (off) | -noupnp | Switches the UPnP port-opening behavior off. |
| - | -steam | "Enables Steam support." |
| - | -lobby friends / -lobby private | "Allows friends to join the server or sets it to private if Steam is enabled" |
| - | -ip <ip address> | "Sets the IP address for the server to listen on" |
priority | -forcepriority <priority> | "Sets the process priority for this task. If this is used the "priority" setting below will be ignored." |
| - | -disableannouncementbox | "Disables the text announcements Announcement Box makes when pulsed from wire." |
| - | -announcementboxrange <number> | "Sets the announcement box text messaging range in pixels, -1 for serverwide announcements." |
seed | -seed <seed> | "Specifies the world seed when using -autocreate" |
Three serverconfig.txt files you can copy
Each of these is a complete working file for one common case, built only from the keys above. Replace the example values with yours, save it next to the server program (or pass its path to -config), and remove nothing but the leading # marks you mean.
A private server for friends, password at the door, medium world:
world=worlds/friends.wld autocreate=2 worldname=FriendsWorld difficulty=0 maxplayers=8 port=7777 password=p@55w0rd motd=Welcome - build anywhere but the spawn. secure=1 upnp=1 priority=1
A Journey world with the sliders kept away from guests (host-only):
world=worlds/journey.wld autocreate=1 seed=1399440699 worldname=JourneyWorld difficulty=3 maxplayers=8 port=7777 journeypermission_time_setfrozen=1 journeypermission_godmode=1 journeypermission_setdifficulty=1 journeypermission_setspawnrate=1 journeypermission_biomespread_setfrozen=1 priority=1
Unlisted journeypermission keys keep the shipped default of 2 - everyone may change them. And a Master world for a hardened group:
world=worlds/master.wld autocreate=3 worldname=MasterWorld difficulty=2 maxplayers=8 port=7777 password=p@55w0rd secure=1 priority=1
The 1.4.5 seed format, tested on a real 1.4.5.8 server
Since 1.4.5.0, a seed can carry settings, not just a number. "A World Seed consists of five numbers, separated by periods" - size, then difficulty, then evil biome, then special world seeds, then the identifier. The wiki's example: "Inputting 1.4.5.123456 sets the settings to small world, Journey Mode and the identifier to 123456", "while not changing the currently selected evil biome". If the dots are wrong, nothing is parsed: "If the format is incorrect, the entire input will be used as the identifier."
The identifier is the part that actually varies worlds. It may be text, in which case it "is internally converted to a number using the CRC-32 algorithm" (the wiki's worked example: terraria1234 becomes 122398367), and its numeric values run "0000000000 through 2147483647". The special-seeds slot is a sum: Drunk 1, Not the Bees 2, For the Worthy 4, Celebration Mk 10 8, The Constant 16, Remix 32, No Traps 64, Zenith 128 (and Skyblock 256) - "The numbers of the respective special seeds are added when multiple are active at once". The whole input is capped at a "maximum length of 40 characters". The eight seed_* config keys above switch the same special seeds on without touching the seed text.
We ran the Linux build of Terraria Server 1.4.5.8 twice today with configs that differed only in the seed line, both with difficulty=3 and autocreate=1:
- With
seed=1.3.1.1234567890, the server announced "Terraria Server v1.4.5.8" and "Creating world - Seed: 1234567890, Width: 4200, Height: 1200, Evil: 0, Difficulty: 2". The dotted format was parsed - the final part became the identifier - and two parts overrode the config: the evil part picked corruption (Evil: 0) and the difficulty part produced Difficulty: 2, which is Master, not the Journey (3) the config asked for. - With
seed=1399440699, a plain number: "Creating world - Seed: 1399440699, Width: 4200, Height: 1200, Evil: -1, Difficulty: 3" - used as-is, no evil chosen (-1), and Journey honored straight fromdifficulty=3.
Both runs finished generating and reached "Listening on port 7817" and ": Server started". Two lessons for your config. First, the seed's difficulty digit runs one higher than the difficulty key's values: the wiki's example uses 4 for Journey, and our 3 built a Master world - so a dotted seed for a Journey world wants 4 in that slot. Second, when a dotted seed carries that part at all, it wins over difficulty= in the file; if you would rather the config decide, use a plain numeric seed. In our run the size still followed autocreate (small, 4200 by 1200), matching the seed's own first number of 1.
Does TShock use serverconfig.txt?
Everything on this page describes the vanilla dedicated server from Re-Logic's own zip. TShock is a different server distribution built on it: the current release, 6.2.1, is titled "TShock 6.2.1 for Terraria 1.4.5.8" on its releases page, and it keeps its settings in a config.json inside its own tshock folder, alongside an account and permission system the vanilla server does not have. The vanilla-versus-TShock choice, and where each comes from, is covered in the setup guide.
Editing a config file is the easy half of running a server: the machine still has to stay on, the port still has to reach the outside world, and the world still has to be backed up. The port forwarding guide covers the reachability half, and Terraria server not connecting covers the joins that fail anyway.
If you would rather have a server that stays online without running it yourself, ForgeWorld Gaming’s Terraria plan is Terraria Standard, 4 player slots, CA$8.99/month; the availability page shows whether orders are currently open. Other sizes and tiers are not available yet. Your server is set up automatically after payment. Current plans and prices are on the Terraria availability page.