Configuring dedicatedserver.cfg
All the settings of a Sons of the Forest dedicated server live in a single file: dedicatedserver.cfg. This page covers its parameters, grouped by topic.
Where is the file?
dedicatedserver.cfg is stored in the server data folder, together with ownerswhitelist.txt and the Saves folder. These files are created on the server's first startup.
- Open the Files tab of the panel and look for the folder that contains
dedicatedserver.cfg,ownerswhitelist.txtandSaves. - If you cannot find it, check the startup command in the Startup tab: if it contains the
-userdatapathoption, the path given there is the data folder. - If the file does not exist yet, start the server once, wait for startup to finish, then stop it.
Editing the file safely
Always stop the server from the panel Console before editing dedicatedserver.cfg. The file is only read at startup: a change made while the server is running is not applied and may be overwritten.
- Log in to your Game Panel: game.yorkhost.fr
- Select your server and stop it
- Open the Files tab and edit
dedicatedserver.cfg - Change only the values you need
- Save, then start the server
The file uses the JSON format: each setting is written "Key": value, text goes between quotes, numbers and true / false without quotes, and every line ends with a comma except the last one of a block. Typical excerpt:
{
"ServerName": "YorkHost Island",
"MaxPlayers": 8,
"Password": "",
"LanOnly": false,
"SaveSlot": 1,
"SaveMode": "Continue",
"GameMode": "Normal",
"SaveInterval": 600,
"IdleDayCycleSpeed": 0.0,
"GameSettings": {},
"CustomGameModeSettings": {}
}
Your file contains other keys (network, logs, framerate…): leave them in place.
Download a copy of dedicatedserver.cfg before any significant change. An extra comma, a missing quote or an unclosed brace makes the file invalid and can prevent startup or cause your settings to be ignored. When in doubt, check the content with a JSON validator.
Startup tab parameters
Some values can also be set through the startup command (Startup tab of the panel). If a change in the file seems to be ignored, check that the same setting is not defined in the Startup tab.
Identity and access
| Key | Role |
|---|---|
ServerName | Name shown in the dedicated server list |
Password | Password required to join (empty = open game) |
MaxPlayers | Number of slots, 8 at most |
LanOnly | Local network only: keep it false, otherwise the server cannot be reached from the Internet |
Leave IpAddress, GamePort, QueryPort and BlobSyncPort at their intended values: ports are assigned by the panel. See Getting started.
Game mode
The GameMode key sets the difficulty of the game:
| Value | Mode |
|---|---|
Normal | The experience intended by the developers: threatening enemies, reasonable amounts of resources |
Hard | More aggressive and tougher enemies |
HardSurvival | Hard difficulty with more demanding survival: hunger, cold, scarcer resources |
Peaceful | No enemies: free exploration and building |
Custom | Custom settings through CustomGameModeSettings (see below) |
Depending on the guide, these values are written with or without capitals (normal, hardsurvival…). Keep the form used in the file generated by your server.
The mode is stored with the save. Changing GameMode on an existing game may have no effect. The safest way to change mode is to start a new game in another slot (SaveSlot): see Saves and new game.
Custom mode
With "GameMode": "Custom", the CustomGameModeSettings block lets you fine-tune the game: enemy spawning and strength, number of animals, starting season and season length, day length, survival penalties and more. Each setting takes the form "Setting.Name": value, for example:
"GameMode": "Custom",
"CustomGameModeSettings": {
"GameSetting.Vail.EnemySpawn": true,
"GameSetting.Vail.EnemyHealth": "High",
"GameSetting.Environment.StartingSeason": "Summer"
}
The names and possible values of CustomGameModeSettings change with game updates. The examples above are indicative: use Endnight's official list for your version, and test one change at a time.
The GameSettings block accepts a few general game settings (for example tree regrowth or structure damage, depending on the version). Leave it empty ({}) if you do not need it.
Autosave
| Key | Role |
|---|---|
SaveSlot | Number of the save slot used by the server |
SaveMode | Continue resumes the game in the slot (or creates one if it is empty); New starts a new game in that slot |
SaveInterval | Autosave frequency, in seconds (600 = every 10 minutes) |
With SaveMode set to New, the server starts a new game in the SaveSlot slot and the existing game in that slot may be overwritten. Make a backup first, and set it back to Continue once the new game has been created. Everything is explained in Saves and new game.
A shorter SaveInterval limits the progress lost after a crash, at the cost of more frequent writes. A value of 5 to 10 minutes is a good compromise.
In-game time and idle resources
| Key | Role |
|---|---|
IdleDayCycleSpeed | Speed at which in-game time passes when no player is connected: 0 freezes time, 1 lets it run normally |
IdleTargetFramerate | Server update rate when nobody is connected (low, to save CPU) |
ActiveTargetFramerate | Server update rate when players are connected |
Keeping IdleDayCycleSpeed at 0 prevents days and seasons from going by while your group is away. Leave the framerate values at their defaults unless you have a specific need: lowering them eases the CPU load but can make the game less smooth.
No official mods
Sons of the Forest has no official mod support on the dedicated server side: your server runs the official version. Custom mode is the way the game provides to customize your game.
What's next?
- Becoming an admin:
ownerswhitelist.txtis in the same folder - Saves and new game:
SaveSlotandSaveModein detail - Troubleshooting: what to do if your settings are ignored