The Forest Dedicated Server Setup Guide
This guide covers how to configure your The Forest dedicated server on Legion Hosting, including config.cfg settings, difficulty modes, save management, and how to connect.
Accessing Your Server Panel
All server management is done through GPanel at gpanel.legionhosting.net. Log in with your Legion Hosting credentials to access your file manager, console, and server controls.
Configuration File (config.cfg)
The main server configuration file is config.cfg, located at:
TheForestDedicatedServer_Data/forest/config/config.cfg
You can edit it directly through the GPanel file manager or via SFTP. After making changes, restart your server for them to take effect.
Server Identity
| Setting | Example Value | Description |
|---|---|---|
serverName |
My Forest Server |
The name displayed in the server browser. Keep it unique and descriptive. |
serverPassword |
secretpass |
Password required to join. Leave blank for a public server. |
maxPlayers |
8 |
Maximum number of players allowed (1–8). |
serverSteamAccount |
(your token) |
Steam Game Server Login Token (GSLT). Required for the server to appear in the Steam server browser. Generate one at steamcommunity.com/dev/managegameservers using App ID 242760. |
Gameplay Settings
| Setting | Values | Description |
|---|---|---|
difficulty |
0, 1, 2, 3 |
Difficulty mode. See the Difficulty Modes section below for details. |
veganMode |
true / false |
Disables all enemies (cannibals and mutants) when set to true. |
vegetarianMode |
true / false |
Enemies only appear at night when set to true. |
allowBuildingDestruction |
true / false |
Whether enemies can destroy player-built structures. |
allowEnemiesCreativeMode |
true / false |
Enables enemies even when creative mode is active. |
allowTrees |
true / false |
Controls whether cut trees regrow over time. |
enableSpawnRegion |
true / false |
Restricts player spawns to the crash site area. |
Network Settings
Your assigned game port and query port are shown in GPanel's Network tab. Ensure the serverPort and serverQueryPort values in config.cfg match your assigned ports.
| Setting | Description |
|---|---|
serverPort |
Primary game port (UDP). Must match the game port shown in GPanel's Network tab. |
serverQueryPort |
Steam query port (UDP). Must match the query port shown in GPanel's Network tab. |
serverIP |
IP to bind to. Leave as 0.0.0.0 to bind all interfaces (recommended). |
Save Settings
| Setting | Example Value | Description |
|---|---|---|
saveFolderPath |
TheForestDedicatedServer_Data/ |
Directory where save files are stored, relative to the server root. Defaults to TheForestDedicatedServer_Data/ if not set. |
slot |
1 |
Save slot number (1–5). Each slot is an independent world. |
initType |
New / Continue |
Set to New to start a fresh world, or Continue to load an existing save. |
initType from New to Continue. If left as New, restarting the server will wipe the world and start fresh.
Difficulty Modes
The difficulty setting controls the overall challenge level of the server:
| Value | Mode | Description |
|---|---|---|
0 |
Peaceful | No enemies. Ideal for building-focused servers. |
1 |
Normal | Standard difficulty. Balanced survival experience. |
2 |
Hard | Increased enemy aggression and fewer resources. |
3 |
Hard Survival | Most challenging mode. Realistic survival mechanics, permadeath on some settings. |
veganMode and vegetarianMode settings override the difficulty value with respect to enemy spawning. If either is true, enemies will be suppressed regardless of the difficulty level set.
How to Connect to Your Server
Finding Your IP and Port
Before connecting, you will need your server's IP address and port. See our guide: How to Find Your Server IP and Port.
Your assigned game port and query port are shown in GPanel's Network tab. Ensure the serverPort and serverQueryPort values in config.cfg match your assigned ports.
Method 1: Steam Server Browser
- In Steam, open View > Game Servers.
- Click the Favorites tab, then click Add a Server.
- Enter your server's IP and query port (from GPanel's Network tab) in the format
your.ip.address:QueryPortand click Add This Address to Favorites. - Your server should appear in the list. Double-click it or select it and click Connect.
- If the server has a password, you will be prompted to enter it.
Method 2: Direct Connect In-Game
- Launch The Forest and select Multiplayer from the main menu.
- Choose Join Game, then switch to the Friends / LAN tab.
- If your server is not listed automatically, look for a Direct Connect or Enter IP option and enter your server IP and game port (from GPanel's Network tab).
serverSteamAccount (GSLT) must be set in config.cfg. Without a valid token, the server will only be reachable via direct connect.
Save File Management
Save File Location
Save files are stored in the directory defined by saveFolderPath in config.cfg. By default this is the TheForestDedicatedServer_Data/ folder within your server root. Each save slot is a numbered subfolder (e.g., TheForestDedicatedServer_Data/1/, TheForestDedicatedServer_Data/2/).
Backing Up a Save
- Stop your server from GPanel to prevent data corruption during copy.
- Navigate to the
TheForestDedicatedServer_Data/directory in the GPanel file manager or connect via SFTP. - Download the entire slot folder (e.g.,
TheForestDedicatedServer_Data/1/) to your local machine. - Restart your server when done.
Restoring a Save
- Stop your server.
- Upload your backup slot folder back to the correct path (e.g.,
TheForestDedicatedServer_Data/1/), overwriting the existing files. - Ensure
initTypeis set toContinueandslotmatches the slot number you restored. - Start your server.
Starting a New World
- Stop your server.
- Change the
slotvalue inconfig.cfgto an unused slot number (e.g.,2), or delete the contents of the current slot folder to wipe it. - Set
initTypetoNew. - Start your server. Once the world has generated, set
initTypeback toContinue.
Related Articles
- The Forest Server Admin and Host Controls — Admin list, whitelist, and in-game commands
- The Forest Server Troubleshooting — Common issues and solutions
Still Need Help?
If you have followed this guide and are still experiencing issues, our support team is available to assist. Open a support ticket and include your server ID, a description of the problem, and any relevant console output.