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

dedicatedserver.cfg
ownerswhitelist.txt

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
}
SettingDefaultDescription
ServerName"Sons Of The Forest Server"Name displayed in the server browser
MaxPlayers8Maximum players. Hard cap of 8 — cannot go higher
Password""Join password (up to 40 characters). Empty = public
LanOnlyfalseWhen true, the server only appears on LAN, not the public server list
{
  "GameMode": "Normal",
  "GameSettings": {
    "Gameplay.TreeRegrowth": true,
    "Structure.Damage": true
  }
}

Game Modes

ModeDescription
NormalStandard survival experience
HardTougher enemies, scarcer resources
HardSurvivalPermadeath — death deletes your character progress
PeacefulNo enemy spawns, relaxed survival
CreativeBuilding-focused, no survival threats
CustomUnlocks all granular settings (see Custom Difficulty tab)

GameSettings (Apply to Any Mode)

These global settings work regardless of which GameMode you pick:

SettingDefaultDescription
Gameplay.TreeRegrowthtrueCut trees regrow over time
Structure.DamagetruePlayer-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

SettingValuesDescription
EnemySpawntrue / falseToggle all enemy spawning
EnemyHealthLow / Normal / HighEnemy hit point pools
EnemyDamageLow / Normal / HighDamage enemies deal to players
EnemyArmourLow / Normal / HighEnemy damage resistance
EnemyAggressionLow / Normal / HighHow aggressively enemies hunt players
AnimalSpawnRateLow / Normal / HighFrequency of animal spawns
EnemySearchPartiesLow / Normal / HighFrequency and size of enemy patrols

Environment Settings

SettingValuesDescription
StartingSeasonSpring / Summer / Autumn / WinterSeason when the world starts
SeasonLengthShort / Default / Long / RealisticDuration of each season
DayLengthShort / Default / Long / RealisticLength of a full day/night cycle
PrecipitationFrequencyLow / Default / HighRain and snow frequency

Survival Settings

SettingValuesDescription
ConsumableEffectsNormal / HardSeverity of hunger/thirst damage
PlayerStatsDamageOff / Normal / HardDamage from spoiled food
ColdPenaltiesOff / Normal / HardCold effects on health and stamina regen
BuildingResistanceLow / Normal / HighStructure durability
ReducedFoodInContainerstrue / falseLess food in world containers
SingleUseContainerstrue / falseContainers can only be looted once
PlayersImmortalModetrue / falsePlayers cannot die
OneHitToCutTreetrue / falseTrees fall in a single hit

Multiplayer Settings

SettingValuesDescription
Cheatstrue / falseEnable console commands for admins
PvpDamageNormalPlayer vs player damage scaling
{
  "SaveSlot": 1,
  "SaveMode": "Continue",
  "SaveInterval": 600,
  "IdleDayCycleSpeed": 0.0,
  "IdleTargetFramerate": 5,
  "ActiveTargetFramerate": 60,
  "LogFilesEnabled": false
}
SettingDefaultDescription
SaveSlot1Which 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)
SaveInterval600Seconds between auto-saves. Lower = less data loss on crash but more disk I/O
IdleDayCycleSpeed0.0Time speed when no players are online. 0.0 = paused, 1.0 = normal speed
IdleTargetFramerate5FPS cap when no players are connected. Saves CPU while idle
ActiveTargetFramerate60FPS cap with players online. Minimum 10
LogFilesEnabledfalseEnable server log files for debugging

Tip: Keep IdleDayCycleSpeed at 0.0 and IdleTargetFramerate at 5 to save resources when the server is empty.

PortProtocolPurpose
8766UDPGame traffic (gameplay netcode)
27016UDPSteam query (server browser discovery)
9700UDPBlobSync (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
}
SettingDescription
SkipNetworkAccessibilityTestSkip 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:

76561198012345678

Restart 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:

CommandDescription
godmode on/offToggle invincibility
invisible on/offEnemies can't detect you
addallitemsAdd 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/offDisable all enemy AI

How is this guide?

40% Off — Limited TimeGet your Sons Of The Forest server todayInstant setup, DDoS protection, and 24/7 support included.
Get a Server

On this page