Egg Repository

Pterodactyl Community Egg Repository

Hurtworld

Hurtworld is a hardcore multiplayer survival FPS with a focus on deep survival progression that doesn't become trivial once you establish some basic needs. Built for hardcore gamers, Hurtworld aims to punish. This egg includes the options to install Oxide/uMod and corresponding plugins

Read Me

Hurtworld

From their website

Install notes

Due to rate limiting the console on the panel cannot keep up with the game console and the build will complete before the panel console may show it. Reloading the console will load it to the latest part of the log.

Server Ports

These are the servers required ports

Portdefault
Game12871
Query13871

Mods/Plugins may require ports to be added to the server

Yolks
NameTag
ghcr.io/ptero-eggs/steamcmd:debianghcr.io/ptero-eggs/steamcmd:debian
Variables and Startup

Startup Command

./Hurtworld.x86_64 -batchmode -nographics -exec "host {{SERVER_PORT}};queryport {{QUERY_PORT}};maxplayers {{MAX_PLAYERS}};servername {{HOSTNAME}};creativemode {{CREATIVE_MODE}};addadmin {{ADMINS}}" -logfile $1

Variables

Game ID

The ID corresponding to the game to download and run using SRCDS.

Environment Variable: SRCDS_APPID
Default Value: 405100
User Viewable:
User Editable:
Include Oxide

This option will allow you to automatically install Oxide/uMod on the server. Default value is 0, change it to a 1 to install.

Environment Variable: INSTALL_OXIDE
Default Value: 0
User Viewable:
User Editable:
Install Plugins

This variable allows you to automatically install Oxide plugins. Format example: No Build Zones,Loot Chests,HW Time Control Plugins can be found at: https://umod.org/plugins?categories=hurtworld

Environment Variable: INSTALL_PLUGINS
Default Value:
User Viewable:
User Editable:
Query Port

Server Query Default Port.

Environment Variable: QUERY_PORT
Default Value: 13871
User Viewable:
User Editable:
Max Players

Max players allowed on the server at one time.

Environment Variable: MAX_PLAYERS
Default Value: 60
User Viewable:
User Editable:
Server Name

The name of your server in the public server list.

Environment Variable: HOSTNAME
Default Value: A Hurtworld Server
User Viewable:
User Editable:
Server Owner Guid

Steam id of the server owner.

Environment Variable: ADMINS
Default Value:
User Viewable:
User Editable:
Creative Mode

Turn creative mode on and off (free build). Value as 0 for off, 1 for on.

Environment Variable: CREATIVE_MODE
Default Value: 0
User Viewable:
User Editable:
AUTO_UPDATE

Disabling or enabling automated updates on boot.

Environment Variable: AUTO_UPDATE
Default Value: 1
User Viewable:
User Editable:
Install Script
#!/bin/bash
# steamcmd Base Installation Script
# Server Files: /mnt/server
# Image: 'ghcr.io/ptero-eggs/installers:debian'
# Ensure Steam credentials are set
if [[ -z "${STEAM_USER}" ]] || [[ -z "${STEAM_PASS}" ]]; then
    echo -e "Steam user is not set. Using anonymous login."
    STEAM_USER=anonymous
    STEAM_PASS=""
    STEAM_AUTH=""
else
    echo -e "User set to ${STEAM_USER}"
fi

# Install SteamCMD
echo "Downloading and installing SteamCMD..."
mkdir -p /mnt/server/steamcmd
cd /tmp
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
cd /mnt/server/steamcmd

# Set ownership to prevent permission issues
chown -R root:root /mnt
export HOME=/mnt/server

# Install server using SteamCMD
echo "Installing Hurtworld server via 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 Steam libraries
mkdir -p /mnt/server/.steam/sdk32
cp -v linux32/steamclient.so ../.steam/sdk32/steamclient.so
mkdir -p /mnt/server/.steam/sdk64
cp -v linux64/steamclient.so ../.steam/sdk64/steamclient.so

# Copy Steam libraries to Hurtworld directories
mkdir -p /mnt/server/Hurtworld_Data/Plugins/x86
mkdir -p /mnt/server/Hurtworld_Data/Plugins/x86_64
cp -v linux32/steamclient.so /mnt/server/Hurtworld_Data/Plugins/x86/steamclient.so
cp -v linux64/steamclient.so /mnt/server/Hurtworld_Data/Plugins/x86_64/steamclient.so

# Check if INSTALL_OXIDE needs to be installed
if [[ "${INSTALL_OXIDE}" == "1" ]]; then
    echo "INSTALL_OXIDE is set to 1. Downloading and installing uMod/Oxide..."
    curl -sSL -o umod.zip "https://umod.org/games/hurtworld/download/develop"

    if [ -f umod.zip ]; then
        echo "Extracting uMod/Oxide..."
        unzip -o umod.zip -d /mnt/server
        rm umod.zip
    else
        echo "Failed to download uMod/Oxide!"
        exit 1  # Stop the script if Oxide fails to install
    fi

    # Ensure Oxide directory exists for plugins
    PLUGIN_DIR="/mnt/server/oxide/plugins"
    mkdir -p "$PLUGIN_DIR"

    if [[ -n "${INSTALL_PLUGINS}" ]]; then
        IFS=',' read -ra PLUGINS <<< "${INSTALL_PLUGINS}"

        echo "Downloading selected Oxide plugins..."
        for PLUGIN in "${PLUGINS[@]}"; do
            PLUGIN_NAME=$(echo "$PLUGIN" | sed -e 's/^ *//g' -e 's/ *$//g' -e 's/"//g')

            # url formatting
            PLUGIN_FILE="${PLUGIN_NAME// /}"
            PLUGIN_URL="https://umod.org/plugins/${PLUGIN_FILE}.cs"

            # Download the plugin
            echo "Downloading plugin: $PLUGIN_NAME"
            curl -sSL -o "$PLUGIN_DIR/${PLUGIN_FILE}.cs" "$PLUGIN_URL"

            # Verify the downloaded file is valid
            if grep -q "<!DOCTYPE html>" "$PLUGIN_DIR/${PLUGIN_FILE}.cs"; then
                echo "Error: Plugin '$PLUGIN_NAME' not found! Removing invalid file."
                rm -f "$PLUGIN_DIR/${PLUGIN_FILE}.cs"
            else
                echo "Successfully downloaded: $PLUGIN_NAME"
            fi
        done
    else
        echo "INSTALL_PLUGINS is empty. No plugins will be installed."
    fi
else
    echo "INSTALL_OXIDE is set to 0. Skipping uMod/Oxide installation and plugin downloads."
fi

# Ensure directory exists
mkdir -p /mnt/server/Hurtworld_Data/Managed

## Install end
echo "-----------------------------------------"
echo "Installation completed..."
echo "-----------------------------------------"
Installation Imageghcr.io/ptero-eggs/installers:debianInstallation Entrypointbash