Skip to main content

Need a powerful server for your projects?

Discover our offers

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.txt and Saves.
  • If you cannot find it, check the startup command in the Startup tab: if it contains the -userdatapath option, 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​

Stop the server before editing

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.

  1. Log in to your Game Panel: game.yorkhost.fr
  2. Select your server and stop it
  3. Open the Files tab and edit dedicatedserver.cfg
  4. Change only the values you need
  5. 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.

Keep a copy

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​

KeyRole
ServerNameName shown in the dedicated server list
PasswordPassword required to join (empty = open game)
MaxPlayersNumber of slots, 8 at most
LanOnlyLocal network only: keep it false, otherwise the server cannot be reached from the Internet
Do not touch the network settings

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:

ValueMode
NormalThe experience intended by the developers: threatening enemies, reasonable amounts of resources
HardMore aggressive and tougher enemies
HardSurvivalHard difficulty with more demanding survival: hunger, cold, scarcer resources
PeacefulNo enemies: free exploration and building
CustomCustom 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 game mode is tied to the save

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"
}
Exact setting names

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​

KeyRole
SaveSlotNumber of the save slot used by the server
SaveModeContinue resumes the game in the slot (or creates one if it is empty); New starts a new game in that slot
SaveIntervalAutosave frequency, in seconds (600 = every 10 minutes)
SaveMode New

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​

KeyRole
IdleDayCycleSpeedSpeed at which in-game time passes when no player is connected: 0 freezes time, 1 lets it run normally
IdleTargetFramerateServer update rate when nobody is connected (low, to save CPU)
ActiveTargetFramerateServer 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?​