Necesse

Games
Report Issue

Build, quest, and conquer across an infinite procedurally generated world. Play alone or with friends as you establish a settlement and explore deep dungeons, fight monsters and bosses, mine rare ores, craft magical equipment, recruit specialists for your colony, and more!

Contributors:
README

Necesse

Build, quest, and conquer across an infinite procedurally generated world. Play alone or with friends as you establish a settlement and explore deep dungeons, fight monsters and bosses, mine rare ores, craft magical equipment, recruit specialists for your colony, and more!

Server Configuration

Steam page: link Official Wiki: link Server Wiki Page: link (Linux specifics can be found here)

Server Ports

Port default
Game 14159

Configuration files

File Path
server.cfg /home/container/cfg/server.cfg
worldSettings.cfg /home/container/saves/worlds/SAVE_NAME.zip/worldSettings.cfg
Docker Images (1)
Name Image
ghcr.io/ptero-eggs/steamcmd:debian ghcr.io/ptero-eggs/steamcmd:debian
Startup Command
./jre/bin/java -Xms128M -Xmx{{SERVER_MEMORY}}M -Dterminal.jline=false -Dterminal.ansi=true -jar Server.jar -localdir -nogui -world {{SAVE_NAME}}
Variables (6)

Save Name

Name of the save file.

Environment:
SAVE_NAME
Default:
Save1
User Viewable:
User Editable:
Rules:
required|string|max:20

Player Slots

Number of slots available for players to join the server.

Environment:
SERVER_SLOTS
Default:
10
User Viewable:
User Editable:
Rules:
required|numeric|max:99

Server Password

Password required to enter the server.

Environment:
SERVER_PASSWORD
Default:
None
User Viewable:
User Editable:
Rules:
nullable|string|max:32

Steam App ID

DO NOT EDIT

Environment:
SRCDS_APPID
Default:
1169370
User Viewable:
User Editable:
Rules:
required|string|in:1169370

Steam Auto Update

Enable or disable auto-update on startup. 0 to disable and 1 to enable.

Environment:
AUTO_UPDATE
Default:
0
User Viewable:
User Editable:
Rules:
required|boolean

Steam Beta Branch

Steam Beta branch to install.

Environment:
SRCDS_BETAID
Default:
None
User Viewable:
User Editable:
Rules:
nullable|string|max:64
Installation Script
Container: ghcr.io/ptero-eggs/installers:debian
Entrypoint: bash
#!\/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} $( [[ -z ${SRCDS_BETAID} ]] || printf %s "-beta ${SRCDS_BETAID}" ) $( [[ -z ${SRCDS_BETAPASS} ]] || printf %s "-betapassword ${SRCDS_BETAPASS}" ) ${INSTALL_FLAGS} validate +quit ## other flags may be needed depending on install. looking at you cs 1.6

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


# setup the default config file
export SERVER_CFG=/mnt/server/cfg/server.cfg

if [ ! -f "$SERVER_CFG" ]; then
    echo "Generating server config"
    mkdir "$(dirname "$SERVER_CFG")"
    cat > "$SERVER_CFG" <<EOF
SERVER = {
	port = $SERVER_PORT, // [0 - 65535] Server default port
	slots = $SERVER_SLOTS, // [1 - 250] Server default slots
	password = $SERVER_PASSWORD, // Leave blank for no password
	maxClientLatencySeconds = 30,
	pauseWhenEmpty = true,
	giveClientsPower = true, // If true, clients will have much more power over what hits them, their position etc
	logging = true, // If true, will create log files for each server start
	language = en,
	unloadLevelsCooldown = 30, // The number of seconds a level will stay loaded after the last player has left it
	worldBorderSize = -1, // The max distance from spawn players can travel. -1 for no border
	droppedItemsLifeMinutes = 0, // Minutes that dropped items will stay in the world. 0 or less for indefinite
	unloadSettlements = false, // If the server should unload player settlements or keep them loaded
	maxSettlementsPerPlayer = -1, // The maximum amount of settlements per player. -1 or less means infinite
	maxSettlersPerSettlement = -1, // The maximum amount of settlers per settlement. -1 or less means infinite
	jobSearchRange = 100, // The tile search range of settler jobs
	zipSaves = true, // If true, will create new saves uncompressed
	MOTD =  // Message of the day
}
EOF
fi

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