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

NameGithub ProfileBuy me a Coffee
gOOvERhttps://github.com/gOOvERko-fi

Server Ports

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

Portdefault
Game3724
Query27015
Yolks
NameTag
ghcr.io/ptero-eggs/yolks:wine_latestghcr.io/ptero-eggs/yolks:wine_latest
Variables and Startup

Startup Command

xvfb :0 -screen 0 1024x768x16; DISPLAY=:0.0 xvfb-run wine /home/container/FoundryDedicatedServer.exe -log

Variables

[SERVER] Steam Query Port

Sets 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.

Environment Variable: QUERY_PORT
Default Value: 27015
User Viewable:
User Editable:
[SERVER] Server Name

This is the name of the server listed in the Steam server browser.

Environment Variable: SERVER_NAME
Default Value:
User Viewable:
User Editable:
[SERVER] Server World Name

Sets the server world name. This is the folder where the save files will be stored.

Environment Variable: WORLD_NAME
Default Value: MyFoundry
User Viewable:
User Editable:
[SERVER] Server Password

Sets the server password.

Environment Variable: SRV_PW
Default Value:
User Viewable:
User Editable:
[SERVER] Pause Server When Empty

Will the server pause when nobody is connected.

Environment Variable: PAUSE_SERVER
Default Value: true
User Viewable:
User Editable:
[SERVER] Autosave Interval

Sets the autosave frequency in seconds.

Environment Variable: AUTOSAVE_INTERVAL
Default Value: 300
User Viewable:
User Editable:
[SERVER] Server Public

Sets whether the server is listed on the Steam server browser.

Environment Variable: PUBLIC_SERVER
Default Value: true
User Viewable:
User Editable:
[SERVER] Map Seed

Sets the map seed used to generate the world.

Environment Variable: MAP_SEED
Default Value: 42938743982
User Viewable:
User Editable:
[SERVER] Server Max Players

This sets the max amount of players on a server.

Environment Variable: MAX_PLAYERS
Default Value: 32
User Viewable:
User Editable:
[SERVER] Savepath

Environment Variable: SAVE_PATH
Default Value: /home/container/serverfiles
User Viewable:
User Editable:
[SERVER] Auto update the server

Environment Variable: AUTO_UPDATE
Default Value: 1
User Viewable:
User Editable:
WINDOWS_INSTALL

Environment Variable: WINDOWS_INSTALL
Default Value: 1
User Viewable:
User Editable:
[STEAM] Steam App ID

Steam App ID

Environment Variable: SRCDS_APPID
Default Value: 2915550
User Viewable:
User Editable:
[WINE] WINETRICKS_RUN

Environment Variable: WINETRICKS_RUN
Default Value: mono
User Viewable:
User Editable:
[WINE] WINEDEBUG

Environment Variable: WINEDEBUG
Default Value: -all
User Viewable:
User Editable:
[WINE] XVFB

Environment Variable: XVFB
Default Value: 1
User Viewable:
User Editable:
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}"
Installation Imageghcr.io/ptero-eggs/installers:debianInstallation Entrypointbash