Illustration for Sons of the Forest dedicatedserver.cfg Settings

Sons of the Forest dedicatedserver.cfg Settings

Set the Sons of the Forest dedicated server JSON: save slot, difficulty, visibility and custom rules without wiping the world.

dedicatedserver.cfg is strict JSON, read at startup, and it lives in the dedicated server user-data folder. It is not next to the executable. While SaveMode is New, every launch recreates that slot and throws away the previous world.

Where to edit, and what to copy first

The first boot creates the file, plus ownerswhitelist.txt, Saves and SonsGameSettings. Default path:

C:\Users\<user>\AppData\LocalLow\Endnight\SonsOfTheForestDS

If the start script contains -userdatapath, open that directory instead. Stop the process, copy the whole user-data folder off the machine, then edit. A word processor that replaces quotation marks will make the server refuse to start, and the console will say so.

No key is required. A missing key falls back to its default. Key order does not matter. Text is quoted; numbers and booleans are not. A comma after the last key is invalid. One bullet in the Steam Community guide mentions a semicolon. That is not valid JSON. Ignore it.

The installation guide covers SteamCMD and the first boot. This page assumes the file already exists.

Settings that actually change the session

Leave IpAddress at 0.0.0.0 unless you know which interface should listen. MaxPlayers is an integer from 1 to 8. Password can be up to 40 characters; an empty string leaves the server open. LanOnly: true removes it from Internet search.

SaveSlot is an integer of 1 or more. SaveMode accepts continue or new. The generated file writes Continue. In continue mode the slot loads if it exists and is created once if it does not. In new mode the slot is rewritten every time the server stops and starts again. Use new only for a disposable world, then switch back before players return.

GameMode accepts normal, hard, hardsurvival, peaceful, creative and custom. It is ignored when an existing slot is loaded. You cannot retune an inhabited island by rewriting this key. That needs a new slot, which means a new game.

SaveInterval is in seconds. IdleDayCycleSpeed is a multiplier from 0 to 1 when nobody is connected. IdleTargetFramerate is at least 1 and ActiveTargetFramerate at least 10. Logs go to the logs folder when LogFilesEnabled is true.

GameSettings applies in every mode. The source guide documents Gameplay.TreeRegrowth and Structure.Damage, both booleans. CustomGameModeSettings is read only when the mode is custom and the slot is created at that moment. On a save already running in continue mode, that block is skipped.

Custom mode: what the example file contains

Official example, only for a fresh slot:

"CustomGameModeSettings": {
  "GameSetting.Multiplayer.Cheats": false,
  "GameSetting.Multiplayer.PvpDamage": "Normal",
  "GameSetting.Vail.EnemySpawn": true,
  "GameSetting.Vail.EnemyHealth": "Normal",
  "GameSetting.Environment.StartingSeason": "Summer",
  "GameSetting.Environment.DayLength": "Default",
  "GameSetting.Survival.CreativeMode": false
}
KeyDocumented values
GameSetting.Multiplayer.Cheatstrue, false
GameSetting.Vail.EnemyHealth, EnemyDamage, EnemyArmour, EnemyAggression, AnimalSpawnRate, EnemySearchPartieslow, normal, high
GameSetting.Vail.EnemySpawntrue, false
GameSetting.Environment.StartingSeasonspring, summer, autumn, winter
GameSetting.Environment.SeasonLength and DayLengthshort, default, long, realistic
GameSetting.Environment.PrecipitationFrequencylow, default, high
GameSetting.Survival.ConsumableEffectsnormal, hard
GameSetting.Survival.PlayerStatsDamage, ColdPenalties, StatRegenerationPenaltyoff, normal, hard
GameSetting.Survival.BuildingResistancelow, normal, high
GameSetting.Survival.CreativeMode and PlayersImmortalModetrue, false

GameSetting.Multiplayer.PvpDamage appears in the example JSON, not in the allowed-values table. Leave it at Normal until you have compared it with a custom world created in the game. The source guide also names container food, single-use containers, cuttings and one-hit trees. Copy those key names from the guide instead of guessing.

Command line, validation, failures

Any key can be overridden at launch:

SonsOfTheForestDS.exe -dedicatedserver.ServerName "Friends island" -dedicatedserver.MaxPlayers "4"

If a control panel passes the same -dedicatedserver.* arguments, the file is ignored for those keys. Read the real launch command before deciding the JSON "does not apply".

After an edit: the self-test should pass, the browser name should be the new one, a non-owner should be able to join, and a restart should load the same slot. If the console says the configuration is invalid, restore the copy and change one key at a time. If it names an out-of-range value, that field is the one to fix. If the world is empty while Saves still exists, SaveMode is still new, or -userdatapath is not the folder you edited.

UDP ports and the network test are in the server not showing guide. Moving Saves is covered in the migration guide.

Edit dedicatedserver.cfg without hunting for the folder

Compare hosts that expose the config file, saves and the real launch command.

Common questions

Why did difficulty stay the same?
GameMode and CustomGameModeSettings are ignored when SaveMode loads a slot that already exists. You need a new SaveSlot, not a JSON edit on the current island.
Can the server go above 8 players?
The source guide limits MaxPlayers to an integer from 1 to 8. The command line can override the key, but it does not document a higher cap.
Can I put comments in the file?
No. The server JSON does not allow comments. Keep a dated copy beside the server if you need to remember why a key changed.

Source: Steam Community dedicated-server configuration guide by Dishmink and a collaborator, updated January 15, 2025 and reviewed October 31, 2026.

Our recommendation

Ready to launch your Sons of the Forest server?

Here are the best Sons of the Forest hosting deals right now, promo codes included. Still unsure? Our quiz finds the ideal host for you in under 2 minutes.

Budget

Sons of the Forest

OptiNAS

8.99€/month
-10% with code HOSTMYGAME
Max players:Unknown
Mods:
Yes

Specifications

RAM:8 Go

Compatible games

Sons of the Forest

Features

  • ✓Environ 6 joueurs
  • ✓Minimum : 3 vCPU et 8 Go de RAM
  • ✓Conseillé : 3 vCPU et 8 Go de RAM
  • ✓Plugins et mods possibles selon le jeu
  • +2 more features
Sons of the Forest dedicatedserver.cfg Settings | HostMyGame