Watch the video:
0:00 - Intro
0:20 - Getting Sons Of The Forest Dedicated Server
0:40 - Downloading SteamCMD
1:49 - Downloading Sons Of The Forest Dedicated Server
3:27 - Generating configuration files
4:05 - Adding admins ot Sons Of The Forest Dedicated Server
5:30 - Firewall rules
6:29 - Starting & joining your private server
8:03 - Port Forwarding & Playing with friends
A free server? How?
Simple. You can use your own computer and hardware to run the dedicated server software. You can have a private server online 24/7, as long as you have it running. It’s completely free because it uses your own electricity, internet and processing power. You can customize it to have as many slots as you want, and more. This is everything you need to know.
Download the dedicated server
First, you need to download The Sons Of The Forest Dedicate Server. There are 2 ways of doing this. The first (not recommended) is using the Steam client. You should see under Tools
: Sons Of The Forest Dedicated Server
assuming you own the game on Steam.
Otherwise, the better way, is using an official Valve tool called SteamCMD.
- Make a new folder for the server and SteamCMD. I’ll call this
sotf
, on my Desktop, for example. - Download SteamCMD from here - Look for the
Windows
section, and click the[1]
next to “Download SteamCMD for Windows: [1]” - Extract
steamcmd.zip
into a new folder calledsteamcmd
. This will besotf\steamcmd\
- Click at the very top where your Windows Explorer’s folder path is and type
cmd
. You should see the CMD window shows something similar toC:\Users\techn\Downloads\sotf>
. If not, usecd <path>
to change to thesotf
directory containingsteamcmd
. - Add the following to a file called
update.bat
. This will be run later to install and update Sons of The Forest Dedicated Server.
|
|
You should now have a server
folder with the Sons Of The Forest Dedicated Server installed in it.
The server
folder contains SonsOfTheForestDS.exe
. These files are the same ones you’d find if you downloaded via Steam and opened the install folder.
Now we’re in the same place.
I’d recommend creating an start.bat
file that both checks for an update AND launches the server immediately after. You can find the code you’d need for that here:
|
|
This file you’d use to start your server in future, instead of the server\StartSOTFDedicated.bat
.
Set up server
To generate config files you need to run the server at least once. Run StartSOTFDedicated.bat
to start the server.
It will eventually say [Self-Tests] Please restart the server
. Close the window at this point.
Press Start+R
and enter %localappdata%low\Endnight\SonsOfTheForestDS
This will open the SonsOfTheForestDS
folder in LocalLow that has all the config for your server.
Give admin
To give players and yourself admin on the server, open ownerswhitelist.txt
in the above folder and on a new line at the end: Simply add your SteamID and nothing else.
Add each player you want to have admin on a new line at the very end of the file.
Configure server
To change settings for the server like password, max number of players and more simply open and customize dedicatedserver.cfg
.
The most important options will be ServerName
, MaxPlayers
, Password
, and SaveInterval
.
After giving your server a name and customizing it as you see fit save the file prepare to handle the.
If you’re going to test the server before port forwarding: You need to set LanOnly
to false
, otherwise the server won’t start up.
Firewall
At this point running the server will allow people on your computer to connect.
If you’re using the Windows Firewall you can simply run these commands in an elevated (admin) PowerShell window. Just hit Start
and open PowerShell as admin.
We need to allow the following ports to let the server reach other players on our network, and later the internet: 8766,27016,9700
, all UDP. Run the following commands to allow Sons Of The Forest Dedicated Server through your firewall:
|
|
If you ever wish to remove your Firewall rules for this, run the command: Remove-NetFirewallRule -DisplayName "Sons Of The Forest"
Now when you run the server, players on your local network should be able to connect, assuming there isn’t a third-party firewall like an Anti-Virus on your computer. In which case you need to allow the ports through your firwall there too.
Port Forward
To allow players in other networks to connect over the internet you need to port forward.
This sounds difficult and confusing, but is actually simple. We’re telling the router we’re connected to, to send traffic that it recieves on specific ports straight to our computer.
On each router between you and the internet you need to port forward to the next device in the chain so the internet-facing router points almost directly to your computer.
In most setups this will just be your ISP-provided router that you log into using the settings written on the box to log into the gateway login page, such as 192.168.1.1
. Heading to the port forwading section you’ll enter the above UDP ports and send them to your computer. To get your computers local IP: Press Start+R
and type cmd
. Hit Enter. In the new CMD window type ipconfig
and look for the way you’re connected to the internet. Then you should see Local IPv4 address
. Most likely something like 192.168.1.16
.
If there’s more than one router between you and the internet: repeat the steps above for each router along the chain, pointing from one to the next router until you eventually forward to your computer.
Need more info or help?
This guide has a simplified explanation of how to port forward:
You can start from 3:30 as we’ve already covered the firewall!
Otherwise, if you have a multi-router network, this guide is for you as well:
Running your server
At this point everything should be set up for you and your friends to play. Start your server with StartSOTFDedicated.bat
, and as long as it’s running friends should be able to join your server and play.
Head to the Multiplayer section of the menu and select LAN if you’re on the same computer you’re hosting the server on, or on the same local network.
Assuming you’ve port forwarded and set LanOnly
back to true
in the config file other players over the internet should be able to join your server and play with you.
That’s it.
Enjoy your Sons Of The Forest server.