
A Sons of the Forest dedicated server takes all its settings from one file, dedicatedserver.cfg. It is plain JSON, and most of it you never need to touch. A few keys decide whether your world survives the next restart, though, so it pays to know what each one does.
Everything below comes from Endnight's official dedicated server guide on Steam (last updated 15 January 2025). Where the guide says nothing, we say so.
Where the file is
The server creates dedicatedserver.cfg on its first start, in the user data folder:
- Windows:
C:\Users\<user>\AppData\LocalLow\Endnight\SonsOfTheForestDS, or the folder you set with-userdatapath. - jammsen Docker image:
game/userdata/dedicatedserver.cfg. - Pelican or Pterodactyl egg:
serverconfig/dedicatedserver.cfg. The egg also passes several settings as start arguments, and those win over the file (more on that below).
The same folder holds ownerswhitelist.txt, the Saves folder and SonsGameSettings.cfg. You only need to edit the first two files.
The default file
This is the file the server writes when none exists:
{
"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 setting is required. A missing key gets its default value, and the order does not matter.
Network settings
| Key | Default | What it does |
|---|---|---|
IpAddress | 0.0.0.0 | The interface the server listens on. Leave it on 0.0.0.0 to listen on all of them |
GamePort | 8766 | UDP port for the game itself |
QueryPort | 27016 | UDP port Steam uses to list the server |
BlobSyncPort | 9700 | UDP port for the BlobSync system that sets up and exchanges game data |
LanOnly | false | true hides the server from the internet list and shows it on LAN only |
SkipNetworkAccessibilityTest | false | Skips the public IP and port check at start. Endnight calls it an expert option |
If you change a port, change it in your firewall and any port forwarding too. Endnight only officially supports IPv4.
Server and player settings
| Key | Default | Allowed values |
|---|---|---|
ServerName | Sons Of The Forest Server (dedicated) | Any text. Shown in the server list and in Steam |
MaxPlayers | 8 | 1 to 8 |
Password | empty | Up to 40 characters. Empty means anyone can join |
Save settings, and the one trap
| Key | Default | Allowed values |
|---|---|---|
SaveSlot | 1 | 1 or higher. The id of the save |
SaveMode | Continue | continue or new |
SaveInterval | 600 | Seconds between autosaves |
SaveMode is the setting that costs groups their island:
continueloads the save onSaveSlot, or creates a new one there if the slot is empty. This is what you want almost always.newcreates a new game onSaveSlotand overwrites whatever was saved there. It does that again on every restart for as long as the setting stays onnew.
So if you want a fresh world, the safe way is to pick an empty SaveSlot and leave SaveMode on continue. If you do use new, set it back to continue before the next restart. The server stores slot 1 in a folder called 0000000001 under Saves/DedicatedServer/Multiplayer/; our guide on moving a save to a dedicated server explains how to use that.
Game mode
GameMode sets the difficulty when a new save is created: normal, hard, hardsurvival, peaceful, creative or custom.
It is ignored when the server loads an existing save. Changing GameMode from normal to hard on a running world does nothing; the save keeps the mode it was made with. With custom, the server reads the options under CustomGameModeSettings (below).
The default file writes Continue and Normal with a capital, while the guide lists the allowed values in lower case. The server writes the capitalised form itself, so both work.
Idle and performance settings
| Key | Default | What it does |
|---|---|---|
IdleDayCycleSpeed | 0.0 | How fast time passes while nobody is online, from 0 to 1. At 0 the island stands still |
IdleTargetFramerate | 5 | Server framerate while empty, 1 or higher |
ActiveTargetFramerate | 60 | Server framerate with players online, 10 or higher |
The low idle framerate keeps an empty server cheap to run. There is little reason to change these, unless you want the seasons to move on while nobody plays; then set IdleDayCycleSpeed to something like 0.5.
Log settings
| Key | Default | What it does |
|---|---|---|
LogFilesEnabled | false | Writes the log to files in <user data folder>/logs |
TimestampLogFilenames | true | A new file per start, named sotf_log_<date_time>.txt. With false it overwrites sotf_log.txt |
TimestampLogEntries | true | A timestamp in front of every line |
Turn LogFilesEnabled on when you troubleshoot, so you can read back why the self-test failed. For more detail, start the server with -verboseLogging. Endnight advises using it only while you have a problem, because it makes the logs much bigger.
GameSettings: works in every mode
GameSettings holds two options that apply in any game mode, also on an existing save:
"GameSettings": {
"Gameplay.TreeRegrowth": true,
"Structure.Damage": true
}
Gameplay.TreeRegrowth: trees grow back when players sleep.Structure.Damage: buildings can be damaged. Set it tofalsefor a relaxed building server.
CustomGameModeSettings: only for a new custom world
These options are only read when GameMode is custom and the server creates a new save. On an existing save they are ignored, whatever the mode. They are set once, when the world is created.
| Key | Allowed values | Effect |
|---|---|---|
GameSetting.Multiplayer.Cheats | true, false | Allows cheats |
GameSetting.Vail.EnemySpawn | true, false | Enemies spawn |
GameSetting.Vail.EnemyHealth | low, normal, high | Enemy starting health |
GameSetting.Vail.EnemyDamage | low, normal, high | Damage enemies do |
GameSetting.Vail.EnemyArmour | low, normal, high | Enemy armour |
GameSetting.Vail.EnemyAggression | low, normal, high | Enemy aggression |
GameSetting.Vail.AnimalSpawnRate | low, normal, high | Animal spawn rate |
GameSetting.Vail.EnemySearchParties | low, normal, high | How often search parties come |
GameSetting.Environment.StartingSeason | spring, summer, autumn, winter | Season at the start |
GameSetting.Environment.SeasonLength | short, default, long, realistic | Season length |
GameSetting.Environment.DayLength | short, default, long, realistic | Day length |
GameSetting.Environment.PrecipitationFrequency | low, default, high | How often it rains or snows |
GameSetting.Survival.ConsumableEffects | normal, hard | Damage from low hydration and fullness |
GameSetting.Survival.PlayerStatsDamage | off, normal, hard | Damage from bad or rotten food and drink |
GameSetting.Survival.ColdPenalties | off, normal, hard | How hard cold hits health and stamina |
GameSetting.Survival.StatRegenerationPenalty | off, normal, hard | Slower health and stamina regeneration |
GameSetting.Survival.ReducedFoodInContainers | true, false | Less food in containers |
GameSetting.Survival.SingleUseContainers | true, false | Containers open only once |
GameSetting.Survival.BuildingResistance | low, normal, high | How well buildings resist attacks |
GameSetting.Survival.CreativeMode | true, false | Creative mode |
GameSetting.Survival.PlayersImmortalMode | true, false | God mode for all players |
GameSetting.FreeForm.ForcePlaceFullLoad | true, false | Place everything in your hands (stones, floors) in one click |
GameSetting.Construction.NoCuttingsSpawn | true, false | No cuttings spawn |
GameSetting.Survival.OneHitToCutTrees | true, false | Trees fall in one hit |
Endnight's example file also contains GameSetting.Multiplayer.PvpDamage with the value Normal, but the guide does not list its other values, so leave it out unless you know what you want.
Command line arguments beat the file
Every key can also be set as a start argument, in the form -dedicatedserver.<key> "<value>":
SonsOfTheForestDS.exe -dedicatedserver.ServerName "Our Island" -dedicatedserver.MaxPlayers "4"
That matters on the Pelican egg. Its start command passes the ports, MaxPlayers, Password, GameMode, SkipNetworkAccessibilityTest and SaveSlot as arguments, filled from the Startup tab. Change those in the panel, not in the file, because the start argument wins over the file. The egg's defaults are four players and the password changeme.
Five JSON mistakes that stop the server
The self-test refuses a config it cannot read, so a typo means no server. Check for:
- A missing comma between two settings.
- A comma after the last setting before a closing
}. - Keys without quotation marks. Every key needs them:
"MaxPlayers". - Text values without quotation marks:
"Password": "pinecone". - Numbers and
trueorfalsein quotation marks. Write"MaxPlayers": 4, not"4".
The console names the setting that broke the test, so read it before you change anything else.
Three example configs
A private server for four friends. The keys you change from the default:
"ServerName": "Pinecone Island",
"MaxPlayers": 4,
"Password": "choose-your-own",
"SaveSlot": 1,
"SaveMode": "continue",
"GameMode": "normal"
A peaceful building server. No enemies, no damage to bases:
"GameMode": "peaceful",
"SaveSlot": 2,
"SaveMode": "continue",
"GameSettings": {
"Gameplay.TreeRegrowth": true,
"Structure.Damage": false
}
A hard winter start on a fresh slot. Custom mode, read once when the world is created:
"GameMode": "custom",
"SaveSlot": 3,
"SaveMode": "continue",
"CustomGameModeSettings": {
"GameSetting.Environment.StartingSeason": "winter",
"GameSetting.Survival.ColdPenalties": "hard",
"GameSetting.Vail.EnemyAggression": "high",
"GameSetting.Survival.SingleUseContainers": true
}
Because slot 3 is empty, continue creates the new world there, and the next restart loads it instead of wiping it.
Server owners
ownerswhitelist.txt holds the SteamID64 of every server owner, one per line. Lines that start with # are comments. Owners get the in-game admin panel (Pause Menu, then Players) to make others admin, kick and ban. For the full setup, see the Sons of the Forest server guide.
FAQ
Where is dedicatedserver.cfg?
In the server's user data folder. On Windows that is C:\Users\<user>\AppData\LocalLow\Endnight\SonsOfTheForestDS unless you set -userdatapath. The server creates the file on its first start.
Why does my server make a new world every restart?
SaveMode is on new. That setting overwrites the save on SaveSlot on every start. Set it to continue.
Can I change the difficulty of an existing world?
Not with GameMode. The server ignores GameMode and CustomGameModeSettings when it loads an existing save. Only the two GameSettings options (tree regrowth and structure damage) still apply.
How do I make the server private?
Set a Password of up to 40 characters. Players have to enter it before they can join. LanOnly is something else: it hides the server from the internet list altogether.
My changes to dedicatedserver.cfg do not stick. Why?
A start argument overrides the file. Panels such as the Pelican egg pass several settings as arguments from the Startup tab, so change them there.