Egg Repository

Pterodactyl Community Egg Repository

Puck

Hop on your skates and jump into a physics based hockey game. No rules, no timeouts, just get the puck in the goal. May the best team win!

Read Me

Puck

Game Description

Hop on your skates and jump into a physics based hockey game. No rules, no timeouts, just get the puck in the goal. May the best team win!

Usefull links

Author & Contributers

NameGithub ProfileBuy me a Coffee
Red-Banana-Officialhttps://github.com/Red-Banana-Official/
Rai68https://github.com/rai68/

Server Ports

By default Puck requires 2 ports.

Portdefault
Game7777
Query7778

Configuration

Where is the Server Configuration Stored?

The Puck dedicated server configuration is stored in server_configuration.json, which is automatically managed by this egg.

Instead of manually editing this file, you can set most key values directly in the Pterodactyl Panel using environment variables.


Default Configuration File (server_configuration.json)

On first startup, the server will generate the following structure:

{
    "adminSteamIds": [],
    "isPublic": true,
    "kickTimeout": 300,
    "maxPlayers": 10,
    "name": "Pterodactyl Puck Server",
    "password": "",
    "phaseDurationMap": {
        "BlueScore": 5,
        "FaceOff": 3,
        "GameOver": 15,
        "PeriodOver": 15,
        "Playing": 300,
        "RedScore": 5,
        "Replay": 10,
        "Warmup": 600
    },
    "pingPort": 7778,
    "port": 7777,
    "printMetrics": true,
    "reloadBannedSteamIds": false,
    "targetFrameRate": 120,
    "tickRate": 100,
    "usePuckBannedSteamIds": true,
    "voip": false
}

Installation/System Requirements

RecommendedExtra info
ProcessorRecent x86/64 (AMD/Intel) processor.You need min 1 Core for the Server.
RAM1 GB
Storage1 GB (or more, depending on save size or frequency)
Yolks
NameTag
ghcr.io/ptero-eggs/steamcmd:debianghcr.io/ptero-eggs/steamcmd:debian
Variables
NameDescriptionEnvironment VariableDefault ValueUser ViewableUser Editable
Max PlayersThe maximum number of players allowed on the server.MAX_PLAYERS10YesYes
Query PortQuery Port of the server, Additional Allocation required.QUERY_PORT7778YesYes
Steam App IDSteam App IDSRCDS_APPID3481440NoNo
Auto UpdateAuto UpdateAUTO_UPDATE0YesYes
PasswordThe password required to join the server.SRV_PASSWORDYesYes
Kick TimeoutTime before player is kicked for AFKKICK_TIMEOUT300YesYes
Target FramerateFramerate of server, Should be 10-20 Above Tick Rate!FRAME_RATE120YesYes
Target Tick rateTick rate of ServerTICK_RATE100YesYes
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 

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

## CUSTOM
## Create default config
printf "{\r\n  \"port\": 7777,\r\n  \"pingPort\": 7778,\r\n  \"name\": \"Pterodactyl Puck Server\",\r\n  \"maxPlayers\": 10,\r\n  \"password\": \"\",\r\n  \"voip\": false,\r\n  \"isPublic\": true,\r\n  \"adminSteamIds\": [],\r\n  \"reloadBannedSteamIds\": false,\r\n  \"usePuckBannedSteamIds\": true,\r\n  \"printMetrics\": true,\r\n  \"kickTimeout\": 300,\r\n  \"targetFrameRate\": 120,\r\n  \"tickRate\": 100,\r\n  \"phaseDurationMap\": {\r\n    \"Warmup\": 600,\r\n    \"FaceOff\": 3,\r\n    \"Playing\": 300,\r\n    \"BlueScore\": 5,\r\n    \"RedScore\": 5,\r\n    \"Replay\": 10,\r\n    \"PeriodOver\": 15,\r\n    \"GameOver\": 15\r\n  }\r\n}\r\n" > /mnt/server/server_configuration.json

## End of installation
echo -e "${BLUE}-------------------------------------------------${NC}"
echo -e "${GREEN}Installation completed...${NC}"
echo -e "${BLUE}-------------------------------------------------${NC}"