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.
- Docker
- Docker Compose
- At least 8GB RAM
Once Docker and Docker Compose are installed, clone this repository to your local machine:
git clone https://github.com/RouHim/sons-of-the-forest-container-image.git
cd sons-of-the-forest-container-image
Before starting the server, create the required folder structure, and adjust the permissions:
mkdir config/ data/
chmod 777 config/ data/
The
chmod
command is recommended to avoid permission issues. The main reason is, that the user in the container, most likely differs from the user on the host.
To start the Sons of the Forest server, navigate to the cloned repository's directory and use Docker Compose:
docker compose pull
docker compose up -d
This will pull 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
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 totrue
.
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 totrue
, 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.
- Inspired by: https://github.com/jammsen/docker-sons-of-the-forest-dedicated-server
- Built from: https://github.com/RouHim/sons-of-the-forest-container-image
- Built to: https://hub.docker.com/r/rouhim/sons-of-the-forest-server
- Based on: https://github.com/RouHim/steamcmd-wine-container-image
- SteamCMD Documentation: https://developer.valvesoftware.com/wiki/SteamCMD
- Dedicated server guide: https://steamcommunity.com/sharedfiles/filedetails/?id=2992700419&snr=1_2108_9__2107