Skip to content

Provides a (docker) container image for the Sons of the Forest game server.

Notifications You must be signed in to change notification settings

ALTERRQ/sotf-server

 
 

Repository files navigation

Pipeline Pipeline Docker Hub pulls Docker Hub size trivy os-arch Donate me

This repository provides a safe container image for the Sons of the Forest game server. It is designed to be used with Docker Compose, making it easy to set up and manage your game server environment.

Requirements

Installation

Once Docker and Docker Compose are installed, clone this repository to your local machine:

git clone https://github.com/ALTERRQ/sotf-server.git
cd sotf-server

Usage

To start the Sons of the Forest server, navigate to the cloned repository's directory and use Docker Compose:

docker compose build
docker compose up -d

This will build the latest image and start the server in detached mode.

When starting the server for the first time:

  • The config files and folders will be automatically created in the config/ folder.
  • The server will download the latest version of the game from Steam to the data/ folder.

You have to restart after the first start.

To restart the server after making changes to the configuration, use the following command:

docker compose restart

To check the server logs, use the following command:

docker compose logs -f

Update

To update the server, just restart the container. The server checks for updates and validates on every boot per default.

To skip update and validation of the server files on every boot, set the FAST_BOOT env variable to true.

Log filtering

Although this dedicated server generates numerous unnecessary errors and debug logs, this does not indicate malfunction. This project filters out these logs by default.

To turn off log filtering, set the FILTER_SHADER_AND_MESH_AND_WINE_DEBUG env variable to false.

Configuration

The server configuration does not differ from the official server configuration. Just follow an existing server configuration guide like this.

The config folder contains the configuration files for the game server:

  • The server owners list, in a file called ownerswhitelist.txt
  • The game server configuration, in a file called dedicatedserver.cfg
  • The game saves, in a folder called Saves
  • The game settings, in a file called SonsGameSettings.cfg

All files and folders in the config will be created automatically when the server is started for the first time.

SkipNetworkAccessibilityTest is always forced to true, because the test method is not working in a container environment.

The data/ folder contains the game server data. Feel free to modify files in this folder, but be aware that the game server must be restarted for changes to take effect. The folder can be deleted to reset the game server to its default state.

Troubleshooting

Try:

  • Try to change server type (far left at the join tab)
  • Direct connect to the server: Example: 192.168.1.100:27016 (the option bottom right at the join tab)
  • Disable any virtual or real network adapters on your pc except the main one (VirtualBox, NordVPN)
  • Test via Steam server discovery: (Steam/View/Game Servers), test the LAN discovery or try to add server to favourites by the same syntax as the above suggestion
  • If you can connect inside your LAN, but your friends can't from WAN, you need to setup your routers port forwarding, and firewall rules properly
  • Try to change the ports (they can be used already, or your ISP is blocking them over the WAN) (you will need to change them at 3 places inside this project + your firewall)
  • Set container to host networking
  • Use Google, forums, or some AI

If you think everything is set up properly, and you still can't connect to your server, then you could have this problem:

Bad client side config files.

  • They can prevent you from discovering, and connecting to any LAN server.
  • Deleting them is the solution, but be carefull, because they hold all your settings and game saves
  • You also should temporarely disable Steam Cloud for SOTF, otherwise Steam will just redownload the faulty files
  • They are located at C:\Users\$USERNAME\AppData\LocalLow\Endnight\SonsOfTheForest on Windows

I recommend you to:

  1. Disable Steam Cloud for SOTF (This could have saved me 4 days)
  2. Turn off Steam compleately
  3. Backup your Saves inside the SonsOfTheForest folder into a different location
  4. Screenshot your important settings in the game (if you need them)
  5. Delete the folder
  6. Launch SOTF, check if you can see the server in the LAN section or can connect to it directly, then stop
  7. Copy back your Saves folder
  8. Dial back your important settings
  9. Turn back Steam Cloud
  10. Play

If you still can't connect, then you can try the: CUSTOM_ACCESSIBILITY_TEST It checks if the server is accessible, to rule out bad networking configuration

Hier is how to do it:

  1. Launch the server with DO_CUSTOM_ACCESSIBILITY_TEST set to true
  2. When the test appears launch: ./assessibility-test.sh $SERVER_IP from a client computer and make sure it's not blocked by a firewall (Default inbound port: 18766 for client)

It will try to do a handshake with your server 3 times. If it succeeds, then we ruled out bad network configuration.

If you still have problems try to get help on the UPSTREAM repo or other forums

Resources

About

Provides a (docker) container image for the Sons of the Forest game server.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 96.1%
  • Dockerfile 3.9%