SRCDS Linux Service
This is a shell script that will let you run the Source Dedicated Server (SRCDS) from Valve as a service on your Linux machine.
- Screen (Terminal multiplexer utility. See: GNU Screen)
- Your favorite text editor
- Create a file named
- Paste the contents of the srcds.sh file from this repository in that file.
<newuser>with the user you want to run the service under
- Adjust the
PARAMSstring for the game you want to run.
- Set the file permissions to be executable (
chmod a+x /etc/init.d/srcds).
You can manage the service just like any other init.d service. With
- Start SRCDS:
- Restart SRCDS:
- Stop SRCDS:
- Get SRCDS status:
This was originally created by FreeNerd and posted on his Linux SRCDS server article.
I have modified at and updated it to suit my needs and have added several fixes provided by others in the discussion from my blog post about running a Team Fortress 2 server.
You can find the discussion here: