This will set up SteamCMD and all the required files for the newly released American Truck Simulator Dedicated server. Simply placed the exported server config from your ATS instance to the .local/share/American Truck Simulator/ folder and select start. Make sure that auto start is off on server creation to allow you to upload your config files.
Ports below are the default ports that are associated with the ATS dedicated server.
Port | default |
---|---|
Dedicated | 27015 |
Query | 27016 |
To add moderators to your server instance you have to edit(.local/shared/American Truck Simulator/server_config.sii) 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
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.
--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.
American Truck Sim = 270880
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.
Name | Tag |
---|---|
ghcr.io/ptero-eggs/steamcmd:debian | ghcr.io/ptero-eggs/steamcmd:debian |
Name | Description | Environment Variable | Default Value | User Viewable | User Editable |
---|---|---|---|---|---|
Auto update | AUTO_UPDATE | 1 | Yes | Yes | |
App ID | SRCDS_APPID | 2239530 | No | No | |
Query port | By there readme of the game the query port must be between 27015-27020, but from our testing this port can be any port | QUERY_PORT | 27016 | Yes | No |
Steam Auth token | By 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_TOKEN | Yes | Yes | |
Lobby name | LOBBY_NAME | American Truck Simulator | Yes | Yes |
#!/bin/bash
## 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
## add below your custom commands if needed
mkdir -p /mnt/server/.local/share/"American Truck Simulator"/
CONFIG_FILE=/mnt/server/.local/share/"American Truck Simulator"/server_config.sii
if [ ! -f "$CONFIG_FILE" ]; then
cd /mnt/server/.local/share/"American Truck Simulator"/
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/"American Truck Simulator"/server_packages.sii
if [ ! -f "$PACKAGE_FILE" ]; then
cd /mnt/server/.local/share/"American Truck Simulator"/
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/american-truck-simulator/ats-files/server_packages.sii
fi
DATA_FILE=/mnt/server/.local/share/"American Truck Simulator"/server_packages.dat
if [ ! -f "$DATA_FILE" ]; then
cd /mnt/server/.local/share/"American Truck Simulator"/
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/american-truck-simulator/ats-files/server_packages.dat
fi
## install end
echo "-----------------------------------------"
echo "Installation completed..."
echo "-----------------------------------------"