The Forest
324 avaliações
Dedicated Server Tutorial
Por Survivalist e 3 colaborador(es)
This guide explains how to host the newly added Dedicated Servers! This is just the first pass, so be sure to report any bugs you find!
2
   
Premiar
Adic. a Favoritos
Nos Favoritos
Desfavoritar
Dedicated Server Tutorial
The Forest Dedicated Server
Game version: v1.07
This document explains how to launch a dedicated server for The Forest.


Installing and launching the dedicated server app
In the Library tab select Tools. Locate The Forest Dedicated Server and install it.
If launching from Steam does not result in the server showing up in the Internet server list, try launching it directly from the executable or a shortcut instead.

You can download the tool either through the Steam tool section, or SteamCMD if you would like to avoid signing into steam entirely!

Note: Running a server silently in background can be achieved by launching it with -batchmode as command line parameter.


Configuring
There are 2 ways to configure the dedicated server:
  • Using command line parameters.
  • Using the Server.cfg file.
Note: Command line parameters overwrite matching entries defined in the config file.


Using the command line configuration
To launch a dedicated server using the command line tool you need:
  • Open the ports 8766, 27015 and 27016 (on your router and firewall) for TCP/UDP.
  • Create a shortcut and add:
  • -serverip xxx.xxx.xxx.xxx -serversteamport 8766 -servergameport 27015 -serverqueryport 27016 -servername TheForestGameDS -serverplayers 8 -difficulty Normal -inittype Continue -slot 1
  • Run the game or dedicated server using this shortcut.

The available command lines parameters are:
  • -serverip <ip> // Must be set to the server ip on the local network
  • -serversteamport <port> // Set the steam server port, default is 8766
  • -servergameport <port> // Set the server game port, default is 27015
  • -serverqueryport <port> // Set the server game port, default is 27016
  • -servername <name> // Set the server display name
  • -serverplayers <maxPlayers> // Set the max. number of players, default is 8
  • -serverpassword <password> // Set the server password, default is none
  • -serverpassword_admin <password> // Set the server admin password, default is none
  • -serversteamaccount <name> // Set the steam account, blank means anonymous (see Steam server account bellow)
  • -enableVAC // Enable Valve Anti Cheat
  • -serverautosaveinterval <Interval> // Set the autosave interval in minutes, default is 15
  • -difficulty <Peaceful|Normal|Hard> // Set the game difficult level, default is Normal
  • -inittype <New|Continue> // Set the init type of game, default is New
  • -slot <1|2|3|4|5> // Set the save slot to use, default is 1
  • -showlogs // Enable server log window
  • -veganmode // Enable the vegan mode cheat (no enemies)
  • -vegetarianmode // Enable the vegetarian mode cheat (no enemies during daytime)
  • -resetholesmode // Reset all existing floor holes when loading a save
  • -treeregrowmode // Enable Tree regrowth when sleeping
  • -nobuildingdestruction // Enemie and players cannot destroy buildings
  • -allowenemiescreative // Enable enemy spawn in creative games
  • -allowcheats // Allow clients to use the built in development console
  • -configfilepath // Changes the config file path used by the server
  • -savefolderpath // Allows defining a custom folder for save slots
  • -realisticPlayerDamage // Realistic Player Damage (On/Off)
Note: for the config file path, folder must exist but file can be generated by launching the DS. Use forward slashes. Example: -configfilepath "d:/Your/Custom/Path/YourServerConfigFileName.cfg"


Using the Server.cfg file configuration
The Server.cfg file is is automatically generated the first time you launch a dedicated server.

It is located there:
C:\Users\USER\AppData\LocalLow\SKS\TheForestDedicatedServer\ds\Server.cfg

