Egg Repository

Pterodactyl Community Egg Repository

Portal Knights

The world of Elysia needs YOU! Join this cooperative, 3D sandbox action RPG to level up your character, craft epic weapons, conquer enemies in real-time, and build almost anything! Craft your adventure. Forge your hero. Become the ultimate Portal Knight!

Read Me

Portal Knights

The world of Elysia needs YOU! Join this cooperative, 3D sandbox action RPG to level up your character, craft epic weapons, conquer enemies in real-time, and build almost anything! Craft your adventure. Forge your hero. Become the ultimate Portal Knight!

Server

Because the server files are not in a dedicated Steam app id this egg installs the whole game and then unpacks the .zip with the dedicated server files.

Because of this a steam account is required that own the game and has Steam guard off

WineHQ

The server is running with wine. So the console output can be a litte strange but it does work.

Storage

This server will at least needs 12GB of storage allocated to be able to start

Server Ports

Portal Knights requires 1 port

Port default
Game 16365
Yolks
NameTag
ghcr.io/ptero-eggs/yolks:wine_stagingghcr.io/ptero-eggs/yolks:wine_staging
Variables
NameDescriptionEnvironment VariableDefault ValueUser ViewableUser Editable
Steam userSTEAM_USERNoNo
Steam passwordSTEAM_PASSNoNo
Install windows versionWINDOWS_INSTALL1NoNo
App idSRCDS_APPID374040NoNo
Auto updateAuto update server on startup.AUTO_UPDATE1YesYes
WINEARCHWINEARCHwin64NoNo
WINEDEBUGWINEDEBUG-allNoNo
Server NameThe name off the serverSERVER_NAMEServernameYesYes
Admin passwordADMIN_PASSadmin_password_please_changeYesYes
User passwordUSER_PASSYesYes
Guest passwordGUEST_PASSYesYes
Game modeThe game play mode for the dedicated server.GAMEMODEAdventureYesYes
Universe sizeThe universe size for the dedicated server.UNIVERSE_SIZENormalYesYes
Install Script
#!/bin/bash
# steamcmd Base Installation Script
#
# Server Files: /mnt/server
# Image to install with is 'ghcr.io/ptero-eggs/installers:debian'


## 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} validate +quit

## 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
dir=/mnt/server/dedicated_server
if [[ ! -e $dir ]]; then
    mkdir -p $dir
fi

cd /mnt/server/dedicated_server
unzip -o ../dedicated_server.zip
curl -sSL -o server_config.json https://pteropaste.com/f8p6yx0yj07d

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