Skip to content

Sons of the Forest: Server Configuration

Learn how to configure the player count, server name, password, game mode, custom rules, and autosave settings for your Sons of the Forest game server in dedicatedserver.cfg.

26 November 20266 min read3 Views0 helpful

Don't have your own server yet? Host your Sons of the Forest server with ZAP-Hosting from €9.99 / month.Or try 3 days from €1.80

Introduction

With the right configuration, you can turn your Sons of the Forest game server into exactly the kind of server you and your friends want: with your own name, a password, the right game mode, and, if you like, a world with your own rules. In this guide, we’ll show you which settings are available, where to find them in ZapX, and what you can adjust directly in the configuration file.

How the configuration works

Sons of the Forest reads its server settings from the dedicatedserver.cfg file. Despite its .cfg extension, it’s a JSON file. You’ll find it in the Files tab, directly in your server’s main directory, alongside ownerswhitelist.txt and the Saves folder. You can edit it there or in the Configuration tab.

In the Configuration tab, under Startup parameters, Sons of the Forest has just one field: Max. players. You configure everything else, such as the server name, password, game mode, and save interval, directly in dedicatedserver.cfg.

Each time your server starts, it automatically sets some values in the file:

  • MaxPlayers takes its value from the Max. players startup parameter.
  • GamePort, QueryPort, and BlobSyncPort are set to the ports assigned to your server by ZapX.
  • IpAddress is set to 0.0.0.0 and SkipNetworkAccessibilityTest to true.

All other values in the file stay as you entered them.

Important

Don’t change MaxPlayers, the ports, or IpAddress in dedicatedserver.cfg. Your server will overwrite these values the next time it starts. Always change the player count using Max. players under Startup Parameters.

Sons of the Forest only reads dedicatedserver.cfg when it starts. The safest approach is to stop your server in Overview, edit the file, and then start it again. Your changes will only take effect after that.

Startup parameters at a glance

Startup parameterDescription
Max. playersThe number of players who can play on your server at the same time, from 1 to 8, up to the number of slots you’ve purchased. Each time your server starts, it writes this value to dedicatedserver.cfg as MaxPlayers.
Info

Sons of the Forest doesn’t allow more than 8 players. This is a fixed limit in the game.

Key settings in dedicatedserver.cfg

You can adjust these entries directly in dedicatedserver.cfg:

EntryDescription
ServerNameYour server’s name in the in-game server list. Default: ZapX Sons of the Forest Server
PasswordThe password required to join. Leave it blank ("") for an open server.
LanOnlytrue makes your server visible only on the local network. Default: false
GameModeThe game mode for a new world: Normal (default), Hard, HardSurvival, Peaceful, Creative, or Custom
SaveSlotThe save slot your server loads. Default: 1
SaveModeContinue loads the save in the selected slot (default); New creates a new world
SaveIntervalTime between automatic saves, in seconds. Default: 600
IdleDayCycleSpeedDay-night cycle speed while nobody is on the server. 0 pauses time (default); 1 is normal speed
IdleTargetFramerateHow many times per second your server processes updates while nobody is connected. Default: 5
ActiveTargetFramerateHow many times per second your server processes updates while players are connected. Default: 60
LogFilesEnabledtrue makes the server write additional log files for troubleshooting. Default: false
GameSettingsSettings that apply in every game mode, such as "Gameplay.TreeRegrowth" (trees grow back) and "Structure.Damage" (enemies can damage structures)
CustomGameModeSettingsFine-tune settings for the Custom game mode; see below
Warning

Make sure your JSON is valid: text must be in quotation marks, true, false, and numbers must not be in quotation marks, and there must be a comma between entries. If the file is no longer valid JSON, your server will replace it with a file containing the default values the next time it starts. Your custom settings will then be lost. Before making major changes, copy the current contents of the file so you can restore them if needed.

Tip

Don’t set LanOnly to true. Your server will no longer appear in the public server list, and your friends won’t be able to find it.

Game mode and creating a new world

Sons of the Forest only uses GameMode and CustomGameModeSettings when a new world is created. An existing save retains its game mode and settings, even after a restart. So if you change only GameMode and leave SaveMode set to Continue, nothing will change in your current world.

Here’s how to start a new world with a different game mode:

  1. Back up your current world in the Savegames tab. See Manage savegames.
  2. Stop your server in Overview.
  3. Open dedicatedserver.cfg and set GameMode to the game mode you want, for example, "Hard".
  4. Set SaveMode to "New". If you want to keep your old world, also enter a different number for SaveSlot, for example, 2.
  5. Save the file and start your server. It will now create the new world.
  6. Afterward, check dedicatedserver.cfg: if SaveMode is still set to "New", change it back to "Continue" so your server loads the new world the next time it starts.
