Menu
 

server.cfg Configuration - The Forest Wiki

The Forest: server.cfg — Max Players, Difficulty & Save Slot

The Forest dedicated server is configured through a single server.cfg file plus optional command-line overrides. This guide covers the file location, the most-edited settings, and the gotchas that catch new admins.

Don't confuse this with Sons of the Forest. The Forest (original) uses server.cfg in INI-style key=value format. Sons of the Forest uses dedicatedserver.cfg in JSON format. Settings names overlap but the files are not interchangeable.

Where Is server.cfg?

On a Windows host, the dedicated server creates the config at:

C:\Users\<username>\AppData\LocalLow\SKS\TheForestDedicatedServer\ds\server.cfg

If the file doesn't exist yet, start the dedicated server once — it generates a default config on first launch. Then stop the server before editing.

The Settings That Actually Matter

KeyValuesDefaultEffect
serverNameany stringDefault ServerName shown in the server browser.
serverPlayers2–88Maximum concurrent players.
difficultyPeaceful | Normal | HardNormalCannibal aggression and resource drain rate.
gameModeNew | ContinueNewStart fresh world or load existing save.
saveSlot151Which of the 5 save slots to use. With New, this slot is overwritten.
passwordany string(empty)Players need this password to join. Empty = open server.
adminPasswordany string(empty)Required to access in-game admin commands.
serverIPIP address(auto)Bind interface. Leave blank unless multi-homed.
serverGamePortport27015Main game traffic port.
serverQueryPortport27016Server-browser query port.
serverSteamPortport8766Steam communication port.

Common Edits

Lower the Player Cap

If you're hosting a 4-friend campaign, drop serverPlayers=4. Reduces server-side memory and avoids randoms attempting to slot in.

Change Difficulty Mid-Campaign

Difficulty can be changed between sessions, but cannibals don't reset their aggression escalation. If you switch to Peaceful after 30 days, expect a quieter world but baked-in spawn timers persist until you start a new save.

Continue an Existing World

  1. Stop the server.
  2. Set gameMode=Continue and saveSlot=<1-5> matching the slot of your save.
  3. Restart the server.

Command-Line Overrides

Anything you can put in server.cfg can also be passed as a CLI flag, and command-line parameters override the config file. Useful for quick tests:

start TheForestDedicatedServer.exe -serverPlayers 4 -difficulty Hard -password mybase

Gotchas

  • Edit the file with the server STOPPED. Editing while running gets your changes overwritten when the server saves state on shutdown.
  • Difficulty values are case-sensitive. Peaceful, Normal, Hard — not peaceful.
  • Save slots are not chronological. If you set saveSlot=2 with gameMode=New, slot 2 is wiped. Always back up before changing slot config.
  • Port forwarding still applies. Even with the right config, players can't reach you if your firewall blocks 27015/27016 UDP.

For setup from scratch see Dedicated Server Setup. For console commands once you have admin access see Console Commands & Cheats.

Skip the AppData hunt. Host a The Forest server with Supercraft and edit your config from a web panel.

Tired of fighting this issue every patch?

Run a managed The Forest server with us — we handle the patches, mod-version pinning, save backups, and DDoS protection. Set up in 3 minutes, 5 datacenter regions, no contract.

See The Forest hosting plans →
Top