Skip to content

tModLoader Config Editor: serverconfig.txt Made Simple

Edit your tModLoader server's serverconfig.txt from a grouped form with inline tips and two one-click presets, without hand-editing a key-value text file. BETA feature.

Level
beginner
Read
7 min
Updated
By
Bradford

Every tModLoader dedicated server reads a file called serverconfig.txt for the handful of server-side settings that are not already covered by the Startup tab, things like whether secure anti-cheat mode is on, how often distant NPC positions stream to clients, the OS process priority the server runs at, and whether it tries to forward its own port over UPnP. On a tModLoader server you host with Loafhosts, you do not have to open that file by hand to change any of it. The Config Editor reads serverconfig.txt, lays the relevant settings out as a grouped form with a tip under each one, and gives you two one-click presets that retune the file for you. This guide explains exactly what the tModLoader Config Editor does, how to open it, what each group covers, how the presets work, why a couple of fields are locked, and when a change actually takes effect. This is a BETA feature.

What the tModLoader Config Editor Does

The Config Editor is a form-based editor for one file: serverconfig.txt, the key-value config tModLoader reads at boot. Instead of a raw text file of key=value lines, it shows you a labelled control for each setting, a dropdown, a number field, or an on/off toggle depending on what the setting expects, with a short explanation underneath. Only the fields the editor exposes are ever touched; anything else in the file is left as-is when you save.

Your input is validated before anything is written: enum fields must be one of the listed choices, the NPC stream rate must be a whole number in range, and toggles are written as on or off. If a value fails validation, the save is rejected with a message and the on-disk file is left exactly as it was.

Note: The Config Editor edits serverconfig.txt only, the file tModLoader reads for the settings not already set on the Startup tab.

Note: Values are checked against an allowed range or list before saving, so a bad entry is caught before it reaches the server.

Note: This is a BETA feature.

Opening the Config Editor

The editor appears automatically on tModLoader servers. Open your server in the Loafhosts panel and look in the left sidebar under the Game section, you will see a Server Config item. Click it to open the Config Editor page, titled “tModLoader Config Editor”. The page loads over your normal server view, so your sidebar and the live status header at the top stay in place while you work.

The item only shows up on a tModLoader server; on any other server type it is hidden. If your server has never started, serverconfig.txt will not exist on disk yet, since it is written by the install step. Start the server once so the file exists, then come back.

Tip: The Server Config item lives in the Game section of the server sidebar.

Tip: If the editor says no settings were found, start the server once so the install step writes serverconfig.txt, then reopen the editor.

Why Some Common Settings Aren’t Here

If you are expecting to find World Name, Max Players, Server Password, MOTD, Language, or World Size in this editor, you will not, and that is deliberate rather than a gap. All of those are passed as command-line flags in the server’s startup command from the Startup tab, and command-line flags always win over whatever is written in serverconfig.txt. Exposing them here as editable fields that get silently overridden the moment the server restarts would be misleading, so the Config Editor’s schema deliberately leaves them out. Difficulty is the one exception worth knowing: there is no -difficulty startup flag, so the World group’s Difficulty field here is the setting that actually applies (only on new-world creation, since difficulty has no effect on a world that already exists).

Note: World Name, Max Players, World Size, Server Password, MOTD, and Language live on the Startup tab, not here, because the startup command always overrides the file for those.

How the Settings Are Grouped

The form splits serverconfig.txt into three groups:

  • World: Difficulty (the world’s difficulty when a world is auto-created; 0 Classic, 1 Expert, 2 Master, 3 Journey), World seed (used only when the server auto-creates a new world; leave blank for a random seed), and World save directory (where world files are stored on the server filesystem).
  • Server: Ban list file (the filename the server uses for its ban list), Secure mode (additional server-side anti-cheat checks), NPC stream rate (how often distant NPC positions are sent to clients; lower reduces bandwidth but increases visible enemy skipping, valid 0 to 255), and Process priority (the OS process priority the server runs at, 0 Realtime through 5 Idle).
  • Network: Automatic UPnP port forwarding (whether the server tries to forward its own port on your router via UPnP).

Each setting carries a one-line tip explaining what it does and, where relevant, what trade-off it makes.

Tip: A short explanation sits under every setting’s label.

Tip: Difficulty here only matters if you have not generated your world yet, or intend to generate a brand-new one; it does not retune an existing world.

One-Click Presets

If you would rather not tune fields by hand, the editor offers two presets at the top of the page:

  • Recommended: turns on Secure mode, turns off Automatic UPnP, and sets Process priority to Normal (3). This is a sensible default for most public or semi-public servers.
  • Lower bandwidth: sets the NPC stream rate down to 30 and Process priority to Above Normal (2), for servers where connection quality or bandwidth is the bigger concern than absolute NPC responsiveness.

Applying a preset writes that preset’s values in a single save. Neither preset touches the World group, so applying one never affects your world seed or save directory.

Note: Neither preset touches world settings, so applying one is always safe on an existing world.

Locked Settings and Why They Are Read-Only

Two settings, the server port and the server password, are shown with a locked tag and cannot be edited from this form. They exist in the schema purely as a safety net: because port and password are already managed from the server’s allocation and the Startup tab’s Server Password field, and the startup command’s -port and -password flags always win over the file at boot, any value written here would be silently overridden the moment the server restarts. The lock is enforced, not just a hint, so the editor will not write these fields under any circumstances.

Note: Port and password are locked because the Startup tab’s values always override whatever is in the file.

Tip: To change your server’s password, use the Server Password field on the Startup tab, not this editor.

How Changes Apply

After you make changes, click Save changes. The editor writes only the settings you changed to serverconfig.txt. Because tModLoader reads serverconfig.txt at boot, your changes are not live until the server reads the file again.

  • Secure mode, NPC stream rate, process priority, UPnP, ban list filename, world save directory, world seed: apply on the next restart.
  • Difficulty: only takes effect if a new world is generated after you save it; it does not change the difficulty of a world that already exists.

The save itself only changes the file. Nothing is applied until you restart, so you can make several edits, save, and then do a single restart to bring them all in at once.

Note: Saving writes the file but does not apply the change; restart the server to load the new settings.

Putting It Together

The tModLoader Config Editor turns the parts of serverconfig.txt that are actually yours to tune (secure mode, NPC stream rate, process priority, UPnP, and new-world difficulty) into a guided form with plain-English tips, two presets that cover the common cases in one save, and validation that stops bad values before they reach disk. Port and password stay locked because the Startup tab already owns them, and everything else (world name, player cap, MOTD, and language) lives on the Startup tab for the same reason: the startup command always has the final say. Pick a preset, adjust anything you care about, save, and restart, and your tModLoader server picks up the change on its next boot.

Rate this guide

Tap a star, it helps us decide what to write (and fix) next.