Skip to content

Sons of the Forest Dedicated Server Setup and dedicatedserver.cfg Settings

Set up a Sons of the Forest dedicated server: SteamCMD app 2465200, UDP 8766/27016/9700, dedicatedserver.cfg, self-test errors and server owners.

Updated October 28, 2026
Sons of the Forest

A Sons of the Forest dedicated server is Endnight's free Sons Of The Forest Dedicated Server tool (Steam app 2465200, Windows only). You install it from Steam's Tools section or with SteamCMD using login anonymous, start it once with StartSOTFDedicated.bat so it creates dedicatedserver.cfg and ownerswhitelist.txt, then open three UDP ports: 8766 (game), 27016 (query) and 9700 (BlobSync). If a port is closed, the server's self-test stops the boot and the console tells you which one.

Below is the full self-hosted setup, the config keys that matter, how to make yourself the server owner, and what is different on a GameServerKings server.

Checked on 27 October 2026

The dedicated server's public branch is build 20228410, which shipped with Endnight's "Unity security update" on 3 October 2025. The last content patch was the January 2025 rafts update. Everything here is from the Dedicated Server Configuration Guide on the game's Steam hub (last updated 15 January 2025), checked against the startup command our servers use.

Install the Server

Steam client. The server is in the Tools section of your Steam library. Search for Sons Of The Forest Dedicated Server and install it.

SteamCMD. No Steam account is needed. On Windows:

steamcmd.exe +force_install_dir "C:\sons-dedicated" +login anonymous +app_update 2465200 validate +quit
bat

Re-run it to update. There is only a Windows build. On a Linux machine, SteamCMD needs +@sSteamCmdForcePlatformType windows to fetch it, and the server then runs under Wine.

The User Data Folder

