DocsHostingGetting started

Quick start: Docker

The Docker image runs the same servers natively, so the rest of this guide applies as it is: the same dedicated.toml, commands, bans, votes, playlists and mods. Docker adds one command to start, stop and update, and settings through environment variables.

Each server runs in a container of its own, on the machine's own network: compose.yaml has a service per server, server-1 for the first [[server]] in dedicated.toml, server-2 for the second, and so on. Each server then has its own share of the processor, and one that restarts never touches the others. The containers share one server folder, one ban list and one master. Where host networking isn't available, one container for every server works too.

One file to host. Each release publishes the image as ghcr.io/projectreclaimer/project-reclaimer-dedicated, for x86-64 Linux, so all you need is compose.yaml and your own game files: nothing to build and nothing else to download. The image holds the server, never game files or game code: it prepares the engine from your game folder when it starts, and keeps the result in its cache volume.

Folder
reclaimer/
├─ compose.yaml             a service per server: image, folders
├─ .env                     optional settings
└─ server/                  the server folder
   ├─ dedicated.toml        written on the first start, commented
   ├─ game/                 files copied from your own game install
   ├─ content/  playlists/  bans.json
   └─ data/<server>/        each server's log and live status
  1. Install Docker Docker Engine with the Compose plugin, 2.24 or newer, on any x86-64 Linux:
    Ubuntu
    sudo apt install docker.io docker-compose-v2
  2. Make the folder and add compose.yaml
    Shell
    mkdir reclaimer
    cd reclaimer
    Save compose.yaml in reclaimer, or copy it from the file below.
  3. Put the game files in server/game On a PC with the game, run dedicated init C:\reclaimer --from "your game's folder" as in the Windows quick start and upload that folder as server with the scp Windows includes; that brings a dedicated.toml too:
    PowerShell, on the Windows PC
    scp -r C:\reclaimer you@host:reclaimer/server
    reclaimer/server mustn't exist yet, or the upload lands inside it as server/reclaimer. Or make the folders with mkdir -p server/game and copy the files in by hand, keeping their folders, such as server/game/halo3/halo3.dll. With the game installed on this machine through Steam, copy nothing: make the same folders and set GAME_DIR in .env to the game's folder. Make the folders yourself before the first start: a folder Docker has to create for you belongs to root.
  4. Choose settings (optional)Save env.example as .env next to compose.yaml and uncomment what you change, such as RECLAIMER_DEDICATED_HOST_NAME or RECLAIMER_DEDICATED_ADMINS. See environment variables.
  5. Start
    Shell
    docker compose up -d
    docker compose logs -f
    The first start downloads the image, writes server/dedicated.toml with two servers (a Slayer playlist on UDP 49176, which needs Guardian, Valhalla, The Pit and Narrows, and Slayer on Guardian on UDP 49177), checks everything and starts them: container server-1 runs the first, server-2 the second. With fewer maps, change the servers in that file. The servers report to the project's public masters, so players find them in the Server Browser without adding anything.
  6. Open the ports Open the servers' UDP ports and TCP and UDP 49175 in your provider's firewall or security group, and in the machine's own firewall: on the host's network, the servers' ports are the machine's, so ufw applies.
    Shell
    sudo ufw allow 49175:49177/udp && sudo ufw allow 49175/tcp

If something is missing, the log says what and the containers wait: fix it in the server folder, and the servers start by themselves within 15 seconds.

compose.yaml

The whole file. Its settings come from .env, so you edit it only to add a service for each server past the first two (see more servers).

