Home / Docs / Gameserver / Sons Of The Forest / Server Einstellungen

Sons of the Forest Server Settings

Every option in the Sons of the Forest dedicatedserver.cfg explained: ports, game mode, saving, password and custom game rules, with examples.

Quick answer: The settings live in dedicatedserver.cfg inside the server's user data folder. Despite the .cfg extension it is a JSON file. Restart the server after every change.

Where is dedicatedserver.cfg?

The server creates a user data folder on its first start. It contains:

  • dedicatedserver.cfg – the server settings
  • ownerswhitelist.txt – owners/admins (SteamID64, one per line)
  • SonsGameSettings.cfg – game settings
  • Saves/ – the save games

On Windows the default path is C:\Users\<user>\AppData\LocalLow\Endnight\SonsOfTheForestDS. The start parameter -userdatapath "path/to/folder" sets a different folder. On a rented game server you find the folder in the panel's file manager or via SFTP – the folder in use is shown in the start command under Startup (parameter -userdatapath).

The default configuration

{
  "IpAddress": "0.0.0.0",
  "GamePort": 8766,
  "QueryPort": 27016,
  "BlobSyncPort": 9700,
  "ServerName": "Sons Of The Forest Server (dedicated)",
  "MaxPlayers": 8,
  "Password": "",
  "LanOnly": false,
  "SaveSlot": 1,
  "SaveMode": "Continue",
  "GameMode": "Normal",
  "SaveInterval": 600,
  "IdleDayCycleSpeed": 0.0,
  "IdleTargetFramerate": 5,
  "ActiveTargetFramerate": 60,
  "LogFilesEnabled": false,
  "TimestampLogFilenames": true,
  "TimestampLogEntries": true,
  "SkipNetworkAccessibilityTest": false,
  "GameSettings": {},
  "CustomGameModeSettings": {}
}

No key is mandatory: a missing key falls back to its default, and the order does not matter. If the file is not valid JSON (a missing comma or quote, for example), the start-up self-test fails and the server does not start.

Network and ports

  • IpAddress – interface the server listens on. Default 0.0.0.0 (all). Leave it alone on a rented server.
  • GamePort – game traffic, default 8766 UDP.
  • QueryPort – Steam server list, default 27016 UDP.
  • BlobSyncPort – data sync of the game systems, default 9700 UDP.
  • LanOnly – true shows the server on the LAN only. Always false for a rented server.
  • SkipNetworkAccessibilityTest – skips the public IP and port checks at start-up. Expert-only according to the developer, not recommended.

On a rented server the ports are assigned for you. Do not change them in the file, or they will no longer match the open ports.

Name, slots and password

  • ServerName – name in the server list.
  • MaxPlayers – maximum number of players, 1 to 8.
  • Password – server password, up to 40 characters. Empty = no password.

Save game and game mode

  • SaveSlot – number of the save slot (1 or higher).
  • SaveMode – "Continue" loads the save in the slot, or creates it if it is missing. "New" creates a new game and overwrites the slot – on every restart, for as long as the value stays New. Switch it back to Continue after the first start.
  • GameMode – Normal, Hard, HardSurvival, Peaceful, Creative or Custom. Only applies when a new save is created; ignored when an existing save is loaded.
  • SaveInterval – seconds between autosaves, default 600 (10 minutes).

Idle and performance

  • IdleDayCycleSpeed – time speed while no player is online (0 to 1). Default 0.0: time stands still.
  • IdleTargetFramerate – server frame rate without players, default 5.
  • ActiveTargetFramerate – server frame rate with players, default 60 (minimum 10).

The defaults are sensible. Higher values do not improve gameplay but cost CPU.

Logs

  • LogFilesEnabled – true writes log files to <user data folder>/logs.
  • TimestampLogFilenames – true creates a new file sotf_log_<date>.txt per start, false always overwrites sotf_log.txt.
  • TimestampLogEntries – timestamp in front of every log line.

When troubleshooting, set LogFilesEnabled to true.

GameSettings: trees and building damage

GameSettings applies in every game mode. The official guide lists two keys:

"GameSettings": {
  "Gameplay.TreeRegrowth": true,
  "Structure.Damage": true
}
  • Gameplay.TreeRegrowth – felled trees grow back (triggered when sleeping).
  • Structure.Damage – buildings can be damaged.

CustomGameModeSettings: your own rules

Only used when "GameMode": "Custom" is set and a new save is created. Example from the official guide:

"CustomGameModeSettings": {
  "GameSetting.Multiplayer.Cheats": false,
  "GameSetting.Vail.EnemySpawn": true,
  "GameSetting.Vail.EnemyHealth": "Normal",
  "GameSetting.Vail.EnemyDamage": "Normal",
  "GameSetting.Vail.EnemyArmour": "Normal",
  "GameSetting.Vail.EnemyAggression": "Normal",
  "GameSetting.Vail.AnimalSpawnRate": "Normal",
  "GameSetting.Vail.EnemySearchParties": "Normal",
  "GameSetting.Environment.StartingSeason": "Summer",
  "GameSetting.Environment.SeasonLength": "Default",
  "GameSetting.Environment.DayLength": "Default",
  "GameSetting.Environment.PrecipitationFrequency": "Default",
  "GameSetting.Survival.ConsumableEffects": "Normal",
  "GameSetting.Survival.PlayerStatsDamage": "Off",
  "GameSetting.Survival.ColdPenalties": "Off",
  "GameSetting.Survival.StatRegenerationPenalty": "Off",
  "GameSetting.Survival.ReducedFoodInContainers": false,
  "GameSetting.Survival.SingleUseContainers": true,
  "GameSetting.Survival.BuildingResistance": "Normal",
  "GameSetting.Survival.CreativeMode": false,
  "GameSetting.Survival.PlayersImmortalMode": false,
  "GameSetting.FreeForm.ForcePlaceFullLoad": false,
  "GameSetting.Construction.NoCuttingsSpawn": false,
  "GameSetting.Survival.OneHitToCutTrees": false
}

Allowed values according to the guide:

  • Enemies (EnemyHealth, EnemyDamage, EnemyArmour, EnemyAggression, AnimalSpawnRate, EnemySearchParties): Low, Normal, High
  • StartingSeason: Spring, Summer, Autumn, Winter
  • SeasonLength, DayLength: Short, Default, Long, Realistic
  • PrecipitationFrequency: Low, Default, High
  • ConsumableEffects: Normal, Hard
  • PlayerStatsDamage, ColdPenalties, StatRegenerationPenalty: Off, Normal, Hard
  • BuildingResistance: Low, Normal, High
  • all other entries: true or false

Overriding settings with start parameters

Every value in the file can be overridden at start-up – handy if you don't want to edit the file:

SonsOfTheForestDS.exe -dedicatedserver.ServerName "My Server" -dedicatedserver.MaxPlayers "4"

Common mistakes

  • Server won't start after a change: check the JSON – separate every key/value pair with a comma, put text in quotes, no comma after the last entry.
  • Save game is gone: SaveMode was set to New. Set it back to Continue; only a backup can restore the overwritten slot.
  • Custom settings have no effect: they only apply to a new save with GameMode: Custom.

Source: official Endnight dedicated server guide (Steam, linked in the patch notes) · Rent a server: Sons of the Forest server at NexoraHost

Need a server?

Order Gameserver, VPS or Root in Frankfurt.

To shop