American Truck Simulator Dedicated Server
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.
egg-american-truck-simulator-dedicated-server.json
updated
Startup
The Panel runs this command to start the server. It replaces each variable in the command with the value of that variable.
5 variables
Startup command
./bin/linux_x64/amtrucks_serverAUTO_UPDATEUsers can edit
required|boolean
SRCDS_APPIDUsers cannot see
required|string|in:2239530
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_PORTUsers can see
required|string
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_TOKENUsers can edit
nullable|string|max:32
LOBBY_NAMEUsers can edit
required|string|max:64
Wings
- Stop command
- ^^C
- Running when the console shows
- [MP] Session running.
Files Wings edits
Wings sets these values in these files before each start.
/.local/share/American Truck Simulator/server_config.sii file
- connection_dedicated_port:
- connection_dedicated_port: {{server.build.default.port}}
- query_dedicated_port:
- query_dedicated_port: {{env.QUERY_PORT}}
- server_logon_token:
- server_logon_token: "{{env.STEAM_TOKEN}}"
- lobby_name:
- lobby_name: "{{env.LOBBY_NAME}}"
Readme
ATSPtero - A Egg For Setting Up ATS Dedicated Server
Ports below are the default ports that are associated with the ATS dedicated server.
| Port | default |
|---|---|
| Dedicated | 27015 |
| Query | 27016 |
Adding moderators
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
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.
American Truck Sim = 270880
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.
Changes
- Validate and update embedded URLs
· Daniel Barton · bf9f3cb
- SteamCMD + Other fixes
· yesBad · edbf925
- Add steamcmd based eggs
· Daniel Barton · 60ef9fb
Problem with this egg?
Open an issue on GitHub. Include your Panel and Wings versions.
Install script 66 lines bash in ghcr.io/ptero-eggs/installers:debian Show Hide
#!/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 "-----------------------------------------"