compose.yaml
# Project Reclaimer dedicated servers in Docker (Linux containers, the game
# running natively), one container per server. Guide: docs/servers.md.
#
# This file is all a host needs: it runs the published image, so no copy
# of the repository and no build. It is Project Reclaimer 0.9's file with
# the same services, folders and volume: a host of 0.9 updates with
#   docker compose pull && docker compose up -d
# and keeps its server folder, its settings and its servers' keys.
#
# Put it in a folder of its own, then:
#
#   1. Copy Halo 3's files from your own MCC installation into
#      server/game/ next to this file (halo3/halo3.dll, halo3/maps/shared.map,
#      the maps you host, and campaign.map with 040_voi.map for Forge's
#      campaign vehicles and AI). `project-reclaimer dedicated init server
#      --from` on a PC with MCC copies them. The image contains no game files.
#   2. Optional: a .env file next to this one with your settings
#      (see .env.example).
#   3. docker compose up -d
#      docker compose logs -f
#
# On first start the containers write a commented dedicated.toml into the
# server folder; edit it for names, maps, playlists and admins (edits apply
# while the servers run). Each service below runs one [[server]] of that
# file: server-1 the first, server-2 the second. For another server, add a
# [[server]] block there and a service here like server-2, with the next
# number. Commands for running servers:
#   docker compose exec server-1 dedicated status
#   docker compose exec server-1 dedicated ban <player ID | IP | CIDR> --reason "..."
# (bans.json is shared: a ban applies to every server.)
# Update to a new release: docker compose pull && docker compose up -d
#
# The containers use the host's network: each server's own UDP port and the
# machine's master (TCP and UDP 49175) need no list of ports here, and the
# servers share one master. Open them in the firewall. Where host
# networking is not available, compose.single.yaml runs every server in
# one container on published ports instead.
#
# To build the image from a checkout of the repository instead, add
# compose.build.yaml; for a master, stats service or social service of
# your own, compose.services.yaml (see there).

name: reclaimer

# What every server's container shares.
x-server: &server
  # The newest release; set IMAGE in .env to stay on one version.
  image: ${IMAGE:-ghcr.io/projectreclaimer/project-reclaimer-dedicated:latest}
  restart: unless-stopped
  # The supervisor stops its servers cleanly on Ctrl+C (SIGINT).
  stop_signal: SIGINT
  stop_grace_period: 30s
  # Every RECLAIMER_DEDICATED_* setting in .env overrides dedicated.toml,
  # as do PUID and PGID (see .env.example).
  env_file:
    - path: .env
      required: false
  volumes:
    - ${SERVER_DIR:-./server}:/server
    # Read-only: the servers never change the game files.
    - ${GAME_DIR:-./server/game}:/server/game:ro
    # The Forge library and other caches, kept across updates.
    - cache:/cache
  network_mode: host
  security_opt:
    - no-new-privileges:true
  # Roughly per server: under 0.1 core and 100 MB waiting, a core and
  # 0.6-0.9 GB in a full game (more briefly while loading a map). Uncomment
  # to cap or pin a server, e.g. per service: cpus: "1.5" or cpuset: "2,3".
  # cpus: "2"
  # mem_limit: 3g
  logging:
    driver: json-file
    options:
      max-size: 10m
      max-file: "3"

services:
  server-1:
    <<: *server
    environment:
      # The [[server]] this container runs: its position in dedicated.toml,
      # its name or its game port.
      RECLAIMER_DEDICATED_ONLY: "1"
  server-2:
    <<: *server
    environment:
      RECLAIMER_DEDICATED_ONLY: "2"

volumes:
  cache:

Versions and updates

compose.yaml runs latest, the newest release, and docker compose pull && docker compose up -d updates to the next one. To stay on one version, name it in .env and run docker compose up -d:

.env
IMAGE=ghcr.io/projectreclaimer/project-reclaimer-dedicated:0.10.12

Every release has its own tag, such as 0.10.12, and 0.10 follows the newest 0.10.x. Pre-releases are only published under their own tag, never as latest.

Automatic updates don't apply in Docker: the image is the update. A container ignores auto_update and RECLAIMER_DEDICATED_AUTO_UPDATE, and says so in its log.

Everyday use

Run these in the folder with compose.yaml. A command run in one server's container, such as server-1, sees that server; the shared ban list makes a ban apply to every server.

