This is a containerized Docker solution for quickly deploying a dedicated Left 4 Dead 2 (L4D2) server. The project includes complete server configuration, plugin system, and one-click deployment functionality.
- Linux system
- Docker and Docker Compose
- Stable network connection
.
├── as-root.sh # Docker container initialization script (root privileges)
├── as-user.sh # SteamCMD and game installation script
├── build-l4d2.sh # Docker image build script
├── entrypoint.sh # Container entrypoint script
├── compose.yml # Docker Compose configuration file
└── install-plugins.sh # Plugin installation script
# Grant execution permissions
chmod +x *.sh
# Build image
sudo ./build-l4d2.sh# Start using Docker Compose
docker-compose up -dThe following environment variables can be configured in compose.yml:
| Variable | Default Value | Description |
|---|---|---|
PORT |
27015 | Game server port |
DEFAULT_MAP |
c2m1_highway | Default map |
MAXPLAYERS |
- | Maximum players (default if not set) |
TICKRATE |
100 | Server tickrate (requires server.cfg modification if changed) |
TZ |
Asia/Shanghai | Timezone setting |
IP |
0.0.0.0 | Bind IP address |
EXEC_CFG |
server.cfg | Server configuration file |
| - | Your SSH Public Key |
The following directories are persistently stored via Docker volumes:
/addons- Plugin files/cfg- Configuration files/scripts- Script files
The project comes pre-installed with the L4D2-Competitive-Rework plugin.
This project is released under an open source license. Plugin components follow their respective licenses.
For issues or suggestions, please submit an Issue or Pull Request.
Note: Please ensure compliance with Steam and Valve's Terms of Service. This project is only for setting up personal or community game servers.