Egg Repository

Pterodactyl Community Egg Repository

Starbound

Starbound takes place in a two-dimensional, procedurally generated universe which the player is able to explore in order to obtain new weapons, armor, and items, and to visit towns and villages inhabited by various intelligent lifeforms.

Read Me

Starbound

Their desctiption: In Starbound, you create your own story - there’s no wrong way to play! You may choose to save the universe from the forces that destroyed your home, uncovering greater galactic mysteries in the process, or you may wish to forego a heroic journey entirely in favor of colonizing uncharted planets.

Server Ports

Starbound requires a single port to be oepened

Portdefault
Game21025
Yolks
NameTag
ghcr.io/ptero-eggs/games:sourceghcr.io/ptero-eggs/games:source
Variables
NameDescriptionEnvironment VariableDefault ValueUser ViewableUser Editable
Steam UserThis is a required setting and cannot be set to anonymous.STEAM_USERNoNo
Steam PasswordSteam User PasswordSTEAM_PASSNoNo
Game IDThe ID corresponding to the game to download and run using SRCDS.SRCDS_APPID211820YesNo
Steam AuthSteam account auth code. Required if you have 2fa enabled.STEAM_AUTHYesYes
Auto Update ServerThis is to auto-update the game server.AUTO_UPDATE1YesYes
Use Workshop contentSet to true if you want to use your subscribed Workshop contentWORKSHOP0YesYes
Install Script
#!/bin/bash
# steamcmd Base Installation Script

## just in case someone removed the defaults.
if [ "${STEAM_USER}" == "" ]; 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
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 +login ${STEAM_USER} ${STEAM_PASS} ${STEAM_AUTH} +force_install_dir /mnt/server +app_update ${SRCDS_APPID} ${EXTRA_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

## Starbound specific setup.
cd /mnt/server/


## edit sbinit config
mv /mnt/server/linux/* /mnt/server/
rm -rf /mnt/server/linux
sed -i -e 's/\.\./\./g' /mnt/server/sbinit.config

## pull starbound_server.config
mkdir -p /mnt/server/storage
curl -sSL https://raw.githubusercontent.com/ptero-eggs/game-eggs/main/starbound/starbound_server.config > /mnt/server/storage/starbound_server.config

## use Worksop content
if [ "${WORKSHOP}" == "1" ]; then
    for dir in /mnt/server/steamapps/workshop/content/211820/*/
    do
        # Removes the trailing slash from the full path
        dir=${dir%*/}
        echo Sym-linking mod ${dir##*/} files into the mods folder
        INDEX=0
        for pakfile in ${dir}/*.pak
        do
            ln -r -s $pakfile /mnt/server/mods/${dir##*/}_${INDEX}.pak
            INDEX=$((INDEX+1))
        done
    done
fi