Egg Repository

Pterodactyl Community Egg Repository

Foundry

Build a factory optimized to perfection or an artistic masterpiece in an infinite voxel world. Mine and harvest resources, automate your ever-growing production lines and manage complex systems while researching your way to mechanical mastery in FOUNDRY.

Read Me

Foundry

Game Description

Build a factory optimized to perfection or an artistic masterpiece in an infinite voxel world. Mine and harvest resources, automate your ever-growing production lines and manage complex systems while researching your way to mechanical mastery in FOUNDRY.

Useful links

Steam: https://store.steampowered.com/app/983870/FOUNDRY/ Homepage: https://www.paradoxinteractive.com/games/foundry/about More server info: https://dedicated.foundry-game.com/

Author & Contributers

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

Server Ports

Foundry requires up to 2 ports. You can choose every port you want.

Port default
Game 3724
Query 27015
Yolks
NameTag
ghcr.io/ptero-eggs/yolks:wine_latestghcr.io/ptero-eggs/yolks:wine_latest
Variables
NameDescriptionEnvironment VariableDefault ValueUser ViewableUser Editable
[SERVER] Steam Query PortSets the network port used by the Steam server browser to query information about the game. This is only used if the server is set to public.QUERY_PORT27015YesNo
[SERVER] Server NameThis is the name of the server listed in the Steam server browser.SERVER_NAMEYesYes
[SERVER] Server World NameSets the server world name. This is the folder where the save files will be stored.WORLD_NAMEMyFoundryYesYes
[SERVER] Server PasswordSets the server password.SRV_PWYesYes
[SERVER] Pause Server When EmptyWill the server pause when nobody is connected.PAUSE_SERVERtrueYesYes
[SERVER] Autosave IntervalSets the autosave frequency in seconds.AUTOSAVE_INTERVAL300YesYes
[SERVER] Server PublicSets whether the server is listed on the Steam server browser.PUBLIC_SERVERtrueYesYes
[SERVER] Map SeedSets the map seed used to generate the world.MAP_SEED42938743982YesYes
[SERVER] Server Max PlayersThis sets the max amount of players on a server.MAX_PLAYERS32YesYes
[SERVER] SavepathSAVE_PATH/home/container/serverfilesYesYes
[SERVER] Auto update the serverAUTO_UPDATE1YesYes
WINDOWS_INSTALLWINDOWS_INSTALL1NoNo
[STEAM] Steam App IDSteam App IDSRCDS_APPID2915550NoNo
[WINE] WINETRICKS_RUNWINETRICKS_RUNmonoNoNo
[WINE] WINEDEBUGWINEDEBUG-allNoNo
[WINE] XVFBXVFB1NoNo
Install Script
#!/bin/bash

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}Foundry Installscript${NC}"
echo -e "${YELLOW}Egg by gOOvER | 2024 MIT Licence${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 1007 +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
mkdir -p $HOME/Mods
mkdir -p $HOME/serverfiles

#ccheck for config
FILE=$HOME/App.cfg

if [ -f "$FILE" ]; then
  echo -e "${BLUE}-------------------------------------------------${NC}"
  echo -e "${GREEN}App.cfg found.${NC}"
  echo -e "${BLUE}-------------------------------------------------${NC}"
else  
  echo -e "${BLUE}-------------------------------------------------${NC}"
  echo -e "${RED}No App.cfg found. downloading default...${NC}"
  echo -e "${BLUE}-------------------------------------------------${NC}"
  cd $HOME
  curl -sSL -o App.cfg https://dedicated.foundry-game.com/App.cfg
  echo -e "${GREEN}..done..${NC}"
fi

## cleanup to prevent errors
echo -e "${BLUE}-------------------------------------------------${NC}"
echo -e "${RED}deleting old wine dirs... please wait...${NC}"
echo -e "${BLUE}-------------------------------------------------${NC}"

if [ ! -d "/mnt/server/.wine" ]; then
    rm -fR /mnt/server/.wine
    rm -fR /mnt/server/.config
    rm -fR /mnt/server/.cache
    rm -fR /mnt/server/.local
    rm -fR /mnt/server/appcache
fi
echo -e "${GREEN}..done..${NC}"

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