Building on some groundwork by @Mustack , this project automated the creation of a L4D2 Dedicated server. With the 2020 pandemic we started playing more L4D2 and found documentation for setting up a dedicated server severely lacking/outdated. This project will setup a server with some select custom maps, 5 player coop and 5v5 versus. Modify /srv/salt/top.sls
if you don't want every mod deployed.
- Follow the procedures on the Saltstack page Saltstack Package Repo make sure to select the correct tab for CentOS 7. This was only tested/ran on CentOS 7.
- You definitely need
salt-master
andsalt-cloud
, you might needsalt-api
andsalt-ssh
- Checkout the project files into their specific folders
- You need to set up ssh keys with digitalocean, as well as access keys. See Digital Ocean Tutorial for advice
- Add your missing values to
/etc/salt/cloud.providers.d/digitalocean.conf
salt-cloud -P -m /etc/salt/cloud.maps.d/dev-environment.map -l debug
Note: If you spun up the DigitalOcean droplet with the code above, it's already a minion. Otherwise you're on your own.
- You need the Steam Group ID when deploying the server (below). To get the value for your group, in the 'Edit group profile' the 'ID' is the group number you need for the server
- Clients need to subscribe to the workshop maps Steam Workshop Collection or they can't connect when using a custom map.
- Workshop files were too big for Github to be uploaded. They need to go into
/srv/salt/l4d2-mods/workshop
on the salt master. See Google Drive with big files - Same with missing_content.vpk, it needs to go into
/srv/salt/l4d2-mods/missing_content.vpk
on the salt master
salt '*' state.highstate pillar='{"steamgroup": "<steamgroup #>"}'
Eg: salt '*' state.highstate pillar='{"steamgroup": "12345678"}'
Optionally, you can pass in server_mode and max_players for L4D2 as well. For Elastic monitoring, it's recommended to provide a default password
salt '*' state.highstate pillar='{"steamgroup": "<steamgroup #>", "max_player_count": "<number of players>", "server_mode":"<coop|versus>", "bootstrap_pass": "<password>"}'
Eg: salt '*' state.highstate pillar='{"steamgroup": "12345678", "max_player_count": "7", "server_mode":"coop", "bootstrap_pass": "Solarwinds123"}'
/home/steam/L4D2/srcds_run -console -game left4dead2 -gamestatsloggingtofile -condebug -developer -dev
Kibana is deployed at https://<monitoring_server_ip>:5601/
, you can log in with the user 'elastic' and the password you provided above.
Filebeat will be deployed to the L4D2 server, and the ingest pipeline will be set up automatically in Kibana/Elasticsearch to parse the incoming logs.
- How to setup a dedicated server on Debian/Ubuntu
- L4D2 Cvars
- Digital Ocean User Setup
- Digital Ocean Salt Cloud Tutorial
- SteamCMD
- Original server config
- Custom L4D2 Campaigns
- Run the server as a service
- Salt doesn't seem to support SSH key file passwords