Egg Repository

Pterodactyl Community Egg Repository

The Forest

As the lone survivor of a passenger jet crash, you find yourself in a mysterious forest battling to stay alive against a society of cannibalistic mutants. Build, explore, survive in this terrifying first-person survival horror simulator.

Read Me

The Forest

As the lone survivor of a passenger jet crash, you find yourself in a mysterious forest battling to stay alive against a society of cannibalistic mutants. Build, explore, survive in this terrifying first-person survival horror simulator.

NOTE

This server requires a Steam Token You can generate the token on steam at https://steamcommunity.com/dev/managegameservers

Server Ports

The forest server requires three ports for access Server port (Default), Steam port (8766), Query Port (27016) but some plugins may require extra ports to enabled for the server.

Portdefault
Serverany
Steam8766
Query27016
Yolks
NameTag
ghcr.io/ptero-eggs/yolks:wine_latestghcr.io/ptero-eggs/yolks:wine_latest
Variables
NameDescriptionEnvironment VariableDefault ValueUser ViewableUser Editable
APP IDThe ID corresponding to the game to download.SRCDS_APPID556450NoNo
Server NameName of the server, appears in Steam browser.SERVER_NAMEPterodactyl Forest ServerYesYes
Steam PortSteam portSTEAM_PORT8766YesNo
[Connection Port] Query PortQuery port, this port is also used for connecting to the serverQUERY_PORT27016YesNo
Max PlayersServer player capMAX_PLAYERS10YesNo
DifficultyServer difficulty setting, Peaceful, Normal or Hard.SERVER_DIFFICULTYNormalYesYes
Steam Account TokenThe Steam Account Token is required for the server to save player progress. Use APP ID 242760 for the token generation. You can generate the token on steam at https://steamcommunity.com/dev/managegameserversSTEAM_ACCYesYes
Server PasswordPassword protects the server if set, any player must enter the password to joinSERVER_PASSYesYes
Admin PasswordA password that will be used to gain admin access to the server in-gameADMIN_PASScHanGetHePaSwWordYesYes
Enable VACVACoffYesYes
Windows InstallThis is required to install the correct Forest version. Removing or touching this will overwrite the files with a non-existing Linux releases.WINDOWS_INSTALL1NoNo
Auto-Update0 disables auto-update on each server startup, while 1 enables it.AUTO_UPDATE1YesYes
[SYSTEM] WINEDEBUGdon't change this !!!WINEDEBUG-allNoNo
[SYSTEM] WINEARCHWINEARCHwin64NoNo
Init TypeInit Type when starting server. New to start fresh or Continue to preload the saved gameINIT_TYPENewYesYes
Install Script
#!/bin/bash
# steamcmd Base Installation Script
#
# Server Files: /mnt/server
# Image to install with is 'ghcr.io/ptero-eggs/installers:debian'

##
#
# Variables
# STEAM_USER, STEAM_PASS, STEAM_AUTH - Steam user setup. If a user has 2fa enabled it will most likely fail due to timeout. Leave blank for anon install.
# WINDOWS_INSTALL - if it's a windows server you want to install set to 1
# SRCDS_APPID - steam app id found here - https://developer.valvesoftware.com/wiki/Dedicated_Servers_List
# SRCDS_BETAID - beta branch of a steam app. Leave blank to install normal branch
# SRCDS_BETAPASS - password for a beta branch should one be required during private or closed testing phases.. Leave blank for no password.
# INSTALL_FLAGS - Any additional SteamCMD  flags to pass during install.. Keep in mind that steamcmd auto update process in the docker image might overwrite or ignore these when it performs update on server boot.
# AUTO_UPDATE - Adding this variable to the egg allows disabling or enabling automated updates on boot. Boolean value. 0 to disable and 1 to enable.
#
 ##

# Install packages. Default packages below are not required if using our existing install image thus speeding up the install process.
#apt -y update
#apt -y --no-install-recommends install curl lib32gcc-s1 ca-certificates

## 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

## install game using steamcmd
./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

## 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

## Create Config

mkdir -p $HOME/TheForestDedicatedServer_Data/forest/config/
#rm -fR $HOME/TheForestDedicatedServer_Data/forest/config/config.cfg
cat <<EOT > $HOME/TheForestDedicatedServer_Data/forest/config/config.cfg
// Dedicated Server Settings.
// Server IP address - Note: If you have a router, this address is the internal address, and you need to configure ports forwarding, append the current game port here as well
serverIP
// Steam Communication Port - Note: If you have a router you will need to open this port.
serverSteamPort
// Game Communication Port - Note: If you have a router you will need to open this port.
serverGamePort
// Query Communication Port - Note: If you have a router you will need to open this port.
serverQueryPort
// Server display name
serverName
// Maximum number of players
serverPlayers 5
// Server password. blank means no password
serverPassword
// Your Steam account name. blank means anonymous (see Steam server account bellow)
serverSteamAccount
// Enable VAC (Valve Anti Cheat) on the server. off by default, uncomment to enable
enableVAC on
// Time between server auto saves in minutes
serverAutoSaveInterval 15
// Game difficulty mode. Must be set to "Peaceful" "Normal" or "Hard"
difficulty Normal
// New or continue a game. Must be set to "New" or "Continue"
initType New
// Slot to save the game. Must be set 1 2 3 4 or 5
slot 1
// Show event log. Must be set "off" or "on"
showLogs off
// Contact email for server admin
serverContact [email protected]
// No enemies. Must be set to "on" or "off"
veganMode off
// No enemies during day time. Must be set to "on" or "off"
vegetarianMode off
// Reset all structure holes when loading a save. Must be set to "on" or "off"
resetHolesMode off
// Regrow 10% of cut down trees when sleeping. Must be set to "on" or "off"
treeRegrowMode off
// Allow building destruction. Must be set to "on" or "off"
allowBuildingDestruction on
// Allow enemies in creative games. Must be set to "on" or "off"
allowEnemiesCreativeMode off
// Allow clients to use the built in development console. Must be set to "on" or "off"
allowCheats off
// Allows defining a custom folder for save slots, leave empty to use the default location
saveFolderPath
// Target FPS when no client is connected
targetFpsIdle 5
// Target FPS when there is at least one client connected
targetFpsActive 60
EOT

## install end
echo "-----------------------------------------"
echo "Installation completed..."
echo "-----------------------------------------"