Dockerized Left 4 Dead 2 dedicated server
10K+
You can start a Left 4 Dead 2 dedicated server with nothing else installed except Docker by running:
docker run -itd --net=host --name l4d2 -v /srv/l4d2:/l4d2 phistrom/l4d2
This will run the server with the default parameters of -port 27015 and
-secure. The initial run of this container will download around 9.2GB of
data before it will start. Subsequent runs will be much, much faster (provided
you mount the same directory for /l4d2 each time).
Any additional parameters you specify will be passed along to the srcds_run
command. For example, the following is equivalent to the first example:
docker run -itd --net=host --name l4d2 -v /srv/l4d2:/l4d2 phistrom/l4d2 -port 27015 -secure
To save time, the steamcmd runs +app_update without validate. To verify
that the files for the dedicated server are not corrupt, pass in a non-empty
VALIDATE environment variable to the container like this:
docker run -itd --net=host --name l4d2 -v /srv/l4d2:/l4d2 -e VALIDATE=1 phistrom/l4d2
This is equivalent to running steamcmd +app_update 222860 validate before
starting srcds_run.
Be sure to mount the container's /l4d2 directory or else it will need to
redownload all the game files and Steam client every time.
To see what your server is doing, you can run docker logs -f l4d2.
Content type
Image
Digest
Size
48.2 MB
Last updated
over 5 years ago
docker pull phistrom/l4d2