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.
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:
MaxPlayerstakes its value from the Max. players startup parameter.GamePort,QueryPort, andBlobSyncPortare set to the ports assigned to your server by ZapX.IpAddressis set to0.0.0.0andSkipNetworkAccessibilityTesttotrue.
All other values in the file stay as you entered them.
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 parameter | Description |
|---|---|
| Max. players | The 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. |
Sons of the Forest doesn’t allow more than 8 players. This is a fixed limit in the game.
You can adjust these entries directly in dedicatedserver.cfg:
| Entry | Description |
|---|---|
ServerName | Your server’s name in the in-game server list. Default: ZapX Sons of the Forest Server |
Password | The password required to join. Leave it blank ("") for an open server. |
LanOnly | true makes your server visible only on the local network. Default: false |
GameMode | The game mode for a new world: Normal (default), Hard, HardSurvival, Peaceful, Creative, or Custom |
SaveSlot | The save slot your server loads. Default: 1 |
SaveMode | Continue loads the save in the selected slot (default); New creates a new world |
SaveInterval | Time between automatic saves, in seconds. Default: 600 |
IdleDayCycleSpeed | Day-night cycle speed while nobody is on the server. 0 pauses time (default); 1 is normal speed |
IdleTargetFramerate | How many times per second your server processes updates while nobody is connected. Default: 5 |
ActiveTargetFramerate | How many times per second your server processes updates while players are connected. Default: 60 |
LogFilesEnabled | true makes the server write additional log files for troubleshooting. Default: false |
GameSettings | Settings that apply in every game mode, such as "Gameplay.TreeRegrowth" (trees grow back) and "Structure.Damage" (enemies can damage structures) |
CustomGameModeSettings | Fine-tune settings for the Custom game mode; see below |
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.
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.
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:
- Back up your current world in the Savegames tab. See Manage savegames.
- Stop your server in Overview.
- Open
dedicatedserver.cfgand setGameModeto the game mode you want, for example,"Hard". - Set
SaveModeto"New". If you want to keep your old world, also enter a different number forSaveSlot, for example,2. - Save the file and start your server. It will now create the new world.
- Afterward, check
dedicatedserver.cfg: ifSaveModeis still set to"New", change it back to"Continue"so your server loads the new world the next time it starts.
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.
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:
"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:
| Category | Entries (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 |
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.
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.
Three entries determine how your server runs while nobody is playing and how often it saves:
IdleDayCycleSpeed: The default value0pauses time while nobody is connected, so your world waits for you. To keep time moving when no players are online, enter a value greater than0;1is normal speed.IdleTargetFramerateandActiveTargetFramerate: By default, your server processes updates only5times per second when no players are online, saving resources, and60times per second when players are online. Higher values require more CPU.SaveInterval: Your server automatically saves the world every600seconds, 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.
Your Sons of the Forest server’s Console is read-only. Always change settings through dedicatedserver.cfg and Startup parameters, not with console commands.
We have separate guides for these topics:
- Set admins: Add server owners to
ownerswhitelist.txtusing 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.
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! 🙂
