Skip to content

Teeworlds

Teeworlds is a free online multiplayer game, available for all major operating systems. Battle with up to 16 players in a variety of game modes, including Team Deathmatch and Capture The Flag. You can even design your own maps!

egg-teeworlds.json

updated

Ports

Add an allocation on the node for each port.

  • Game 8303

Install

Installer image
ghcr.io/ptero-eggs/installers:debian
Install script
81 lines

Image

  • Debian ghcr.io/ptero-eggs/yolks:debian

Startup

The Panel runs this command to start the server. It replaces each variable in the command with the value of that variable.

2 variables

Startup command

./teeworlds_srv
  • The Display Name for the server

    SERVER_NAMEUsers can edit

    nullable|string

  • Server Message of the Day displayed to all users.

    SERVER_MOTDUsers can edit

    nullable|string

Wings

Stop command
^C (SIGINT)
Running when the console shows
as master, sending heartbeats

Files Wings edits

Wings sets these values in these files before each start.

autoexec.cfg file

bindaddr
bindaddr 0.0.0.0
sv_port
sv_port {{server.build.default.port}}
sv_name
sv_name {{server.build.env.SERVER_NAME}}
sv_motd
sv_motd {{server.build.env.SERVER_MOTD}}

Readme

Teeworlds

From their Site

Teeworlds is a free online multiplayer game, available for all major operating systems. Battle with up to 16 players in a variety of game modes, including Team Deathmatch and Capture The Flag. You can even design your own maps

Server Ports

Ports required to run the server in a table format.

Port default
Game 8303

Changes

  1. Validate and update embedded URLs

    · Daniel Barton · bf9f3cb

  2. SteamCMD + Other fixes

    · yesBad · edbf925

  3. Add standalone games

    · Daniel Barton · 74c706a

All changes on GitHub

Problem with this egg?

Open an issue on GitHub. Include your Panel and Wings versions.

Install script 81 lines bash in ghcr.io/ptero-eggs/installers:debian Show
## teeworlds pterodactyl installer
apt update
apt upgrade -y
apt install -y curl jq file

GITHUB_PACKAGE="teeworlds/teeworlds"
MATCH="linux_x86_64"

if [ ! -d /mnt/server ]; then
    mkdir -p /mnt/server/
fi

cd /mnt/server

if [ -z "${GITHUB_USER}" ] && [ -z "${GITHUB_OAUTH_TOKEN}" ] ; then
    echo -e "using anon api call"
else
    echo -e "user and oauth token set"
    alias curl='curl -u ${GITHUB_USER}:${GITHUB_OAUTH_TOKEN} '
fi

## get release info and download links
LATEST_JSON=$(curl --silent "https://api.github.com/repos/${GITHUB_PACKAGE}/releases/latest")
RELEASES=$(curl --silent "https://api.github.com/repos/${GITHUB_PACKAGE}/releases")

if [ -z "${VERSION}" ] || [ "${VERSION}" == "latest" ]; then
    DOWNLOAD_LINK=$(echo ${LATEST_JSON} | jq .assets | jq -r .[].browser_download_url | grep -i ${MATCH})
else
    VERSION_CHECK=$(echo ${RELEASES} | jq -r --arg VERSION "${VERSION}" '.[] | select(.tag_name==$VERSION) | .tag_name')
    if [ "${VERSION}" == "${VERSION_CHECK}" ]; then
        DOWNLOAD_LINK=$(echo ${RELEASES} | jq -r --arg VERSION "${VERSION}" '.[] | select(.tag_name==$VERSION) | .assets[].browser_download_url' | grep -i ${MATCH})
    else
        echo -e "defaulting to latest release"
        DOWNLOAD_LINK=$(echo ${LATEST_JSON} | jq .assets | jq -r .[].browser_download_url)
    fi
fi

if [ ! -z "${DOWNLOAD_URL}"]; then 
    if curl --output /dev/null --silent --head --fail ${DOWNLOAD_URL}; then
        echo -e "link is valid. setting download link to ${DOWNLOAD_URL}"
        DOWNLOAD_LINK=${DOWNLOAD_URL}
    else        
        echo -e "link is invalid closing out"
        exit 2
    fi
fi

## setting variable names for later
FILE_NAME=${DOWNLOAD_LINK##*/}
FOLDER_NAME=${FILE_NAME%.tar.gz}

echo -e "running 'curl -sSL ${DOWNLOAD_LINK} -o ${FILE_NAME}'"
curl -sSL ${DOWNLOAD_LINK} -o ${FILE_NAME}

FILETYPE=$(file -F ',' ${FILE_NAME} | cut -d',' -f2 | cut -d' ' -f2)
if [ "$FILETYPE" == "gzip" ]; then
    tar xzvf ${FILE_NAME}
elif [ "$FILETYPE" == "Zip" ]; then
    unzip ${FILE_NAME}
elif [ "$FILETYPE" == "XZ" ]; then
    tar xvf ${FILE_NAME}
else
    echo -e "unknown filetype. Exiting"
    # exit 2 
fi

## cleanup old files
mv ${FOLDER_NAME}/* ./

rm -rf ${FILE_NAME} ${FOLDER_NAME}

## download default config
if [ ! -f /mnt/server/autoexec.cfg ]; then
    curl -sSL https://raw.githubusercontent.com/ptero-eggs/game-eggs/main/teeworlds/autoexec.cfg > /mnt/server/autoexec.cfg
fi

## download safe storage file
## overwrites any that exists.
curl -sSL https://raw.githubusercontent.com/ptero-eggs/game-eggs/main/teeworlds/storage.cfg > /mnt/server/storage.cfg

echo -e "Install complete."