TaskCommand
Follow the logdocker compose logs -f, or one server's: docker compose logs -f server-2
Every server's players and addresses, the masterdocker compose exec -e RECLAIMER_DEDICATED_ONLY= server-1 dedicated status
One server'sdocker compose exec server-2 dedicated status
Ban, lift a bandocker compose exec server-1 dedicated ban <target> --reason "…", … dedicated unban <target>
Let a player through the VPN blockdocker compose exec server-1 dedicated vpn allow <player ID> (see VPN blocking)
Remote console commandsdocker compose exec server-2 dedicated rcon players, for the server that container runs (see RCON)
Check files and settingsdocker compose run --rm server-1 dedicated check
The maps and game types dedicated.toml and playlists can namedocker compose run --rm server-1 dedicated content <words> (see names and playlists)
List and check the playlists; one in detaildocker compose run --rm server-1 dedicated playlist, … dedicated playlist show <file>
Make a playlistdocker compose run --rm server-1 dedicated playlist new "Team Slayer" --maps "Guardian,Valhalla,The Pit" --games Slayer
Apply dedicated.toml, playlist or content editsThey apply by themselves once saved; see changing settings while servers run. With auto_reload = false: docker compose exec -e RECLAIMER_DEDICATED_ONLY= server-1 dedicated reload. docker compose restart applies everything at once, ending the games under way.
Apply .env or compose.yaml editsdocker compose up -d
Stop, startdocker compose stop, docker compose start
Updatedocker compose pull && docker compose up -d
  • Each container restarts by itself after a crash or reboot, and Docker reports it healthy while its servers keep their live status fresh, each server's game is running, and the machine's master answers. A server whose game crashed three times in a row, each within two minutes of its start, stays unhealthy until a game has run for two minutes. Each server also logs to server/data/<server>/server.log.
  • File owner: the servers run as the owner of the server folder, so the files they write are yours. PUID and PGID in .env choose another user and group; use those rather than Compose's user:.
  • Mods and playlists: put shared maps, game types and mods in server/content, and playlists in server/playlists. The image has no Steam, so copy Workshop mods into server/content/Mods yourself; see Workshop downloads in Docker.
  • Remote console: set RECLAIMER_DEDICATED_RCON_PASSWORD in .env. On the host's network, each server's console then listens on the machine's own 127.0.0.1, at its game port number, where tools on the machine reach it. RECLAIMER_DEDICATED_RCON_ADDRESS=0.0.0.0 opens the consoles on every network the machine is on: do that only behind a firewall that lets just your tools in. See RCON.
  • Docker Desktop (Windows, or macOS on Intel) runs the same containers once host networking is turned on in its settings (4.34 or newer), or every server in one container with compose.single.yaml.

More servers

Add a [[server]] block to dedicated.toml with the next port, and a service for it to compose.yaml, under services:, with the next number:

compose.yaml
  server-3:
    <<: *server
    environment:
      RECLAIMER_DEDICATED_ONLY: "3"

Then run docker compose up -d, and open the new server's UDP port in the firewall.

  • RECLAIMER_DEDICATED_ONLY picks the server a container runs: its position in dedicated.toml, counting from 1, its name ("Big Team Battle") or its game port ("49178"). A list, such as "3,4", runs several in one container. Set it per service in compose.yaml, never in .env. A choice that matches no server stops the start.
  • Every container mounts the same server folder: the bans, playlists, content and caches are shared, and the first container to start writes the folder on the first start.
  • The containers share one master: one serves port 49175, the others' servers report to it, and another takes it over within half a minute if its container stops. When two start at once, both may try: the second's master ends and it uses the first's.
  • To give a server its own share of the machine, add cpus: (such as cpus: "1.5"), cpuset: (such as cpuset: "2,3") or mem_limit: to its service. A full server wants about a core of its own; see servers per machine.
  • Outside Docker, RECLAIMER_DEDICATED_ONLY works the same: each dedicated started with it runs only the servers it names, from one shared folder.

One container for every server

Where host networking isn't available, such as Docker Desktop without it, compose.single.yaml runs every server in one container on published ports. Save it next to compose.yaml, and either name it in each command or set it once in .env:

Shell
docker compose -f compose.single.yaml up -d
.env
COMPOSE_FILE=compose.single.yaml
  • Its one service is reclaimer: docker compose exec reclaimer dedicated status lists every server, and the other commands above take reclaimer in place of server-1.
  • More servers: add a [[server]] block with the next port, widen GAME_PORTS in .env to cover it (GAME_PORTS=49176-49180) and run docker compose up -d. A configuration runs up to 32 servers.
  • Ports: Docker publishes the master's TCP and UDP ports and the GAME_PORTS range itself, past ufw; open them in your provider's firewall.
  • Remote console: inside this container it must listen on every interface to be published at all. Set RECLAIMER_DEDICATED_RCON_PASSWORD and RECLAIMER_DEDICATED_RCON_ADDRESS=0.0.0.0 in .env, and uncomment the TCP line under ports: in compose.single.yaml, which publishes the consoles on the host's own 127.0.0.1 only.

Moving between the two layouts

To move a running setup from compose.single.yaml to one container per server, add a service for each [[server]] past the second to compose.yaml, open the ports on the machine (on the host's network, its own firewall applies), and start with:

Shell
docker compose pull
docker compose up -d --remove-orphans

--remove-orphans is needed once, so the old reclaimer container stops and frees the ports. The server folder, bans and caches stay as they are. Moving back the other way also takes --remove-orphans once.