Sons of the Forest Dedicated Server Setup Guide
This guide covers everything you need to configure, connect to, and manage your Sons of the Forest dedicated server hosted with Legion Hosting. Your server is managed through GPanel.
Server Configuration File
The main server configuration file is dedicatedserver.cfg. You can edit this file directly through the GPanel file manager or via SFTP.
Locating the Config File
The config file is located in your server's root directory:
dedicatedserver.cfg
Configuration Options
Below is a full reference for the available settings in dedicatedserver.cfg.
| Setting | Default | Description |
|---|---|---|
ServerName |
"Sons Of The Forest" |
The name displayed in the server browser and on the Steam server list. |
ServerPassword |
"" |
Password required to join. Leave empty for a public server. |
MaxPlayers |
4 |
Maximum number of players allowed on the server at one time. Default is 4, maximum supported value is 8. |
SaveSlot |
1 |
Which save slot the server uses (1–3). Each slot is a separate world. |
SaveInterval |
600 |
How often the server auto-saves in seconds. Default is 10 minutes (600). |
GameMode |
"normal" |
Sets the difficulty and rules. Values are lowercase. See Game Mode Options below. |
GameSeed |
"" |
Optional world generation seed. Leave empty for a random seed. Set before first launch. |
ServerPort |
— | The main game port (UDP). Check the Network tab in GPanel for your assigned port. Do not change this unless instructed by support. |
ServerQueryPort |
— | The Steam query port (UDP) used for the server browser. Check the Network tab in GPanel for your assigned port. |
BlobSyncPort |
— | The blob sync port (UDP) used for world data synchronisation between server and clients. Check the Network tab in GPanel for your assigned port. |
SkipNetworkAccessibilityTest |
false |
Set to true to skip the network test on startup. Useful if the test causes slow starts. |
LanOnly |
false |
If true, the server will not be visible on the public Steam server list. |
LogFilesEnabled |
true |
Enables server-side log file generation for troubleshooting. |
Example Configuration
Replace the port values below with the actual ports assigned to your server. Check the Network tab in GPanel for your specific port numbers.
{
"ServerName": "My SOTF Server",
"ServerPassword": "mypassword",
"MaxPlayers": 4,
"SaveSlot": 1,
"SaveInterval": 600,
"GameMode": "normal",
"GameSeed": "",
"ServerPort": YOUR_GAME_PORT,
"ServerQueryPort": YOUR_QUERY_PORT,
"BlobSyncPort": YOUR_BLOB_SYNC_PORT,
"SkipNetworkAccessibilityTest": false,
"LanOnly": false,
"LogFilesEnabled": true
}
dedicatedserver.cfg, you must restart your server from GPanel for the changes to take effect.
Game Mode Options
The GameMode setting controls difficulty and survival rules. Set this before your first launch as changing it on an existing save may not fully apply.
| Value | Description |
|---|---|
"normal" |
Standard survival experience with balanced enemy AI, hunger, thirst, and full game systems. |
"hard" |
Increased enemy difficulty, faster resource consumption, and reduced survival margins. |
"hardsurvival" |
Most challenging mode. Permanent death and the harshest survival conditions. |
"peaceful" |
Enemies are passive, allowing players to focus on exploration and building without combat. |
"custom" |
Allows custom gameplay settings. Use this mode to fine-tune individual difficulty parameters. |
How to Connect to Your Server
Finding Your Server IP and Port
Your server IP and assigned ports are displayed in GPanel's Network tab. For detailed instructions, see: How to Find Your Server IP and Port.
Sons of the Forest uses three ports (game, query, and blob sync). These are assigned automatically by GPanel. Check the Network tab and Startup tab for your specific assigned port numbers, and ensure the values in dedicatedserver.cfg match.
Option 1: Direct Connect via Steam
- Open Steam and click View in the top menu bar.
- Select Game Servers.
- Click the Favorites tab, then click Add a Server.
- Enter your server IP and query port (from GPanel's Network tab) in the format
IP:QueryPort. - Click Find Games at this Address, then Add to Favorites.
- Launch Sons of the Forest, go to Multiplayer > Join Game, and select your server from favorites.
Option 2: Steam Server Browser (In-Game)
- Launch Sons of the Forest and select Multiplayer from the main menu.
- Choose Join Game, then select the Internet tab.
- Use the search/filter to find your server by name, or click Connect by IP if available.
- Enter your server password if one is set, and join.
Save Management
Save Slots
Sons of the Forest supports up to 3 independent save slots per server. The active slot is controlled by the SaveSlot setting in dedicatedserver.cfg. Each slot maintains its own world state, player data, and progress.
To switch worlds, change the SaveSlot value (1, 2, or 3) and restart your server.
Save File Location
Server save files are stored in the following path on your server:
saves/
Each save slot has its own subfolder within this directory. The structure looks like:
saves/
Slot1/
Slot2/
Slot3/
Uploading a Save via SFTP
You can upload an existing save from a local single-player game or another server to your dedicated server using SFTP. For full SFTP connection instructions, see: How to Upload Files via SFTP.
- Stop your server from GPanel before uploading files.
- Connect to your server via SFTP using the credentials shown in GPanel.
- Navigate to the
saves/directory on your server. - Upload your local save folder into the corresponding slot folder (e.g.,
Slot1/). - Ensure
SaveSlotindedicatedserver.cfgmatches the slot you uploaded to. - Start your server from GPanel.
%APPDATA%\LocalLow\Endnight\SonsOfTheForest\Saves\Copy the relevant save folder into the appropriate slot directory on your server.
Backing Up Saves
It is recommended to periodically back up your save files via SFTP. Download the entire saves/ directory to a safe location on your local machine before making major changes or updates.
Related Articles
- Sons of the Forest Troubleshooting — Crashes, memory issues, connection problems, and save troubleshooting
- How to Find Your Server IP and Port
- How to Upload Files via SFTP
Need Further Help?
If you are still experiencing issues after following this guide, please open a support ticket and include:
- A description of the issue and when it started
- Your server ID or IP address from GPanel
- Any relevant error messages from the server console or log files