How to Configure Your Sons of the Forest Server (dedicatedserver.cfg)
Complete Sons of the Forest server config reference — all JSON settings for server name, players, difficulty, custom game mode, saves, performance, and admin setup.
Sons of the Forest uses dedicatedserver.cfg — a JSON file that controls all server settings. This guide covers every setting including the granular Custom game mode options.
Server File Structure
How to Edit
Stop your server
Go to Console in the XGamingServer Panel and stop the server.
Open the config
Click Files in the sidebar and open dedicatedserver.cfg. This is a JSON file — make sure your edits maintain valid JSON syntax (quotes around strings, commas between fields).
Save and start
Click Save Content and start from Console.
Full Configuration Reference
{
"ServerName": "My SotF Server",
"MaxPlayers": 8,
"Password": "",
"LanOnly": false
}| Setting | Default | Description |
|---|---|---|
ServerName | "Sons Of The Forest Server" | Name displayed in the server browser |
MaxPlayers | 8 | Maximum players. Hard cap of 8 — cannot go higher |
Password | "" | Join password (up to 40 characters). Empty = public |
LanOnly | false | When true, the server only appears on LAN, not the public server list |
{
"GameMode": "Normal",
"GameSettings": {
"Gameplay.TreeRegrowth": true,
"Structure.Damage": true
}
}Game Modes
| Mode | Description |
|---|---|
Normal | Standard survival experience |
Hard | Tougher enemies, scarcer resources |
HardSurvival | Permadeath — death deletes your character progress |
Peaceful | No enemy spawns, relaxed survival |
Creative | Building-focused, no survival threats |
Custom | Unlocks all granular settings (see Custom Difficulty tab) |
GameSettings (Apply to Any Mode)
These global settings work regardless of which GameMode you pick:
| Setting | Default | Description |
|---|---|---|
Gameplay.TreeRegrowth | true | Cut trees regrow over time |
Structure.Damage | true | Player-built structures can take damage from enemies |
When GameMode is set to "Custom", you can fine-tune every aspect of the game via CustomGameModeSettings. These settings only apply to new saves — you can't change them on an existing world.
{
"GameMode": "Custom",
"CustomGameModeSettings": {
"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.BuildingResistance": "Normal",
"GameSetting.Survival.ReducedFoodInContainers": false,
"GameSetting.Survival.SingleUseContainers": false,
"GameSetting.Survival.CreativeMode": false,
"GameSetting.Survival.PlayersImmortalMode": false,
"GameSetting.Survival.OneHitToCutTree": false,
"GameSetting.Multiplayer.Cheats": false,
"GameSetting.Multiplayer.PvpDamage": "Normal"
}
}Enemy Settings
| Setting | Values | Description |
|---|---|---|
EnemySpawn | true / false | Toggle all enemy spawning |
EnemyHealth | Low / Normal / High | Enemy hit point pools |
EnemyDamage | Low / Normal / High | Damage enemies deal to players |
EnemyArmour | Low / Normal / High | Enemy damage resistance |
EnemyAggression | Low / Normal / High | How aggressively enemies hunt players |
AnimalSpawnRate | Low / Normal / High | Frequency of animal spawns |
EnemySearchParties | Low / Normal / High | Frequency and size of enemy patrols |
Environment Settings
| Setting | Values | Description |
|---|---|---|
StartingSeason | Spring / Summer / Autumn / Winter | Season when the world starts |
SeasonLength | Short / Default / Long / Realistic | Duration of each season |
DayLength | Short / Default / Long / Realistic | Length of a full day/night cycle |
PrecipitationFrequency | Low / Default / High | Rain and snow frequency |
Survival Settings
| Setting | Values | Description |
|---|---|---|
ConsumableEffects | Normal / Hard | Severity of hunger/thirst damage |
PlayerStatsDamage | Off / Normal / Hard | Damage from spoiled food |
ColdPenalties | Off / Normal / Hard | Cold effects on health and stamina regen |
BuildingResistance | Low / Normal / High | Structure durability |
ReducedFoodInContainers | true / false | Less food in world containers |
SingleUseContainers | true / false | Containers can only be looted once |
PlayersImmortalMode | true / false | Players cannot die |
OneHitToCutTree | true / false | Trees fall in a single hit |
Multiplayer Settings
| Setting | Values | Description |
|---|---|---|
Cheats | true / false | Enable console commands for admins |
PvpDamage | Normal | Player vs player damage scaling |
{
"SaveSlot": 1,
"SaveMode": "Continue",
"SaveInterval": 600,
"IdleDayCycleSpeed": 0.0,
"IdleTargetFramerate": 5,
"ActiveTargetFramerate": 60,
"LogFilesEnabled": false
}| Setting | Default | Description |
|---|---|---|
SaveSlot | 1 | Which save slot to use (1, 2, 3, 4...). Each slot is a separate world |
SaveMode | "Continue" | "Continue" = load existing save. "New" = create fresh world (auto-switches to Continue after first run) |
SaveInterval | 600 | Seconds between auto-saves. Lower = less data loss on crash but more disk I/O |
IdleDayCycleSpeed | 0.0 | Time speed when no players are online. 0.0 = paused, 1.0 = normal speed |
IdleTargetFramerate | 5 | FPS cap when no players are connected. Saves CPU while idle |
ActiveTargetFramerate | 60 | FPS cap with players online. Minimum 10 |
LogFilesEnabled | false | Enable server log files for debugging |
Tip: Keep
IdleDayCycleSpeedat0.0andIdleTargetFramerateat5to save resources when the server is empty.
| Port | Protocol | Purpose |
|---|---|---|
| 8766 | UDP | Game traffic (gameplay netcode) |
| 27016 | UDP | Steam query (server browser discovery) |
| 9700 | UDP | BlobSync (game state synchronization during player connect) |
All three ports must be accessible for the server to function. They are typically pre-configured by XGamingServer.
{
"IpAddress": "0.0.0.0",
"GamePort": 8766,
"QueryPort": 27016,
"BlobSyncPort": 9700,
"SkipNetworkAccessibilityTest": false
}| Setting | Description |
|---|---|
SkipNetworkAccessibilityTest | Skip the port check on startup. Set to true if the startup check fails but the server works fine |
Admin Setup
Sons of the Forest uses ownerswhitelist.txt to designate server owners/admins.
Find the player's Steam ID
Get their SteamID64 from steamid.io.
Edit ownerswhitelist.txt
In Files, open ownerswhitelist.txt. Add one SteamID64 per line:
76561198012345678Restart the server
Restart from Console. The listed players will have full admin access on next join.
Admins can use the in-game admin panel to kick, ban, teleport players, and promote/demote other admins. See Admin Commands if available.
Console Commands
With GameSetting.Multiplayer.Cheats set to true, admins can open the console by typing cheatstick and pressing F1:
| Command | Description |
|---|---|
godmode on/off | Toggle invincibility |
invisible on/off | Enemies can't detect you |
addallitems | Add every item to inventory |
settimeofday <0-23> | Set time of day |
season <name> | Change to summer/autumn/winter/spring |
killradius <number> | Kill all enemies within radius |
aidisable on/off | Disable all enemy AI |
Related Guides
How is this guide?
