Egg Repository

Pterodactyl Community Egg Repository

Sons Of The Forest

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.

Read Me

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

Yolks
NameTag
ghcr.io/ptero-eggs/yolks:wine_latestghcr.io/ptero-eggs/yolks:wine_latest
Variables
NameDescriptionEnvironment VariableDefault ValueUser ViewableUser Editable
QueryPortUDP port used by Steam to list the server and enable the discovery services.QUERY_PORT27016YesNo
BlobSyncPortBlobSyncPort UDP port used by the BlobSync system to initialize game systems and exchange data.BLOBSYNC_PORT9700YesNo
Server NameName of the server visible in the server list, and in the Steam contacts.SRV_NAMEPterodactyl hosted ServerYesYes
Max PlayersThe maximum number of players allowed simultaneously on the server.MAX_PLAYERS4YesYes
PasswordSRV_PWchangemeYesYes
GamemodeSets 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.GAME_MODEnormalYesYes
Auto UpdateAUTO_UPDATE1YesYes
SRCDS_APPIDSRCDS_APPID2465200NoNo
WINEDEBUGWINEDEBUG-allNoNo
WINEARCHWINEARCHwin64NoNo
WINEPATHWINEPATH/home/containerNoNo
WINETRICKS_RUNWINETRICKS_RUNmono vcrun2019NoNo
WINDOWS_INSTALLWINDOWS_INSTALL1NoNo
Skip network Testif you have problems to connect to your server, set this to TRUESKIP_TESTSfalseYesYes
Save SlotIf you uploaded an existing save from your PC you can enter the save slot number here.SAVE_SLOT0000000001YesYes
Install Script
#!/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}"