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
| Key | Values | Default | Effect |
|---|---|---|---|
serverName | any string | Default Server | Name shown in the server browser. |
serverPlayers | 2–8 | 8 | Maximum concurrent players. |
difficulty | Peaceful | Normal | Hard | Normal | Cannibal aggression and resource drain rate. |
gameMode | New | Continue | New | Start fresh world or load existing save. |
saveSlot | 1–5 | 1 | Which of the 5 save slots to use. With New, this slot is overwritten. |
password | any string | (empty) | Players need this password to join. Empty = open server. |
adminPassword | any string | (empty) | Required to access in-game admin commands. |
serverIP | IP address | (auto) | Bind interface. Leave blank unless multi-homed. |
serverGamePort | port | 27015 | Main game traffic port. |
serverQueryPort | port | 27016 | Server-browser query port. |
serverSteamPort | port | 8766 | Steam 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
- Stop the server.
- Set
gameMode=ContinueandsaveSlot=<1-5>matching the slot of your save. - 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— notpeaceful. - Save slots are not chronological. If you set
saveSlot=2withgameMode=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.