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
- Install SteamCMD – Download and extract SteamCMD from the official Valve site. On Windows, place it in a folder like
C:\steamcmd. On Linux, usewgetandtarto install it. - Create a folder for your server files – For example,
C:\ets2serveror/home/ets2server. This is where the game files will live. - Write an update script – Create a file named
update.bat(Windows) orupdate.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.
- Test the script manually – Run it once to ensure it downloads the server files correctly. Check the output for errors.
- 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 -eand add a line like0 5 * * * /path/to/update.sh. - 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
pkilland then start the process withnohup. - 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_updateand 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. - Log the output – Redirect the script’s output to a log file so you can review what happened. For example,
update.bat >> update.log. - 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
screenortmuxto 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_dirbefore 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
- Microsoft Surface Duo: The Foldable Phone Story
- Samsung SM-T813 Hard Reset: Step-by-Step Guide
- Mafia Clash Codes: Real Meanings & Usage
- Remove Programs from Mac: Full Uninstall Guide
- Project Sentinel Morning Digest: Data Stack Failure Alerts
- Best KVM VPS Hosting: Top Picks & Guide