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

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

Startup Command

cd /home/container/dedicated_server; xvfb-run --auto-servernum wine pk_dedicated_server.exe -config server_config.json -log server.log

Variables

Steam user

Environment Variable: STEAM_USER
Default Value:
User Viewable:
User Editable:
Steam password

Environment Variable: STEAM_PASS
Default Value:
User Viewable:
User Editable:
Install windows version

Environment Variable: WINDOWS_INSTALL
Default Value: 1
User Viewable:
User Editable:
App id

Environment Variable: SRCDS_APPID
Default Value: 374040
User Viewable:
User Editable:
Auto update

Auto update server on startup.

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

Environment Variable: WINEARCH
Default Value: win64
User Viewable:
User Editable:
WINEDEBUG

Environment Variable: WINEDEBUG
Default Value: -all
User Viewable:
User Editable:
Server Name

The name off the server

Environment Variable: SERVER_NAME
Default Value: Servername
User Viewable:
User Editable:
Admin password

Environment Variable: ADMIN_PASS
Default Value: admin_password_please_change
User Viewable:
User Editable:
User password

Environment Variable: USER_PASS
Default Value:
User Viewable:
User Editable:
Guest password

Environment Variable: GUEST_PASS
Default Value:
User Viewable:
User Editable:
Game mode

The game play mode for the dedicated server.

Environment Variable: GAMEMODE
Default Value: Adventure
User Viewable:
User Editable:
Universe size

The universe size for the dedicated server.

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