See comments below for usage of each entry (lines beginning with //).
The Server.cfg file initial content is:
// Dedicated Server Settings. // Server IP address - Note: If you have a router, this address is the internal address, and you need to configure ports forwarding, append the current game port here as well serverIP 192.168.1.47:27015 // Steam Communication Port - Note: If you have a router you will need to open this port. serverSteamPort 8766 // Game Communication Port - Note: If you have a router you will need to open this port. serverGamePort 27015 // Query Communication Port - Note: If you have a router you will need to open this port. serverQueryPort 27016 // Server display name serverName The Forest Game // Maximum number of players serverPlayers 8 // Server password. blank means no password serverPassword // Server administration password. blank means no password serverPasswordAdmin // Your Steam account name. blank means anonymous (see Steam server account bellow) serverSteamAccount // Enable VAC (Valve Anti Cheat) on the server. off by default, uncomment to enable enableVAC off // Time between server auto saves in minutes serverAutoSaveInterval 15 // Game difficulty mode. Must be set to "Peaceful" "Normal" or "Hard" difficulty Normal // New or continue a game. Must be set to "New" or "Continue" initType New // Slot to save the game. Must be set 1 2 3 4 or 5 slot 1 // Show event log. Must be set "off" or "on" showLogs off // Contact email for server admin serverContact email@gmail.com // No enemies. Must be set to "on" or "off" veganMode off // No enemies during day time. Must be set to "on" or "off" vegetarianMode off // Reset all structure holes when loading a save. Must be set to "on" or "off" resetHolesMode off // Regrow 10% of cut down trees when sleeping. Must be set to "on" or "off" treeRegrowMode off // Allow building destruction. Must be set to "on" or "off" allowBuildingDestruction on // Allow enemies in creative games. Must be set to "on" or "off" allowEnemiesCreativeMode off // Allow clients to use the built in development console. Must be set to "on" or "off" allowCheat off // Allows defining a custom folder for save slots, leave empty to use the default location saveFolderPath // Target FPS when no client is connected targetFpsIdle 5 // Target FPS when there is at least one client connected targetFpsActive 60

Steam server account
To help players to locate your server after playing on it, Steam offers a way to identify servers.
You first need to create an ID for your server at this address Steam Community :: Steam Game Server Account Management. The appid for The Forest is 242760. As stated on that page, it is recommended to not share your server login token.
Once you have created your server ID, copy the login token and put it in either the command line -serversteamaccount <token> or in the Server.cfg file serverSteamAccount <token> and restart your server.
453 comentários
MACAch 12 de mar. às 4:13 
When I start *.exe file of server, I can connect server including from external network, but only once. The next try to connect returns Incorrect password for client and "Steam auth - clientId XXX.. status False" at log window. Who can help with this problem?
Sabo 1 nov. 2023 às 14:39 
I did everything shown here and now, I'm trying to use "TheForestDedicatedServer.exe" along with the server.cfg. I can get the server to try and start but it never actually starts. I get a bunch of errors while trying to start the server like "Exception: NullReferenceException: Object reference not set to an instance of an object". The server stops at "Log: Game autosave started". I'm not sure if that's supposed to be the end of the console or not.

I know its not a port issue as I can see in my resource manager that TheForestDedicatedServer.exe is listening on port 27015. I have the 3 ports in the server.cfg port forwarded in my router correctly too.
Sreolla 22 set. 2023 às 6:36 
I had same issue could only see lan and would not even let me join, right clicked it and launched as admin and worked right away
Ford 3 set. 2023 às 10:19 
not sure if this has been beat to death but when i launch the server, i get black screen with the food/water icon.. server is visible online but no bueno
Puffletops 13 ago. 2023 às 4:56 
@simsmax did you manage to set up the dedicated server?
Simsmax 9 ago. 2023 às 12:53 
Not working, is a problem of the version? giving "Exception: NullReferenceException: Object reference not set to an instance of an object" when running with logs on.
Nocturnal Immersion 5 mar. 2023 às 12:14 
As long as you aren't running the servers at the same time you can use the same ports. If you are running multiple servers from the same Internet IP address, you'll need to change one set of ports to something else. Just add 10 or 5 or 69 to each port address and you'll be fine.
brkbeatjunkie 12 fev. 2023 às 5:00 
Can two games use 27015 concurrently or should I change that port for each game?
Unpopular Monster 21 jan. 2023 às 0:41 
I installed the dedicated server forest and launched it from steam, all i get is the endgames logo then it goes black and wont load anything after
Buy Your Merch 19 jan. 2023 às 15:35 
It works fine, But if some people not working. You should open it administration, If not working then make sure you are anonymouse!