Important

With SaveMode set to "New", your server creates a fresh world in the selected SaveSlot. Without a backup, your previous progress in that slot will be lost.

If you want to switch back to an older world later, enter its number for SaveSlot, leave SaveMode set to "Continue", and restart the server.

Create your own rules with the Custom game mode

With "GameMode": "Custom", you can fine-tune your world. Enter the values in the CustomGameModeSettings block. Each name, such as "GameSetting.Vail.EnemyAggression", is a single entry; the periods are part of the name. Here’s an example of a harder world that starts in winter:

json
"GameMode": "Custom",
"SaveMode": "New",
"CustomGameModeSettings": {
  "GameSetting.Vail.EnemyAggression": "High",
  "GameSetting.Environment.StartingSeason": "Winter",
  "GameSetting.Survival.ColdPenalties": "Normal",
  "GameSetting.Survival.SingleUseContainers": true
}

You can adjust these categories:

CategoryEntries (selection)
Enemies and animals (GameSetting.Vail.*)EnemySpawn (true/false), EnemyHealth, EnemyDamage, EnemyArmour, EnemyAggression, AnimalSpawnRate, EnemySearchParties, each set to Low, Normal, or High
Environment (GameSetting.Environment.*)StartingSeason (Spring, Summer, Autumn, Winter), SeasonLength, and DayLength (Short, Default, Long, Realistic), PrecipitationFrequency (Low, Default, High)
Survival (GameSetting.Survival.*)For example, ConsumableEffects, PlayerStatsDamage, ColdPenalties, BuildingResistance, ReducedFoodInContainers, SingleUseContainers, PlayersImmortalMode, OneHitToCutTree
Multiplayer (GameSetting.Multiplayer.*)Cheats (true enables console commands for admins) and PvpDamage
Info

CustomGameModeSettings only take effect when used with "GameMode": "Custom" and when a new world is created. To apply them to an existing world, follow the steps in the Game mode and creating a new world section.

Tip

You’ll find the Sons of the Forest config generator in the Tools tab. Use the form to select your settings, then copy the result into your dedicatedserver.cfg.

Idle time, autosave, and performance

Three entries determine how your server runs while nobody is playing and how often it saves:

  • IdleDayCycleSpeed: The default value 0 pauses time while nobody is connected, so your world waits for you. To keep time moving when no players are online, enter a value greater than 0; 1 is normal speed.
  • IdleTargetFramerate and ActiveTargetFramerate: By default, your server processes updates only 5 times per second when no players are online, saving resources, and 60 times per second when players are online. Higher values require more CPU.
  • SaveInterval: Your server automatically saves the world every 600 seconds, or ten minutes. A lower value means less progress is lost in a crash, but the server writes to disk more often.

After changing the framerate values, keep an eye on your server’s load in the Statistics tab.

Info

Your Sons of the Forest server’s Console is read-only. Always change settings through dedicatedserver.cfg and Startup parameters, not with console commands.

Admins and savegames

We have separate guides for these topics:

  • Set admins: Add server owners to ownerswhitelist.txt using their SteamID64. See Become an admin.
  • Back up and upload savegames: Manage savegames shows you how to download, upload, and restore worlds.
  • Connect: Connect to the server explains how to find your server in the game.

Conclusion

Your Sons of the Forest server is now set up just the way you want it. See Become an admin to learn how to give yourself admin permissions. If something isn’t working as expected, our Common issues guide can help. If you have any other questions, our support team is available every day! 🙂

Free tools

Sons of the Forest Tools

View all

FAQ

Frequently asked questions

Set the player count under Max. Players in Startup Parameters in the Configuration tab. Configure the server name, password, game mode, save interval, and other settings in dedicatedserver.cfg, which you can edit in the Files or Configuration tab.
Sons of the Forest only applies GameMode and CustomGameModeSettings when creating a new world. Existing saves keep their current settings. To create a new world, back up your current one, set SaveMode to New, then change it back to Continue afterward.
The game has a fixed limit of 8 players. Set the player count using Max. Players in Startup Parameters. Any MaxPlayers value in dedicatedserver.cfg will be overwritten the next time the server starts.

Feedback

Was this article helpful?

Your feedback helps us prioritize and improve content.

0 of 0 people found this article helpful.

Personal support

Need more help than the guide provides?

Our ZAP-Hosting support team knows your product — briefly describe your issue and we'll help you personally.

Zappy knows this guide and answers you right in the chat.