Auto Tournament

Configuration

All environment variables for Auto Tournament.

You configure Auto Tournament 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 matchzy-tournament

Most other settings, such as match rules, the webhook URL and the hostname format, are in the app under Settings.

The variable names still use MATCHZY_ in some places. They keep these names until 3.0.

Required

VariableWhat it does
SESSION_SECRETSecret for login sessions. Without it, everyone is logged out on each restart. Create one with openssl rand -base64 32.
SERVER_TOKENShared secret between Auto Tournament and your CS2 servers. Servers send it with events and demo uploads. 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 and cookies. With https:// cookies are only sent over HTTPS. The webhook URL starts with this value.
STEAM_API_KEYSteam Web API key. Needed for Steam login and to look up Steam profile URLs. Get one at steamcommunity.com/dev/apikey.

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_NAMEmatchzy_tournamentDatabase name.
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.
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.

Admins and sign-in

VariableDefaultWhat it does
ADMIN_STEAM_IDSemptySteam64 IDs that are always admin, separated by commas. Applied on every start. It only adds admins.
AUTH_STEAM_ENABLEDtrueSteam login. It also needs STEAM_API_KEY.
BACKEND_BASE_URLFRONTEND_BASE_URLBase address for login callbacks, if the API has another public address than the web app.

Sign-in providers

Discord, GitHub and Keycloak are for admins who do not want to use Steam. Admin rights always belong to a Steam ID, so the admin must also link a Steam account.

VariableWhat it does
AUTH_DISCORD_ENABLEDtrue to turn on Discord login.
DISCORD_CLIENT_ID, DISCORD_CLIENT_SECRETFrom your Discord application. Redirect URL: FRONTEND_BASE_URL + /api/auth/discord/callback.
AUTH_GITHUB_ENABLEDtrue to turn on GitHub login.
GITHUB_CLIENT_ID, GITHUB_CLIENT_SECRETFrom your GitHub OAuth app. Callback URL: FRONTEND_BASE_URL + /api/auth/github/callback.
AUTH_KEYCLOAK_ENABLEDtrue to turn on Keycloak (OpenID Connect) login.
KEYCLOAK_ISSUER_URLThe realm address, for example https://sso.example.com/realms/tournament.
KEYCLOAK_CLIENT_ID, KEYCLOAK_CLIENT_SECRETFrom your Keycloak client. Redirect URI: FRONTEND_BASE_URL + /api/auth/keycloak/callback.
KEYCLOAK_CALLBACK_PATHChange the callback path. Default /api/auth/keycloak/callback.
KEYCLOAK_IDP_HINTSend users straight to one identity provider in Keycloak. Use the provider alias.
AUTH_KEYCLOAK_LABELName of the provider on the login page. Default Keycloak.
AUTH_KEYCLOAK_BUTTON_LABEL, AUTH_KEYCLOAK_BUTTON_BG_COLOR, AUTH_KEYCLOAK_BUTTON_TEXT_COLOR, AUTH_KEYCLOAK_BUTTON_HOVER_BG_COLORText and colors of the Keycloak login button.

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).

See API for the format.

Game servers

VariableDefaultWhat it does
API_BASE_URLFRONTEND_BASE_URLStarting value for the webhook URL, if the game servers must use another address than the browser. After the first start, change it in Settings instead. Also used as the server address in /api-docs.
ALLOW_UNAUTHENTICATED_EVENTSfalseAccept game events without a token. Only for servers set up by hand or by a very old version. While it is on, anyone who can reach the API can send fake results. Turn it off again after you click Retry on your servers.
MATCHZY_ENABLE_SIMULATION_IN_PRODfalseAllow simulation mode. Only for test installs.
GITHUB_TOKENemptyGitHub token for Sync CS2 Maps. Only needed if you hit the GitHub rate limit.

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).

On this page