Hosting a Sons of the Forest Dedicated Server with a Batch File
Personally, I would use WindowsGSM to host a Sons of the Forest dedicated server, but I am going to show you how to do it with a batch file anyway. You can use my examples to get any game server working with a batch file. The big drawback is you don’t have any visual control, and have to do everything with commands. Hosting your own Sons of the Forest dedicated server with a batch file is also several more steps.
We assume you have already read the in’s and out’s of running your own server, things like the monthly costs, the hardware, and leaving your computer up 24/7. If you have not I recommend starting with this quick read, It can save you hours of time and frustration. Again I would recommend using WindowsGSM. You can take a look at that HERE.
YES! You will still need to open ports.
You can also host this game from GPortal, Paying for hosting has advantages and disadvantages, you can read about those HERE. IF you decide to use paid hosting, friends of the site get 10% off and it helps support me.
The files are ODT files which are just office files, you can open them with windows wordpad, but ten you will have to save them as plain text. Then you will need to open them with Note++ and save them as a batch file. This is mostly because my website blocks the use of plain text or batch files. Sorry about that but at least we shouldn’t be exposed to viruses.
So to summarize,
- Download the Batch.odt File
- Right Click Open with Wordpad
- Save file as .txt
- Right Click saved file and open with Note++
- Save as .bat
- Download Settings.ini file
- Right click open with wordpad
- Save as .txt file
- Right click saved file and open with Note++
- Save as .ini file
Setting Up the Folder Structure
I like the way WindowsGsm does the folders, you have one folder and inside of it a list of folders each being it’s own server, so I chose to duplicate. Once you start running a server, you pretty quickly add to it and before long you have a giant mess.
So my F drive, dedicated just to servers, is setup like this.
Now inside of the batch folder is a list of servers for each game.
Everything we are going to do will take place inside the Sons of the Forest folder.
Getting the Batch File Ready
- Inside the Sons of the Forest folder we are going to setup a new folder labeled steamcmd.
- Take the steamcmd file you downloaded earlier and drag it into this folder.
- We will also copy our batch file here. (should look exactly like the screenshot above.)
- Then we will right click and drag the batch file to the desktop and click create shortcut.
- Now go back to the batch file right click and edit with Note++
You need to edit lines,
- 4
- 6
- 8
- 10
- 16
- 20
- 25
- 31
Here is an explanation of what is going on in each step.
- 4 set SteamCMD_Dir=F:\Batch Servers\Sons of the Forest\Steamcmd
The first Line tells the batch file where to look for the Steamcmd file, make sure this is where you copied the file to.
- 6 Set Server_Dir=F:\Batch Servers\Sons of the Forest\Server
This tells the Batch file where the server files will be installed. You can make this whatever you want. Just make sure the path above matches exactly what you have setup. You do not have to create the folder after Icarus, just type it and it will be created for you.
- 8 Set Executable_Dir=F:\Batch Servers\Sons of the Forest\Server
This tells the batch file where to locate the IcarusServer-win64-shipping.exe file. This will need to be changed if you made any changes above.
- 10 Server_Executable=SonsOfTheForestDS.exe
This tells the server the name of the exectuable file it is looking for in step 8
- 16 Title server name
This sets the name you will see when your console window is open.
- 20 tasklist – at the end find “Batch Servers”
This is telling the batch file to look into the first folder on the drive that starts the path eventually leading to the server. If you changed your file structure from above you will need to modify this.
- 25 At the end +app_update 2465200
You will need to modify the +app_update number to be the correct number. (done for you in my file).
Open The Ports
You will need to open the following ports.
- 8766
- 27016
If you don’t know how to forward ports in your router, this page should have everything you need. It is normally easy to do once you have a general understanding of what you are trying to accomplish and if you have the username and password to the router. See how to open ports HERE for more help.
Server Configuration
In order to configure your server, you will need to go to your root drive (Usually C:)
your looking for C:\Users\Username\AppData\Locallow\Endnight\SonsOfTheForestDS\
- dedicatedserver.cfg
Here you will edit your server name, password and more importantly LanOnly :False AND SkipNetworkAccessibilityTest :true
You can leave the server IP at all 0.0.0.0
{
“IpAddress”: “0.0.0.0”,
“GamePort”: 8766,
“QueryPort”: 27016,
“BlobSyncPort”: 9700,
“ServerName”: “MYOS SOTF (dedicated)”,
“MaxPlayers”: 8,
“Password”: “nonee”,
“LanOnly”: false,
“SaveSlot”: 1,
“SaveMode”: “Continue”,
“GameMode”: “Normal”,
“SaveInterval”: 600,
“IdleDayCycleSpeed”: 0.0,
“IdleTargetFramerate”: 5,
“ActiveTargetFramerate”: 60,
“LogFilesEnabled”: false,
“TimestampLogFilenames”: true,
“TimestampLogEntries”: true,
“SkipNetworkAccessibilityTest”: true,
“GameSettings”: {},
“CustomGameModeSettings”: {}
}
You can also host this game from GPortal, Paying for hosting has advantages and disadvantages, you can read about those HERE. IF you decide to use paid hosting, friends of the site get 10% off and it helps support me.