Advertisement

Generate a Sons of the Forest dedicatedserver.cfg

Sons of the Forest reads a JSON file called dedicatedserver.cfg — the .cfg extension hides the fact that it is strict JSON, and that is where most of its setup problems start.

Visual Settings

json Format
Identity

Name in the server browser.

Gameplay

Difficulty preset. Custom reads the CustomGameModeSettings block, which this tool does not edit.

World

Which save to use. Each slot is a separate world.

Continue loads the slot; New starts a fresh world in it. Leave it on Continue after the first start, or every restart makes a new world.

Seconds between autosaves.

How fast time passes while nobody is online. 0 freezes it.

Players & Access

Join password, up to 40 characters. Empty means public.

Eight is the game's hard limit.

Only visible and joinable on the local network.

Performance

Server frame rate cap while empty. Low values save CPU.

Server frame rate cap while players are online.

Network

The address to listen on. 0.0.0.0 means every interface.

Game traffic, UDP.

Steam query for the server browser, UDP.

Transfers world state to players as they join, UDP. Without it players hang on the loading screen.

At startup the server checks that its ports are reachable and refuses to start if they are not. Skipping the test only hides the problem.

RCON & Query

Writes log files to disk.

dedicatedserver.cfg

{
  "ServerName": "Sons Of The Forest Server",
  "Password": "",
  "MaxPlayers": 8,
  "LanOnly": false,
  "GameMode": "Normal",
  "SaveSlot": 1,
  "SaveMode": "Continue",
  "SaveInterval": 600,
  "IdleDayCycleSpeed": 0,
  "IdleTargetFramerate": 5,
  "ActiveTargetFramerate": 60,
  "IpAddress": "0.0.0.0",
  "GamePort": 8766,
  "QueryPort": 27016,
  "BlobSyncPort": 9700,
  "SkipNetworkAccessibilityTest": false,
  "LogFilesEnabled": false
}

Advertisement

The dedicatedserver.cfg format

Standard JSON: keys and strings in double quotes, numbers and true/false bare, no comments, no trailing commas. The three ports — GamePort, QueryPort and BlobSyncPort — are all set here, and all three must be forwarded. GameSettings and CustomGameModeSettings are nested objects whose keys themselves contain dots, such as Gameplay.TreeRegrowth; leave them as they are unless you mean to change them.

Advertisement

The mistake that wastes an evening

SaveMode set to New makes the server start a fresh world; left that way, it keeps doing so on every restart and your progress seems to vanish. Set it back to Continue once the world exists. And the server tests its own ports at startup and refuses to start if they are not reachable — skipping that test only hides the real problem.

Rather not run the server yourself?

These tools are free and funded by the two hosting services we run. If you want a server that is already set up, here they are.

Advertisement