keepcalculator

06 Numbers and Powers

Auto Update ETS2 & ATS Dedicated Server

Card No. 06·70990 · Updated · Standard formula, shown below

This guide shows you how to automatically update your Euro Truck Simulator 2 (ETS2) and American Truck Simulator (ATS) dedicated server whenever SCS Software releases a new game version. Instead of manually downloading and replacing files each time, you’ll set up a script that checks for updates, downloads them, and restarts your server with minimal downtime.

What You’ll Need

  • A Windows or Linux machine running the ETS2 or ATS dedicated server.
  • SteamCMD installed (the command-line tool for Steam).
  • Basic familiarity with command line / terminal.
  • Your server’s Steam app ID: ETS2 is 2238520, ATS is 2238540.
  • An anonymous Steam login usually works for dedicated server files.

Step-by-Step

  1. Install SteamCMD – Download and extract SteamCMD from the official Valve site. On Windows, place it in a folder like C:\steamcmd. On Linux, use wget and tar to install it.
  2. Create a folder for your server files – For example, C:\ets2server or /home/ets2server. This is where the game files will live.
  3. Write an update script – Create a file named update.bat (Windows) or update.sh (Linux) with the following content (adjust paths):
    steamcmd +login anonymous +force_install_dir "C:\ets2server" +app_update 2238520 validate +quit

    For ATS, replace 2238520 with 2238540.

  4. Test the script manually – Run it once to ensure it downloads the server files correctly. Check the output for errors.
  5. Set up a scheduled task – On Windows, use Task Scheduler to run the script daily (or hourly) at a time when players are least active. On Linux, use cron with crontab -e and add a line like 0 5 * * * /path/to/update.sh.
  6. Add server restart logic – After the update completes, you need to restart the server. In your script, add commands to stop the server process, wait a few seconds, then start it again. Example (Windows):
    taskkill /IM eurotrucks2_server.exe /F
    timeout /t 5
    start "" "C:\ets2server\eurotrucks2_server.exe" -nolauncher

    On Linux, use pkill and then start the process with nohup.

  7. Make the script check for updates only when needed – To avoid unnecessary restarts, you can have the script compare the local version with the latest available. A simple way is to run SteamCMD with +app_update and check if it says “already up to date”. If so, skip the restart. In a batch script, you can capture the output and search for that string.
  8. Log the output – Redirect the script’s output to a log file so you can review what happened. For example, update.bat >> update.log.
  9. Test the full automation – Run the scheduled task once to confirm it works end-to-end. Check that the server comes back up and players can connect.

Common Mistakes

  • Using the wrong app ID – ETS2 and ATS have different IDs; double-check.
  • Forgetting to set force_install_dir – without it, files go to SteamCMD’s default folder.
  • Not stopping the server before updating – this can cause file locks and corrupted updates.
  • Running the script as a different user than the server – on Linux, permissions may break.
  • Not using validate – this ensures missing/corrupt files are re-downloaded.

Tips

  • Schedule updates during off-peak hours to minimize player disruption.
  • Keep a backup of your server config and saves before major updates.
  • Use a separate SteamCMD installation for each game if you run both.
  • On Linux, use screen or tmux to run the server in the background so it doesn’t die when you log out.
  • Consider using a script that checks the Steam web API for the latest version before running the full update – this can save bandwidth.

Troubleshooting

  • SteamCMD fails to login – Try adding +force_install_dir before login, or use a Steam account that owns the game (some games require it).
  • Update downloads but server won’t start – Check that the server executable path is correct and that the config files are still valid. Run the server manually to see error messages.
  • Server restarts but players can’t connect – Verify the server is listening on the correct port (default 27015) and that the firewall allows it.
  • Script runs but doesn’t update – Check the log for errors, especially path issues. Ensure SteamCMD is not running as administrator when it doesn’t need to be.
  • Task Scheduler doesn’t run the script – Set the task to run whether the user is logged on or not, and use the full path to the script.

Frequently Asked Questions

  • Do I need a paid Steam account for SteamCMD? – No, anonymous login works for dedicated server files.
  • Will the update wipe my server saves? – Usually not, but backups are recommended.
  • Can I run both ETS2 and ATS servers on the same machine? – Yes, but they need separate folders and ports.
  • How often should I check for updates? – Daily is fine; SCS releases updates irregularly.
  • What if the server is running when the update starts? – The script should stop it first, as shown in the steps.
  • Can I use this method for other games? – Yes, just change the app ID and server executable.

Related

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.

More cards in this drawer

The whole Numbers and Powers drawer →