Skip to content

skua-international/BIOCOM-go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

a3mgr

A single-binary Arma 3 dedicated server manager for Linux. Runs multiple server instances as Podman containers with shared read-only game files and workshop mods. Uses blue/green deployments for zero-downtime updates.

Requirements

  • Linux (amd64)
  • Podman installed and running (podman socket enabled)
  • SteamCMD installed and in $PATH
  • A Steam account (does not need to own Arma 3; Steam Guard must be disabled)

Quick Start

# 1. Bootstrap config and directory structure
a3mgr init

# 2. Edit the config (set Steam credentials)
#    Or export STEAM_USER / STEAM_PASSWORD env vars
nano ~/.config/a3mgr/config.yaml

# 3. Start the daemon in the background
a3mgr daemon &

# 4. Download the game files
a3mgr depot update
a3mgr depot promote

# 5. Create and start a server
a3mgr server create myserver --port 2302
a3mgr server start myserver

Installation

a3mgr is a single statically-linked binary. Copy it somewhere in your $PATH:

cp a3mgr /usr/local/bin/

Configuration

Run a3mgr init to scaffold the default config and directory tree. Paths adapt automatically based on whether you run as root or a regular user:

Root Non-root
Config /etc/a3mgr/config.yaml ~/.config/a3mgr/config.yaml
Data /var/lib/a3mgr/ ~/.local/share/a3mgr/
Socket /var/run/a3mgr/a3mgr.sock $XDG_RUNTIME_DIR/a3mgr/a3mgr.sock

The config file supports ${ENV_VAR} expansion, so you can keep secrets out of the file:

steam:
  user: ${STEAM_USER}
  password: ${STEAM_PASSWORD}
  cmd: "steamcmd"

container:
  runtime: "podman"
  network_mode: "host"
  image_name: "a3mgr-runner"

depot:
  binary: "arma3server_x64"    # or arma3serverprofiling_x64
  branch: "creatordlc"

logging:
  level: "info"                # debug, info, warn, error
  format: "json"               # json or text

Daemon

The daemon is the long-running process that manages server containers. All lifecycle commands (start, stop, restart, list, status, logs) talk to it over a Unix socket.

# Start in the foreground
a3mgr daemon

# Start in the background
a3mgr daemon &

# Start with env vars for credentials
STEAM_USER=myuser STEAM_PASSWORD=mypass a3mgr daemon &

# Stop it
kill $(pgrep -f 'a3mgr daemon')
# Or if it's in the foreground, Ctrl+C — it handles SIGINT/SIGTERM gracefully.

Systemd service (optional)

[Unit]
Description=a3mgr Arma 3 Server Manager
After=network.target podman.socket

[Service]
Type=simple
Environment=STEAM_USER=myuser
Environment=STEAM_PASSWORD=mypass
ExecStart=/usr/local/bin/a3mgr daemon
Restart=on-failure
RestartSec=5

[Install]
WantedBy=multi-user.target

Game Files (Depot)

Game files use a blue/green deployment model. Updates download to the inactive slot without affecting running servers. You promote when ready and restart servers to pick up the new files.

# Download/update game files to the inactive slot
a3mgr depot update

# Switch the active symlink to the updated slot
a3mgr depot promote

# Restart servers to pick up new files
a3mgr server restart myserver

# Something wrong? Revert to the previous slot
a3mgr depot rollback

Workshop Mods

Mods are managed through Arma 3 Launcher HTML preset files. Export a preset from the launcher and point a3mgr at it (local path or URL).

# Preview which mod IDs a preset contains
a3mgr mods import /path/to/preset.html
a3mgr mods import https://example.com/modlist.html

# Download/update all mods from all server presets to the inactive slot
a3mgr mods update

# Switch active mods and restart servers
a3mgr mods promote
a3mgr server restart myserver

# Revert mods
a3mgr mods rollback

Server Management

Create a server

# Minimal — just a name and port
a3mgr server create myserver --port 2302

# With workshop mods from a preset
a3mgr server create myserver --port 2302 \
  --mods-preset /path/to/preset.html

# With headless clients and extra parameters
a3mgr server create myserver --port 2302 \
  --mods-preset https://example.com/mods.html \
  --headless-clients 2 \
  --param "-hugepages"

Ports: Each server uses 5 consecutive UDP ports (e.g. 2302–2306). Make sure they don't overlap between servers.

Modify a server

Only the flags you specify are changed:

a3mgr server set myserver --port 2402
a3mgr server set myserver --headless-clients 3
a3mgr server set myserver --mods-preset /new/preset.html
a3mgr server set myserver --param "-hugepages -enableHT"

Changes take effect on next restart.

Start / Stop / Restart

These commands talk to the daemon:

a3mgr server start myserver
a3mgr server stop myserver
a3mgr server restart myserver

List all servers

a3mgr server list
NAME        PORT  STATUS   UPTIME
myserver    2302  running  2h 15m
training    2402  stopped

Detailed status

a3mgr server status myserver
Server: myserver
Port:   2302
Status: running
Uptime: 2h 15m
Mods:   @ace, @cba_a3, @tfar
Headless Clients: 2
  hc-1: running
  hc-2: running

View logs

# Last 50 lines (default)
a3mgr server logs myserver

# Last 200 lines
a3mgr server logs myserver -n 200

# Follow (tail -f style)
a3mgr server logs myserver -f

Remove a server

Stops all containers and deletes the server directory and database record:

a3mgr server remove myserver

Typical Update Workflow

# 1. Update game + mods (downloads to inactive slots, servers keep running)
a3mgr depot update
a3mgr mods update

# 2. Promote both
a3mgr depot promote
a3mgr mods promote

# 3. Restart servers to use new files
a3mgr server restart myserver
a3mgr server restart training

Global Flags

Available on all commands:

Flag Short Default Description
--config -c auto-detected Path to config file
--socket -s auto-detected Unix socket path for daemon connection

Command Reference

a3mgr init                          Bootstrap config and directories
a3mgr daemon                        Start the daemon (foreground)
a3mgr version                       Print version

a3mgr depot update                  Download game files to inactive slot
a3mgr depot promote                 Switch active slot to updated files
a3mgr depot rollback                Revert to previous slot

a3mgr mods import <preset>          Preview mod IDs from preset file/URL
a3mgr mods update                   Download mods to inactive slot
a3mgr mods promote                  Switch active mods
a3mgr mods rollback                 Revert mods

a3mgr server create <name> --port N Create a server
a3mgr server set <name> [flags]     Modify server settings
a3mgr server remove <name>          Delete a server
a3mgr server list                   List all servers with status
a3mgr server start <name>           Start a server
a3mgr server stop <name>            Stop a server
a3mgr server restart <name>         Restart a server
a3mgr server status <name>          Detailed server status
a3mgr server logs <name> [-f] [-n]  View/follow container logs

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages