Sons Of The Forest

games
Report Issue

Sons of the Forest is a horror survival game and sequel to The Forest by Endnight Games, Ltd.. Sent to find a missing billionaire on a remote island, you find yourself in a cannibal-infested hellscape. Craft, build, and struggle to survive, alone or with friends.

Contributors:
README

Sons of the Forest

Game Description

Sons of the Forest is a horror survival game and sequel to The Forest by Endnight Games, Ltd.. Sent to find a missing billionaire on a remote island, you find yourself in a cannibal-infested hellscape. Craft, build, and struggle to survive, alone or with friends.

Useful links

Steam: https://store.steampowered.com/app/1326470/Sons_Of_The_Forest/

Author & Contributers

Name Github Profile Buy me a Coffee
gOOvER https://github.com/gOOvER ko-fi

Server Ports

Sons of the Forest requires up to 3 ports. You can choose every port you want.

Port default
Game 8766
Query 27016
BlobSyncPort 9700

Special Note

you need a minimum of 8GB RAM for the Server to run

Docker Images (1)
Name Image
ghcr.io/ptero-eggs/yolks:wine_latest ghcr.io/ptero-eggs/yolks:wine_latest
Startup Command
wine ./SonsOfTheForestDS.exe -userdatapath "/home/container/serverconfig" -dedicatedserver.IpAddress "0.0.0.0" -dedicatedserver.GamePort "{{SERVER_PORT}}" -dedicatedserver.QueryPort "{{QUERY_PORT}}" -dedicatedserver.BlobSyncPort "{{BLOBSYNC_PORT}}" -dedicatedserver.MaxPlayers "{{MAX_PLAYERS}}" -dedicatedserver.Password "{{SRV_PW}}" -dedicatedserver.GameMode "{{GAME_MODE}}" -dedicatedserver.SkipNetworkAccessibilityTest "{{SKIP_TESTS}}" -dedicatedserver.SaveSlot "{{SAVE_SLOT}}" -dedicatedserver.LogFilesEnabled "true" -dedicatedserver.TimestampLogFilenames "true"
Variables (15)

QueryPort

UDP port used by Steam to list the server and enable the discovery services.

Environment:
QUERY_PORT
Default:
27016
User Viewable:
User Editable:
Rules:
required|integer|between:1024,65536

BlobSyncPort

BlobSyncPort UDP port used by the BlobSync system to initialize game systems and exchange data.

Environment:
BLOBSYNC_PORT
Default:
9700
User Viewable:
User Editable:
Rules:
required|integer|between:1024,65536

Server Name

Name of the server visible in the server list, and in the Steam contacts.

Environment:
SRV_NAME
Default:
Pterodactyl hosted Server
User Viewable:
User Editable:
Rules:
required|string|max:60

Max Players

The maximum number of players allowed simultaneously on the server.

Environment:
MAX_PLAYERS
Default:
4
User Viewable:
User Editable:
Rules:
required|integer|between:1,8

Password

Environment:
SRV_PW
Default:
changeme
User Viewable:
User Editable:
Rules:
nullable|string

Gamemode

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.

Environment:
GAME_MODE
Default:
normal
User Viewable:
User Editable:
Rules:
string|in:normal,hard,hardsurvival,peaceful,custom

Auto Update

Environment:
AUTO_UPDATE
Default:
1
User Viewable:
User Editable:
Rules:
required|boolean

SRCDS_APPID

Environment:
SRCDS_APPID
Default:
2465200
User Viewable:
User Editable:
Rules:
required|string|max:20

WINEDEBUG

Environment:
WINEDEBUG
Default:
-all
User Viewable:
User Editable:
Rules:
required|string|max:20

WINEARCH

Environment:
WINEARCH
Default:
win64
User Viewable:
User Editable:
Rules:
required|string|max:20

WINEPATH

Environment:
WINEPATH
Default:
/home/container
User Viewable:
User Editable:
Rules:
required|string|max:20

WINETRICKS_RUN

Environment:
WINETRICKS_RUN
Default:
mono vcrun2019
User Viewable:
User Editable:
Rules:
required|string

WINDOWS_INSTALL

Environment:
WINDOWS_INSTALL
Default:
1
User Viewable:
User Editable:
Rules:
required|string|in:1

Skip network Test

if you have problems to connect to your server, set this to TRUE

Environment:
SKIP_TESTS
Default:
false
User Viewable:
User Editable:
Rules:
required|string|in:true,false

Save Slot

If you uploaded an existing save from your PC you can enter the save slot number here.

Environment:
SAVE_SLOT
Default:
0000000001
User Viewable:
User Editable:
Rules:
required|numeric|max:30
Installation Script
Container: ghcr.io/ptero-eggs/installers:debian
Entrypoint: bash
#!/bin/bash
# steamcmd Base Installation Script
#
clear
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
BLUE='\033[0;34m'
NC='\033[0m'

echo -e "${BLUE}-------------------------------------------------${NC}"
echo -e "${YELLOW}Sons of the Forest Installscript${NC}"
echo -e "${BLUE}-------------------------------------------------${NC}"

echo -e "${BLUE}-------------------------------------------------${NC}"
echo -e "${YELLOW}download and install steamcmd. please wait...${NC}"
echo -e "${BLUE}-------------------------------------------------${NC}"

## just in case someone removed the defaults.
if [[ "${STEAM_USER}" == "" ]] || [[ "${STEAM_PASS}" == "" ]]; then
    echo -e "steam user is not set.\n"
    echo -e "Using anonymous user.\n"
    STEAM_USER=anonymous
    STEAM_PASS=""
    STEAM_AUTH=""
else
    echo -e "user set to ${STEAM_USER}"
fi

## download and install steamcmd
cd /tmp
mkdir -p /mnt/server/steamcmd
curl -sSL -o steamcmd.tar.gz https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz
tar -xzvf steamcmd.tar.gz -C /mnt/server/steamcmd
mkdir -p /mnt/server/steamapps # Fix steamcmd disk write error when this folder is missing
cd /mnt/server/steamcmd

# SteamCMD fails otherwise for some reason, even running as root.
# This is changed at the end of the install process anyways.
chown -R root:root /mnt
export HOME=/mnt/server
echo -e "${GREEN}..done..${NC}"

## install game using steamcmd
echo -e "${BLUE}-------------------------------------------------${NC}"
echo -e "${YELLOW}install game using steamcmd. please wait...${NC}"
echo -e "${BLUE}-------------------------------------------------${NC}"
./steamcmd.sh +force_install_dir /mnt/server +login ${STEAM_USER} ${STEAM_PASS} ${STEAM_AUTH} $( [[ "${WINDOWS_INSTALL}" == "1" ]] && printf %s '+@sSteamCmdForcePlatformType windows' ) +app_update ${SRCDS_APPID} $( [[ -z ${SRCDS_BETAID} ]] || printf %s "-beta ${SRCDS_BETAID}" ) $( [[ -z ${SRCDS_BETAPASS} ]] || printf %s "-betapassword ${SRCDS_BETAPASS}" ) ${INSTALL_FLAGS} validate +quit ## other flags may be needed depending on install. looking at you cs 1.6
echo -e "${GREEN}..done..${NC}"

## set up 32 bit libraries
mkdir -p /mnt/server/.steam/sdk32
cp -v linux32/steamclient.so ../.steam/sdk32/steamclient.so

## set up 64 bit libraries
mkdir -p /mnt/server/.steam/sdk64
cp -v linux64/steamclient.so ../.steam/sdk64/steamclient.so

## add below your custom commands if needed

mkdir -p /mnt/server/serverconfig
FILE=$HOME/serverconfig/dedicatedserver.cfg
if [ -f "$FILE" ]; then
  echo -e "${BLUE}-------------------------------------------------${NC}"
  echo -e "${GREEN}dedicatedserver.cfg found.${NC}"
  echo -e "${BLUE}-------------------------------------------------${NC}"
else  
  echo -e "${BLUE}-------------------------------------------------${NC}"
  echo -e "${RED}No dedicatedserver.cfg found. Downloading default...${NC}"
  echo -e "${BLUE}-------------------------------------------------${NC}"
  cd $HOME/serverconfig/
  curl -sSL -o dedicatedserver.cfg https://raw.githubusercontent.com/ptero-eggs/game-eggs/main/sonsoftheforest/dedicatedserver.cfg
fi
echo -e "${GREEN}..done..${NC}"

FILE=$HOME/serverconfig/ownerswhitelist.txt
if [ -f "$FILE" ]; then
  echo -e "${BLUE}-------------------------------------------------${NC}"
  echo -e "${GREEN}ownerswhitelist.txt found.${NC}"
  echo -e "${BLUE}-------------------------------------------------${NC}"
else  
  echo -e "${BLUE}-------------------------------------------------${NC}"
  echo -e "${RED}No ownerswhitelist.txt found. Downloading default...${NC}"
  echo -e "${BLUE}-------------------------------------------------${NC}"
  cd $HOME/serverconfig/
  curl -sSL -o ownerswhitelist.txt https://raw.githubusercontent.com/ptero-eggs/game-eggs/main/sonsoftheforest/ownerswhitelist.txt
fi
echo -e "${GREEN}..done..${NC}"

## install end
echo -e "${BLUE}-------------------------------------------------${NC}"
echo -e "${GREEN}Installation completed...${NC}"
echo -e "${BLUE}-------------------------------------------------${NC}"