⚠️ You need to have some experience with Ansible, Left 4 Dead games and linuxgsm before using this repo!
This repository uses Ansible to deploy and install dedicated Left 4 Dead 1 or 2 servers with LinuxGSM on Debian 13.
As root user :
apt-get install sudo openssh-server openssh-client whois python3 python3-apt python3-venv python3-full gitcontrolleruser=ansible
adduser "${controlleruser}"
usermod -aG sudo "${controlleruser}"echo "${controlleruser} ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/"${controlleruser}"
chmod 750 /etc/sudoers.d
chmod 440 /etc/sudoers.d/"${controlleruser}"su - "${controlleruser}"
python3 -m venv --upgrade-deps ~/venv
echo "source ~/venv/bin/activate" | tee -a ~/.profile
source ~/venv/bin/activate
pip install ansible ansible-core ansible-lint passlibRSA 4096 or ED25519
ssh-keygen -o -a 256 -t ed25519 -C "${USER}@${HOSTNAME}" -f ~/.ssh/id_ed25519_ansible -N ""git clone https://github.com/fbapt/ansible-lgsm-l4d-l4d2.git ~/ansible-lgsm-l4d-l4d2As root user :
apt-get install sudo openssh-server python3 python3-apt cronnodeuser=ansible
adduser "${nodeuser}"
usermod -aG sudo "${nodeuser}"echo "${nodeuser} ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/"${nodeuser}"
chmod 750 /etc/sudoers.d
chmod 440 /etc/sudoers.d/"${nodeuser}"ip aAs ansible user, copy SSH key to each node :
nodeip=x.x.x.x
nodeuser=ansible
sshtype=ed25519 or rsa
ssh-copy-id -i ~/.ssh/id_"${sshtype}"_ansible.pub "${nodeuser}@${nodeip}"- Change parameters of your host.
- Modify variables as you need.
- Use a strong password for .vault_pass :
Comment in ansible.cfg :
#vault_password_file=.vault_pass
Change password :
ansible-vault rekey host_vars/debian13testing/vault.ymlUncomment :
vault_password_file=.vault_pass
Edit .vault_pass with new password.
nano .vault_pass→ l4dserver.cfg
→ host.txt, mymotd.txt
→ server.cfg, l4dserver.cfg
→ Non-workshop maps
→ Workshop maps (L4D2 only)
→ Metamod plugin files
→ addons + cfg/sourcemod
→ dumps + maps configs
Run as ansible user on controller :
ansible-playbook system_update.yml --limit production
ansible-playbook lgsm.yml --limit production
⚠️ You must create each user SSH key (l4d1,l4d2) on your server and download it on your computer.
On Windows :
Use PuTTYgen + Pageant.
Enable :
- "Use proven primes with even distribution (slowest)"
- "Use 'strong' primes as RSA key factors"
Generate RSA 4096 or EdDSA recommended.
Add a passphrase (min 16 characters).
Save private key. Load into Pageant → Add key.
Copy/paste the public key into
ssh-keys:
- type: ssh-ed25519
key: <HERE>
On Linux:
Generate RSA 4096 or EdDSA recommended.
Add a passphrase (min 16 characters).
ssh-keygen -o -a 256 -t ed25519 -C "${USER}@${HOSTNAME}" -f ~/.ssh/id_ed25519_l4d[2]
cat id_ed25519_l4d[2].pubCopy/paste the public key into
ssh-keys:
- type: ssh-ed25519
key: <HERE>
Recommended nftables
ansible-playbook configure_ssh_nftables.yml --limit productionor iptables
ansible-playbook configure_ssh_iptables.yml --limit productionansible-playbook performance.yml --limit productionPlaybooks tested with packages :
- ansible community
- ansible-core
- ansible-lint
Tested on Debian 13
LGSM docs :
- https://docs.linuxgsm.com/
- https://linuxgsm.com/servers/l4dserver/
- https://linuxgsm.com/servers/l4d2server/
Ansible docs :
