Skip to content

max-pfeiffer/sotf-dedicated-game-server-docker

Repository files navigation

Poetry Ruff codecov pipeline workflow

Sons of the Forest Dedicated Game Server - Docker Image

Docker build

docker build --tag sotf .

Docker Run

docker run --rm -it --publish 8766:8766/udp --publish 9700:9700/tcp --publish 27016:27016/tcp sotf

Information Sources

Environment Variables:

Server Configuration

Key Values Default Value Description
IPADDRESS Any IPv4 address formatted string 0.0.0.0 Listening interface for the game server, usually 0.0.0.0 if listening on all interfaces.
GAMEPORT Integer 8766 UDP port used for gameplay netcode (Bolt).
QUERYPORT Integer 27016 UDP port used by Steam to list the server and enable the discovery services.
BLOBSYNCPORT Integer 9700 BlobSyncPort UDP port used by the BlobSync system to initialize game systems and exchange data.
SERVERNAME String My Sotf Server Name of the server visible in the server list, and in the Steam contacts.
MAXPLAYERS Integer 8 The maximum number of players allowed simultaneously on the server. (1 - 8)
PASSWORD String Adds a password to make your server “private”. Upon connection, this password will be requested before the client can proceed. (Max. 40 chars)
LANONLY Bool false Allows or restricts the server visibility to LAN only.
SAVESLOT Integer 1 When creating a new save, this number will be the id of the save.
SAVEMODE New
Continue
Continue Game save initialization mode.
continue”: will create a new save on SaveSlot if it doesn’t exist, or load it if it exist.
new”: will create a new game, with a new game id, and overwrite any game previously saved on the SaveSlot. If the server stops and restarts, the previous save will be overwritten for as long as the mode is set to “new”.
GAMEMODE Normal
Hard
Hardsurvival
Peaceful
Creative
Custom
Normal Sets the difficulty game mode when creating a new save. This parameter is ignored if loading a save (save mode set to “continue” with a save that exists on the slot). If the game mode is set to “custom”, then the custom game mode settings will be read from CustomGameModeSettings option, described later.
SAVEINTERVAL Integer 600 How often the game server automatically saves the game to SaveSlot, in seconds.
IDLEDAYCYCLESPEED Float 0.0 A multiplier to how quickly the time passes compared to normal gameplay when the server is considered idle (no player connected).
IDLETARGETFRAMERATE Integer 5 Target framerate of the server when it’s considered idle (no player connected).
ACTIVETARGETFRAMERATE Integer 60 Target framerate of the server when it’s NOT considered idle (one or more player connected).
LOGFILESENABLED Bool true Defines if the logs will be written to files. The logs will be output in /logs.
TIMESTAMPLOGFILENAMES Bool true Enabled log files timestamping.
true”: every time the server runs will dump log output to a new file, with filename having the following format: sotf_log_{DateTime:yyyy-MM-dd_HH-mm-ss}.txt
false”: the filename will be sotf_log.txt and previous log will be overwritten if it already exists.
TIMESTAMPLOGENTRIES Bool true Enables each log entry written to file to be timestamped.
SKIPNETWORKACCESSIBILITYTEST Bool false Opt-out of network accessibility self tests: retrieval of the public IP and listing on Steam Master Server, as well as port accessibility check. Please note that only IPv4 is officially supported.

Game Configuration

Key Value Default Value Description
TREEREGROWTH Bool true Enable automatic tree regrowth, triggered when sleeping.
STRUCTUREDAMAGE Bool true Allow buildings to be damaged.

Custom game mode settings

These settings are only required if the game mode is set to Custom

Key Value Default Value Description
CHEATS Bool false Allows cheats on the server.
ENEMYSPAWN Bool true Enable enemies spawning.
ENEMYHEALTH Low
Normal
High
Normal Adjust enemy starting health.
ENEMYDAMAGE Low
Normal
High
Normal Adjust damage enemies can do.
ENEMYARMOUR Low
Normal
High
Normal Adjust enemies armor strength.
ENEMYAGGRESSION Low
Normal
High
Normal Adjust enemy aggression level.
ANIMALSPAWNRATE Low
Normal
High
Normal Adjust animal spawn rate.
ENEMYSEARCHPARTIES Low
Normal
High
Normal Adjust the frequency of enemy search parties.
STARTINGSEASON Spring
Summer
Autumn
Winter
Summer Set environmental starting season.
SEASONLENGTH Short
Default
Long
Realistic
default Adjust season length.
DAYLENGTH Short
Default
Long
Realistic
default Adjust day length.
PRECIPITATIONFREQUENCY Low
Default
High
default Adjust the frequency of rain and snow.
CONSUMABLEEFFECTS Normal
Hard
Normal Enable damage taken when low hydration and low fullness.
PLAYERSTATSDAMAGE Off
Normal
Hard
Normal Enable damage from each bad or rotten food and drink.
COLDPENALTIES Off
Normal
Hard
Normal Adjusts the severity that cold will affect health and stamina regeneration.
STATREGENERATIONPENALTY Off
Normal
Hard
Normal Reduces the rate that health and stamina will regenerate.
REDUCEDFOODINCONTAINERS Bool false Reduces the amount of food found in containers.
SINGLEUSECONTAINERS Bool true Containers can only be opened once.
BUILDINGRESISTANCE Low
Normal
High
Normal Adjust building resistance to attacks.
CREATIVEMODE Bool false Enable creative mode game.
PLAYERSIMMORTALMODE Bool false Enable god mode for all players.
FORCEPLACEFULLLOAD Bool false If true, everything players have in hands will be placed in a single click (stones, stone floors, wood floors)
NOCUTTINGSSPAWN Bool false If true, disable cuttings spawning.
ONEHITTOCUTTREE Bool false Enable chopping tree with a single hit.

All descriptions are from Dedicated Server Configuration Guide

About

Docker container providing a Sons of the Forest dedicated game server

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •