Overview
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!
Dedicated Server Tutorial
Game version: v1.07
This document explains how to launch a dedicated server for The Forest.
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.
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.
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”
The Server.cfg file is is automatically generated the first time you launch a dedicated server.
It is located there:
See comments below for usage of each entry (lines beginning with //).
The Server.cfg file initial content is:
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.