01
Before you start
Endnight Games publishes the Sons of the Forest dedicated server for Windows only. The points to know:
- Windows: there is no official Linux version. Linux setups with Wine, a compatibility layer, exist, but Endnight does not support them. The guide Linux or Windows VPS helps you decide.
- Free and anonymous: the server is downloaded with SteamCMD without a Steam account. Only the players need to own the game.
- 8 players at most: the
MaxPlayers setting accepts a value from 1 to 8.
- IPv4: only IPv4 is officially supported. At startup, the server checks that it gets its public IPv4 address and that its ports are open; if this test fails, it refuses to start.
The whole installation is done from Remote Desktop: the guide connecting to a Windows VPS explains it. For the VPS size, see which VPS for a game server.
02
Download the server with SteamCMD
Open PowerShell on the VPS, download SteamCMD, then the server with the ID 2465200:
New-Item -ItemType Directory -Force C:\steamcmd
Invoke-WebRequest https://steamcdn-a.akamaihd.net/client/installer/steamcmd.zip -OutFile C:\steamcmd\steamcmd.zip
Expand-Archive C:\steamcmd\steamcmd.zip C:\steamcmd
C:\steamcmd\steamcmd.exe +force_install_dir C:\SonsDedicated +login anonymous +app_update 2465200 validate +quit
The server keeps its settings, saves and logs in a data folder. By default it is C:\Users\<user>\AppData\LocalLow\Endnight\SonsOfTheForestDS; the -userdatapath option lets you choose another one, easier to find and back up. Create the script C:\SonsDedicated\demarrer.bat:
@echo off
cd /d C:\SonsDedicated
SonsOfTheForestDS.exe -userdatapath "C:\SonsData"
Run it once. The server then creates the default dedicatedserver.cfg and ownerswhitelist.txt files in C:\SonsData, then stops and says so. The StartSOTFDedicated.bat script, provided in the installation folder, starts the server with the default data folder.
03
Configure dedicatedserver.cfg
The dedicatedserver.cfg file is written in JSON. Open it in Notepad and adjust the values of the default file:
{
"IpAddress": "0.0.0.0",
"GamePort": 8766,
"QueryPort": 27016,
"BlobSyncPort": 9700,
"ServerName": "Mon serveur Sons of the Forest FR",
"MaxPlayers": 8,
"Password": "",
"LanOnly": false,
"SaveSlot": 1,
"SaveMode": "Continue",
"GameMode": "Normal",
"SaveInterval": 600,
"LogFilesEnabled": true,
"SkipNetworkAccessibilityTest": false,
"GameSettings": {},
"CustomGameModeSettings": {}
}
ServerName: the name shown in the server list and in Steam.
MaxPlayers: from 1 to 8.
Password: makes the server private; 40 characters at most. Left empty, anyone can join.
SaveSlot and SaveMode: with continue, the server loads the game in the given slot, or creates it if it does not exist. With new, it creates a new game and overwrites the old one at every restart as long as this mode stays on: switch back to continue right after.
GameMode: the difficulty of a new game (normal, hard, hardsurvival, peaceful, creative or custom). It is ignored when an existing game is loaded. In custom mode, the settings come from CustomGameModeSettings.
SaveInterval: the interval between two autosaves, in seconds.
LogFilesEnabled: writes the logs to the logs folder of the data folder, useful to understand a refusal to start.
GameSettings: a few settings valid in every mode, such as "Gameplay.TreeRegrowth": true (trees grow back) or "Structure.Damage": true (buildings can be damaged).
Watch out for JSON mistakes: names in quotation marks, a comma between two settings, no comma after the last one. An invalid file blocks startup. Each setting can also be passed at launch, for example -dedicatedserver.MaxPlayers "4".
04
Ports, firewall and startup
The server needs three UDP ports, all adjustable in dedicatedserver.cfg:
- 8766 (
GamePort): game traffic;
- 27016 (
QueryPort): the Steam server list;
- 9700 (
BlobSyncPort): exchange of game data on connection.
Open them in PowerShell run as administrator:
New-NetFirewallRule -DisplayName "Sons of the Forest" -Direction Inbound -Protocol UDP -LocalPort 8766,27016,9700 -Action Allow
Run demarrer.bat again. If the network test fails, the console gives the reason (closed port, public address not found). The SkipNetworkAccessibilityTest setting skips this test, but Endnight advises against it: a server that fails the test is usually unreachable anyway. For several servers on one VPS, change the three ports and the data folder of each: see game server ports.
Automatic startup. In Windows Task Scheduler, create a task that runs C:\SonsDedicated\demarrer.bat with the "At startup" trigger and the "Run whether user is logged on or not" option.
05
Owners, backups and updates
Owners. Write in ownerswhitelist.txt the 17-digit Steam ID (SteamID64) of each owner, one per line, then restart the server. Lines starting with # are comments. In game, an owner opens the admin panel from the pause menu, players tab: they can appoint admins, demote them, kick, ban and lift a ban. This role grants every right: keep it for people you trust.
Backups. Games are in the Saves folder of the data folder. With the server stopped, archive the whole folder, settings included:
New-Item -ItemType Directory -Force C:\Sauvegardes
Compress-Archive -Path C:\SonsData -DestinationPath "C:\Sauvegardes\sotf-$(Get-Date -Format yyyy-MM-dd).zip"
Then copy the archive off the VPS: a copy left on the same machine does not protect you from a reinstallation.
Updates. Stop the server, make a backup, then run the SteamCMD installation command again: it downloads the latest version and checks the files. Keep the server up to date so players can always join it.
06
On CloudFive
CloudFive has no ready-made Sons of the Forest plan: the server is installed on a VPS, as in this guide. Since it only exists for Windows, the Windows VPS, from €8.50 per month, is the logical choice:
- the Windows Server licence is included, and everything is managed through Remote Desktop;
- an AMD Ryzen 9 9950X, with DDR5 memory and NVMe storage, administrator access and a dedicated IPv4 address, the one the server's network test expects;
- basic anti-DDoS protection included. The game-specific filter is part of Premium Protection, a paid option (see protecting a game server against DDoS).
The servers are in France, on our own AS218808 network, monthly with no commitment, with support in French 7 days a week (tickets, Discord, phone). Other gaming uses of the VPS are on the gaming VPS page.
07
Frequently asked questions
Does the Sons of the Forest dedicated server run on Linux?
Not officially. Endnight only publishes the dedicated server for Windows, and Linux setups with Wine are not supported. A Windows VPS, managed through Remote Desktop, avoids these problems.
Which ports should I open for a Sons of the Forest server?
Three UDP ports: 8766 for the game, 27016 for the Steam server list and 9700 for BlobSync. These are the default values, which can be changed in dedicatedserver.cfg; open the ones you write there.
How many players can a Sons of the Forest server hold?
Eight at most: the MaxPlayers setting in dedicatedserver.cfg accepts a value from 1 to 8. You can lower this limit, not exceed it.
How do I become an admin on a Sons of the Forest server?
Add your SteamID64 to the ownerswhitelist.txt file in the data folder, one ID per line, then restart the server. In game, the admin panel opens from the pause menu, in the players tab.
Why does my Sons of the Forest server refuse to start?
At startup, the server tests its configuration and network access, and stops if a test fails. The usual causes are a UDP port closed in the firewall or a malformed dedicatedserver.cfg file. The console and the logs give the exact reason.