Auto Tournament

Configuration

All environment variables for Auto Tournament.

You configure the few things that cannot live in the app with environment variables in the .env file next to docker-compose.yml. After a change, recreate the app container:

docker compose up -d --force-recreate auto-tournament

Everything else, such as sign-in providers, admins, match rules, the webhook URL and the hostname format, is in the app under Settings. Some variables below are only imported once into Settings on the first start (marked "imported once"): after that the value saved in Settings wins, and the variable can be removed.

Required

VariableWhat it does
SESSION_SECRETSecret for login sessions. Without it, everyone is logged out on each restart. Also the key for secrets saved in Settings when SECRETS_KEY is not set. Create one with openssl rand -base64 32.
SERVER_TOKENShared secret for server-side tools that are not enrolled servers, such as CS2 Server Manager's update hold and older demo uploads. They send it as X-Auto-Tournament-Token. Ready Up servers use their own token from enrollment. Create one with openssl rand -base64 24 | tr -d '=+/'.
FRONTEND_BASE_URLThe address people open in the browser, for example https://tournament.example.com. Used for login redirects, cookies (https:// makes them HTTPS-only), callback URLs and the fleet link address.

Docker and database

VariableDefaultWhat it does
HOST_PORT3069The port on your machine. Only used by docker-compose.yml.
DB_USERpostgresDatabase user.
DB_PASSWORDpostgresDatabase password.
DB_NAMEauto_tournamentDatabase name. 2.x used matchzy_tournament; 3.0 renames it on the first start (see Upgrading to 3.0).
DATABASE_URLBuilt from DB_*Full PostgreSQL address. docker-compose.yml sets it for you.
DB_HOST, DB_PORTpostgres in Docker, port 5432Only used when DATABASE_URL is not set.
DATA_DIR/app/dataWhere demos, logs, map images, installed modules and round backups are kept. Mount a volume here.
PORT3000Internal API port. docker-compose.yml sets it. Do not change it.
NODE_ENVproduction in Dockerdocker-compose.yml sets it.

Set DB_USER, DB_PASSWORD and DB_NAME before the first start. The database is created with these values, and changing them later does not change the existing database.

Secrets saved in Settings

VariableDefaultWhat it does
SECRETS_KEYSESSION_SECRETKey for the secrets saved in Settings (sign-in client secrets, the Steam key), stored encrypted with AES-256-GCM. Changing it, or SESSION_SECRET when this is unset, makes the saved secrets unreadable: enter them again in Settings.

Sign-in and admins

These are set up in Settings → Sign-in. The variables are imported once. See Sign-in providers for each provider's guide.

VariableWhat it does
AUTH_STEAM_ENABLED, STEAM_API_KEYSteam. On unless AUTH_STEAM_ENABLED=false; needs the key. The key also looks up Steam profile URLs.
AUTH_DISCORD_ENABLED, DISCORD_CLIENT_ID, DISCORD_CLIENT_SECRETDiscord.
AUTH_GITHUB_ENABLED, GITHUB_CLIENT_ID, GITHUB_CLIENT_SECRETGitHub.
AUTH_GOOGLE_ENABLED, GOOGLE_CLIENT_ID, GOOGLE_CLIENT_SECRETGoogle.
AUTH_TWITCH_ENABLED, TWITCH_CLIENT_ID, TWITCH_CLIENT_SECRETTwitch.
AUTH_EPIC_ENABLED, EPIC_CLIENT_ID, EPIC_CLIENT_SECRETEpic Games.
AUTH_OIDC_ENABLED, OIDC_ISSUER_URL, OIDC_CLIENT_ID, OIDC_CLIENT_SECRET, OIDC_LABELAny OpenID Connect server (Keycloak, Authentik, Entra ID, …); OIDC_LABEL names the button.
ADMIN_STEAM_IDSSteam64 IDs that are admin (Admin Steam IDs). Made admin at every start. Ready Up servers also read this variable directly for in-game admin commands.
ADMIN_EMAILSAddresses that become admin when they sign in with a provider that verified them (Admin emails).
BACKEND_BASE_URLBase address for login callbacks, if the API has another public address than the web app. Default: FRONTEND_BASE_URL.

Callback URLs are FRONTEND_BASE_URL + /api/auth/<provider>/callback. Settings shows each with a copy button.

License

VariableWhat it does
AT_ACCEPT_LICENSEAccept the license terms without the browser, for scripted installs: noncommercial or commercial. Setting it means you have read and accept them, including later versions.
LICENSE_KEYYour license key (starts with ATL1.). Saved on start when it differs from the saved one, so it wins over a key pasted in Settings → License. A missing or invalid key never blocks anything. See License key.

API tokens

VariableWhat it does
API_TOKENSTokens with full admin rights, for bots and scripts.
API_TOKENS_READONLYTokens that can only read (GET, HEAD, OPTIONS).
API_TOKENS_INTEGRATORTokens that only reach the integrations API (/api/integrations), for example a website sending its teams. See Webhooks and teams API.

See API for the format.

Games and modules

VariableDefaultWhat it does
PREINSTALL_PACKSnoneInstall the image's game packs on the first start: all, or a comma-separated list of slugs such as rocket-league,chess.
CATALOG_URLThe catalog in Auto-Tournament/packsWhere the game catalog comes from.
CATALOG_OFFLINEfalseNever fetch the catalog; offer only what the image carries. For air-gapped LANs. CS2 then also uses its bundled map list.
MODULE_AUTO_UPDATEtrueOn start, update modules installed from the catalog to the newer release the image carries, within their major version.
MODULE_TRUSTED_KEYSnoneExtra Ed25519 public keys (base64, comma-separated) that may sign code modules, for your own module builds.
AT_RESTART_SUPERVISEDtrue in the Docker imageWhether something restarts the app when it exits, so the Modules page can offer Restart now.
GAMES_ENRICHonoff stops the background lookups of game pictures on Wikidata.

Game servers (CS2)

VariableDefaultWhat it does
API_BASE_URLFRONTEND_BASE_URLStarting value for the webhook URL your servers use to reach the site, if they must use another address than the browser. After the first start, change it in Settings → Counter-Strike 2. Also used as the server address in /api-docs.
ALLOW_UNAUTHENTICATED_EVENTSfalseAccept server events without a token. Only for servers set up by a very old version. While it is on, anyone who can reach the API can send fake results. Leave it off.
FLEET_BACKUP_RETENTION_DAYS14Days to keep the round backups Ready Up servers send, after a match ends. 0 keeps them forever.
FLEET_AUTOSCALE_INTERVAL_MS15000How often automatic scaling checks the servers on csm machines. 0 turns its timer off. Turn scaling itself on or off on the Servers page.
AT_ENABLE_SIMULATION_IN_PRODfalseAllow simulation mode. Only for test installs.

Logging

VariableDefaultWhat it does
LOG_LEVELinfotrace, debug, info, warn, error or fatal. debug also turns on database logs.
LOG_HTTP_REQUESTStrueLog every HTTP request. With false, only errors are logged.
LOG_DB_VERBOSEoffLog every database query. On with LOG_LEVEL=debug.
LOG_DB_VALUESoffAlso log database results (with secrets hidden). On with LOG_LEVEL=debug. Set false to keep it off.
LOG_RCON_VERBOSEfalseAlso log RCON commands that work.

Other

VariableDefaultWhat it does
CORS_ORIGIN*Allowed origins for live updates (WebSocket).
LICENSE_CHECKIN_URLautotournament.ggWhere the daily license check-in goes; off turns it off. Only used with a license key.

On this page