Squad is a tactical FPS that provides authentic combat experiences through teamwork, communication, and gameplay. It seeks to bridge the large gap between arcade shooter and military simulation. Large scale, combined arms combat, base building, and a great integrated VoIP system.
This Docker image contains the dedicated server of the game.
Running on the host interface (recommended):
$ docker run -d --net=host -v /home/steam/squad-dedicated/ --name=squad-dedicated cm2network/squad
Running using a bind mount for data persistence on container recreation:
$ mkdir -p $(pwd)/squad-data
$ chmod 777 $(pwd)/squad-data # Makes sure the directory is writeable by the unprivileged container user
$ docker run -d --net=host -v $(pwd)/squad-data:/home/steam/squad-dedicated/ --name=squad-dedicated cm2network/squad
Running multiple instances (iterate PORT, QUERYPORT and RCONPORT):
$ docker run -d --net=host -v /home/steam/squad-dedicated/ -e PORT=7788 -e QUERYPORT=27166 -e RCONPORT=21115 --name=squad-dedicated2 cm2network/squad
It's also recommended using "--cpuset-cpus=" to limit the game server to a specific core & thread.
The container will automatically update the game on startup, so if there is a game update just restart the container.
version: '3.9'
services:
squad:
image: cm2network/squad
container_name: squad
restart: unless-stopped
network_mode: "host"
volumes:
- /storage/squad/:/home/steam/squad-dedicated/
environment:
- MULTIHOME="" #IF YOY HAVE MULTIPLE IP ADDRESSES, PUT THE ONE YOU WANT TO WORK HERE
- PORT=7787
- QUERYPORT=27165
- BEACONPORT=15000
- RCONPORT=21114
- FIXEDMAXPLAYERS=100
- SERVER_NAME="Squad Dedicated Server"
Feel free to overwrite these environment variables, using -e (--env):
PORT=7787
QUERYPORT=27165
BEACONPORT=15000
RCONPORT=21114
FIXEDMAXPLAYERS=80
FIXEDMAXTICKRATE=50
RANDOM=NONE
MODS="()"
SERVER_NAME="Squad Dedicated Server"
MULTIHOME=x.x.x.x - use only if you have multiple IP addresses enter server IP instead of x.x.x.x
The config files can be edited using this command:
$ docker exec -it squad-dedicated nano /home/steam/squad-dedicated/SquadGame/ServerConfig/Server.cfg
If you want to learn more about configuring a Squad server check this documentation.
Add each id to the MODS environment variable, for example MODS="(13371337 12341234 1111111)"
MODS must be a bash array
(mod1id mod2id mod3id)
where each mod id is separated by a space and inclosed in brackets
You can get the mod id from the workshop url or by installing it locally and lookup the numeric folder name at <root_steam_folder>/steamapps/workshop/content/393380
.