Start the server once with StartSOTFDedicated.bat in the install folder (or Steam's launch button). On a fresh install, the self-test reports "Server configuration doesn't exist. A default one has been created automatically." and the same for the owners whitelist. That first run's job is to create the files.

They go into the user data folder, not the install folder:

C:\Users\<user>\AppData\LocalLow\Endnight\SonsOfTheForestDS

To keep everything in one place, start the server with -userdatapath "D:/sotf-data". The folder holds:

File What it is
dedicatedserver.cfg The server config (JSON)
ownerswhitelist.txt Steam IDs of server owners
Saves/ The worlds
SonsGameSettings.cfg Game settings. You shouldn't need to touch it
logs/ Only when LogFilesEnabled is true

Don't edit StartSOTFDedicated.bat itself. The guide warns that changes to any file in the install folder "will be overwritten to the default file at the next dedicated server install verification/update". Copy it and edit the copy.

dedicatedserver.cfg: the Settings That Matter

The file is JSON, so values in quotes are text, numbers and true/false aren't, and every line but the last ends in a comma. A missing key falls back to its default, so you only need the ones you change.

Key Default Notes
GamePort / QueryPort / BlobSyncPort 8766 / 27016 / 9700 All UDP. Change them in pairs with your port forwards
ServerName Sons Of The Forest Server (dedicated) Shown in the server list and Steam contacts
MaxPlayers 8 1 to 8. Eight is the hard cap
Password empty Up to 40 characters
LanOnly false true hides the server from the internet list
SaveSlot 1 The save's ID
SaveMode Continue continue loads the slot or creates it. new overwrites the slot on every start while it stays set
GameMode Normal normal, hard, hardsurvival, peaceful, creative or custom. Only used when a save is created
SaveInterval 600 Seconds between autosaves
IdleTargetFramerate / ActiveTargetFramerate 5 / 60 Target framerate with nobody connected / with players on
SkipNetworkAccessibilityTest false See the next section

Two blocks go at the end. GameSettings works in every mode ("Gameplay.TreeRegrowth": true and "Structure.Damage": true are the documented keys). CustomGameModeSettings is read only when GameMode is custom and a new save is being created, so changing it on a running world does nothing. Getting started with your Sons of the Forest server lists the custom keys.

Every key can also be passed on the command line as -dedicatedserver.<Key> "<value>", for example SonsOfTheForestDS.exe -dedicatedserver.MaxPlayers "4". A command-line value overrides the file.

Ports and the Self-Test

At every boot the server checks its config, fetches its public IP from Steam and tests whether its ports are reachable. Fail any check and it doesn't start. The errors it prints are specific:

Console message Fix
Failed to get public ip from Steam. The machine needs a public IPv4 address. Only IPv4 is officially supported
UDP <PortName> <PortNumber> is closed. Forward that UDP port on the router and allow it in the firewall
The configuration couldn't be read without error. dedicatedserver.cfg isn't valid JSON. Look for a missing comma or quote
Game settings couldn't be deserialized SonsGameSettings.cfg is broken. Undo your edit or delete it (you lose key bindings and graphics settings)

Hosting at home and the test fails anyway? Many home routers don't support NAT loopback (hairpin NAT), so the server can't reach itself on its public IP. Setting SkipNetworkAccessibilityTest to true lets it boot, but the guide warns that a server failing the test "won't be accessible anyway" in most cases. Check it from another network right away. Without loopback, players on your own LAN may not see the server in the browser and will need the LAN list.

Make Yourself the Server Owner

There is no separate admin password. Ownership goes by Steam ID.

  1. Find your SteamID64 at store.steampowered.com/account/, or in Steam click your name at the top right and open Account Details.
  2. Open ownerswhitelist.txt and add it on its own line. Lines starting with # are comments.
  3. Restart the server.

Owners get the in-game admin panel under Pause menu → Players, where they can promote players to admin, demote them to guest, and kick, ban or unban. Owners have the same rights as the host of a peer-to-peer game, so only list people you trust. For cheats and console commands, see Sons of the Forest console commands.

Running It on a GameServerKings Server

On your Sons of the Forest server we install app 2465200 with SteamCMD and run SonsOfTheForestDS.exe under Wine, with the user data folder set to serverconfig/ (-userdatapath "/home/container/serverconfig"). So your dedicatedserver.cfg, ownerswhitelist.txt and Saves/ are all in serverconfig/ in the File Manager.

Ports and the most-used settings are command-line overrides. Our start line passes GamePort, QueryPort, BlobSyncPort, MaxPlayers, Password, GameMode, SaveSlot and SkipNetworkAccessibilityTest from the panel. As described above, command-line values beat the file, so changing them in dedicatedserver.cfg does nothing. Use the Startup tab:

Startup variable Default Notes
Server Name Pterodactyl hosted Server Up to 60 characters. Also written into ServerName in the file at each boot
Max Players 4 1 to 8
Password changeme Change it, or clear it for an open server
Gamemode normal normal, hard, hardsurvival, peaceful or custom. The panel doesn't offer creative
Save Slot 0000000001 The ten-digit slot folder to load
Skip network Test false Set to true only if the self-test blocks a server you know is reachable

QueryPort and BlobSyncPort are shown read-only. Your three ports are on the Network tab, so don't expect 8766, 27016 and 9700. Players connect with the IP and port in the panel's Address.

Everything else in dedicatedserver.cfg (SaveMode, SaveInterval, the framerate targets, GameSettings, CustomGameModeSettings) you edit in the file, with the server stopped. Log files are on and timestamped (sotf_log_<date>.txt) because our start line enables them.

To bring a single-player or co-op world over, see the save upload steps in getting started with your Sons of the Forest server.

FAQ

Do I need to own Sons of the Forest to run a dedicated server?

No. SteamCMD downloads app 2465200 with an anonymous login. Every player who joins needs the game, of course.

What ports does a Sons of the Forest server need?

Three, all UDP: GamePort 8766, QueryPort 27016 and BlobSyncPort 9700 by default. All three must be open, or the self-test stops the server from starting.

How many players can join a Sons of the Forest dedicated server?

Eight. MaxPlayers accepts 1 to 8, and there is no setting above that.

Why do my custom game mode settings do nothing?

CustomGameModeSettings is only read when GameMode is custom and the server is creating a new save. On an existing save it is ignored. Start a new save on an empty slot to use new custom settings.

Is there a Linux Sons of the Forest server?

No. Endnight only ship a Windows server. It runs on Linux under Wine, which is how our servers run it, but Endnight's guide only covers Windows.


Made with 💜 by GameServerKings

Need a Sons Of The Forest server?

Deploy an instantly-provisioned Sons Of The Forest server on high-clock hardware — DDoS protected, no contracts, cancel anytime.

From $12.60 /month