Starbound

games
Report Issue

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.

Contributors:
README

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

Port default
Game 21025
Docker Images (1)
Name Image
ghcr.io/ptero-eggs/games:source ghcr.io/ptero-eggs/games:source
Startup Command
./starbound_server
Variables (6)

Steam User

This is a required setting and cannot be set to anonymous.

Environment:
STEAM_USER
Default:
None
User Viewable:
User Editable:
Rules:
required|string

Steam Password

Steam User Password

Environment:
STEAM_PASS
Default:
None
User Viewable:
User Editable:
Rules:
nullable|string

Game ID

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

Environment:
SRCDS_APPID
Default:
211820
User Viewable:
User Editable:
Rules:
string

Steam Auth

Steam account auth code. Required if you have 2fa enabled.

Environment:
STEAM_AUTH
Default:
None
User Viewable:
User Editable:
Rules:
nullable|string|max:5

Auto Update Server

This is to auto-update the game server.

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

Use Workshop content

Set to true if you want to use your subscribed Workshop content

Environment:
WORKSHOP
Default:
0
User Viewable:
User Editable:
Rules:
required|boolean
Installation Script
Container: ghcr.io/ptero-eggs/installers:debian
Entrypoint: bash
#!/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