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
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.
These are the servers required ports
Port | default |
---|---|
Game | 12871 |
Query | 13871 |
Name | Tag |
---|---|
ghcr.io/ptero-eggs/steamcmd:debian | ghcr.io/ptero-eggs/steamcmd:debian |
Name | Description | Environment Variable | Default Value | User Viewable | User Editable |
---|---|---|---|---|---|
Game ID | The ID corresponding to the game to download and run using SRCDS. | SRCDS_APPID | 405100 | Yes | No |
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. | INSTALL_OXIDE | 0 | Yes | Yes |
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 | INSTALL_PLUGINS | Yes | Yes | |
Query Port | Server Query Default Port. | QUERY_PORT | 13871 | Yes | No |
Max Players | Max players allowed on the server at one time. | MAX_PLAYERS | 60 | Yes | Yes |
Server Name | The name of your server in the public server list. | HOSTNAME | A Hurtworld Server | Yes | Yes |
Server Owner Guid | Steam id of the server owner. | ADMINS | Yes | Yes | |
Creative Mode | Turn creative mode on and off (free build). Value as 0 for off, 1 for on. | CREATIVE_MODE | 0 | Yes | Yes |
AUTO_UPDATE | Disabling or enabling automated updates on boot. | AUTO_UPDATE | 1 | Yes | Yes |
#!/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 "-----------------------------------------"