Multiplayer backend for the GSC family of titles (Cossacks: European Wars / The Art of War / Back to War; American Conquest).
The server exposes a TCP listener for the GSC protocol, a UDP STUN responder for hole-punching, and an HTTP endpoint for metrics and health probes. An IRC service (Ergo) for the in-game chat is bundled in the Compose stack.
| Topic | Link |
|---|---|
| Container build & Docker Compose | CONTAINER.md |
| Internal package layout | internal/README.md |
| GSC application | internal/app/gsc/README.md |
| Templates | templates/README.md |
| Template pipeline notes | docs/TEMPLATES.md |
| Runtime configuration | config/simple-cossacks-server.yaml |
These steps apply to the classic GSC client.
- Open
Internet\ggwdc.ini. - Replace
ggwdserver_addr gms.2gw.netwith your host or IP. - Keep
ggwdserver_port 34001. - Save and start the game.
Runtime configuration is loaded from a YAML file by
internal/platform/config. Every key is documented inline in
config/simple-cossacks-server.yaml.
Environment variables that override or supplement the config:
| Variable | Effect |
|---|---|
HOST_NAME |
Public hostname surfaced as chat_server and the STUN advertisement target. |
UDP_KEEP_ALIVE_INTERVAL |
Propagated to the GSC hole_int config and the STUN keep-alive TTL. |
METRICS_ADDR |
Address for /metrics, /livez, /readyz. |
PROBE_ADDR |
Override address for /livez + /readyz only. |
LOG_FORMAT |
user (console) or json. |
LOG_FILE |
Log file path with rotation. |
From the repository root:
go test -race -cover ./...
make test
make lintmake lint invokes the project's pinned golangci-lint build under
bin/; no global toolchain is required.
git clone https://github.com/ldmonster/cossacks-game-server
cd cossacks-game-server
cat > .env <<'EOF'
HOST_NAME=YOUR_PUBLIC_HOST_OR_IP
UDP_KEEP_ALIVE_INTERVAL=300
EOF
docker compose up -d --buildFor everything else container-related see CONTAINER.md.
This project is licensed under the Apache License 2.0. See LICENSE for the full text.