Egg Repository

Pterodactyl Community Egg Repository

Euro Truck Simulator 2 Dedicated server

Travel across Europe as king of the road, a trucker who delivers important cargo across impressive distances! With dozens of cities to explore, your endurance, skill and speed will all be pushed to their limits.

Read Me

ETS2 Ptero - A Egg For Setting Up ETS2 Dedicated Server

Ports below are the default ports that are associated with the ETS2 dedicated server.

Port default
Dedicated 27015
Query 27016

Adding moderators

To add moderators to your server instance you have to edit (.local/share/Euro Truck Simulator 2/server_config.sii) An example seen below:

moderator_list: 3
moderator_list[0]: Steam64_ID
moderator_list[1]: Steam64_ID
moderator_list[2]: Steam64_ID

^^^ Steam64_ID can be found by googling Steam ID Lookup

Enjoy your server

Once those files have been uploaded and configured you are free to start up your server. When the sever is started look for the line: Session search id: 00000000000000000/101 The number before the / is your search term. This is number to search for in the convoy screen to find your server. You can NOT search by the server name at this time. Example: if your number before the / is 987654321 then you would search for 987654321 on your convoy screen in game.

Steam Server Token

--A steam server Token is required--

Adding a server token received from registering your server at https://steamcommunity.com/dev/managegameservers be sure to use the correct App ID or your server will crash upon startup.

Euro Truck Sim 2 = 227300

Disclaimer

I do not claim to know everything about this setup as I just got it reliably working myself and will update the egg if anything changes. That being said, if you have problems open up an issue and I will do my best to help if when I have the time.

Readme made by: https://github.com/kj4lxc

Yolks
NameTag
ghcr.io/ptero-eggs/steamcmd:debianghcr.io/ptero-eggs/steamcmd:debian
Variables
NameDescriptionEnvironment VariableDefault ValueUser ViewableUser Editable
Auto updateAuto update the server on startupAUTO_UPDATE1YesYes
App IDSRCDS_APPID1948160NoNo
Query portBy there readme of the game the query port must be between 27015-27020, but from our testing this port can be any portQUERY_PORT27016YesNo
Steam Auth tokenBy default, whenever a dedicated server is launched it is using an anonymous account. For such an account non-persistent server id is generated (used for direct search). To avoid this you can acquire a logon token on https://steamcommunity.com/dev/managegameservers (game ownership is required)STEAM_TOKENYesYes
Lobby nameLOBBY_NAMEEuro Truck Simulator 2 serverYesYes
Install Script
#!/bin/bash
# steamcmd Base Installation Script

## 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} +app_update ${SRCDS_APPID} validate +quit

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

mkdir -p /mnt/server/.local/share/"Euro Truck Simulator 2"/

CONFIG_FILE=/mnt/server/.local/share/"Euro Truck Simulator 2"/server_config.sii
if [ ! -f "$CONFIG_FILE" ]; then
    cd /mnt/server/.local/share/"Euro Truck Simulator 2"/
    echo "a config file does not yet exist making one!"
    curl -sSL -o server_config.sii https://raw.githubusercontent.com/ptero-eggs/game-eggs/main/truck-simulator/server_config.sii
fi

PACKAGE_FILE=/mnt/server/.local/share/"Euro Truck Simulator 2"/server_packages.sii
if [ ! -f "$PACKAGE_FILE" ]; then
    cd /mnt/server/.local/share/"Euro Truck Simulator 2"/
    echo "a server_packages.sii file does not yet exist making one!"
    curl -sSL -o server_packages.sii https://raw.githubusercontent.com/ptero-eggs/game-eggs/main/truck-simulator/euro-truck-simulator2/ets2-files/server_packages.sii
fi

DATA_FILE=/mnt/server/.local/share/"Euro Truck Simulator 2"/server_packages.dat
if [ ! -f "$DATA_FILE" ]; then
    cd /mnt/server/.local/share/"Euro Truck Simulator 2"/
    echo "a server_packages.dat file does not yet exist making one!"
    curl -sSL -o server_packages.dat https://raw.githubusercontent.com/ptero-eggs/game-eggs/main/truck-simulator/euro-truck-simulator2/ets2-files/server_packages.dat
fi

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