Repository navigation
Running in Docker
The game's repository holds a Dockerfile and a compose.yaml for the dedicated server in
Engine/assets/server/deploy/. The image is built from the source on your machine; there is no ready-made image.
The image holds only the server program. Your disc's rules data, the keys, the logs and the scripts' data live in a
volume, never in the image.
From the root of a clone of the game's repository:
-
Make
server.tomlbesidecompose.yaml(copyserver.toml.examplethere and edit it). Inside a container,bindmust be"::"or"0.0.0.0". -
Build the image (this compiles the server; it takes a while):
docker compose -f Engine/assets/server/deploy/compose.yaml build
-
Set up the rules data from your own disc image into the volume, once:
docker compose -f Engine/assets/server/deploy/compose.yaml run --rm \ -v /path/to/your/ssx.iso:/iso/ssx.iso:ro avalanche-server setup /iso/ssx.iso --out /srv/avalanche/data
-
Start it:
docker compose -f Engine/assets/server/deploy/compose.yaml up -d
| Task | Command (add -f Engine/assets/server/deploy/compose.yaml) |
|---|---|
| check the configuration | docker compose run --rm avalanche-server check --config /srv/avalanche/server.toml --data /srv/avalanche/data |
| the log | docker compose logs -f avalanche-server |
apply a changed server.toml
|
docker compose restart avalanche-server |
| stop | docker compose stop |
- Ports UDP 27450, TCP 27450 and UDP 27451 published on the host.
-
server.tomlmounted read-only at/srv/avalanche/server.toml; an icon goes beside it (the file has the line commented out). - The volume
avalanche-dataat/srv/avalanche/data. - The graceful stop: SIGTERM, and 110 seconds before Docker kills the server: a round under way (
[stop] round_end, 60 s by default) and 50 seconds for the rest of the stop (Running as a Service lists them). With anotherround_end, setstop_grace_periodtoround_end+ 50 seconds. - The server runs as an unprivileged user (uid 10001) and restarts unless you stopped it.
A container has no console input: use the remote console from the host or from anywhere else.
Keep the resources in a folder beside compose.yaml, mount it read-only and point the server at it:
volumes:
- ./server.toml:/srv/avalanche/server.toml:ro
- avalanche-data:/srv/avalanche/data
- ./resources:/srv/avalanche/resources:ro[resources]
folder = "/srv/avalanche/resources"
start = ["welcome"]The server only reads that folder; its own copies and the scripts' data stay in the volume.
Both need the host's network: LAN broadcasts and the router see the container's network otherwise. With
lan = true or [port_mapping] enabled = true, remove ports from compose.yaml and add
network_mode: host.
The server's keys (identity.key, netcode.key), acl.toml, bans.toml and the scripts' data are in the volume.
Back up the whole volume with your usual Docker volume backup; losing identity.key makes players' games refuse the
server.
Servers
- Hosting a Server
- Server Configuration
- Ports and Firewalls
- Server Console
- Operators and Remote Console
- Access Control List
- Bans and Mutes
- The Server List
- Query and LAN Discovery
- Server Resources
- Blocklists
- Maps and Gamemodes
- Logs and Metrics
- Running as a Service
- Running in Docker
- Joining a Server
Scripting
- Resource Packages
- Content IDs and Kinds
- Scripting Overview
- Server Script API
- Client Script API
- Events and Messages
- Script Permissions
- Script Examples
Modding