# Any dedicated server on Steam: give the app id and the start command.
id: steamcmd-generic
name: Steam dedicated server (generic)
description: For dedicated servers without their own template. Downloads any Steam app (anonymously or with a Steam account) and runs your start command.
architectures: [amd64]
images:
  - label: Steam runtime
    image: registry.audifire.ch/hosting-panel/runtime-images/steam:latest
startupMode: shell
startup: "{{START_COMMAND}}"
stop:
  signal: SIGINT
  timeoutSeconds: 60
ports:
  - role: game
    protocol: both
  - role: query
    protocol: udp
    variable: QUERY_PORT
# more ports per server when creating it (e.g. rcon → $PORT_RCON)
customPorts: true
steam:
  appId: "{{STEAM_APP_ID}}"
  beta: "{{BRANCH}}"
  account: optional
# most Steam games answer A2S on their query port; remove for games that don't
query:
  protocol: a2s
  port: query
variables:
  - key: STEAM_APP_ID
    name: Steam app id
    description: The dedicated server's app id (steamdb.info), not the game's.
    visibility: admin
    rules: required|integer
  - key: BRANCH
    name: Beta branch
    visibility: admin
    rules: nullable|alpha_dash
  - key: START_COMMAND
    name: Start command
    description: Run in the server's folder; $SERVER_PORT, $QUERY_PORT and $PORT_<ROLE> for ports you added hold the assigned ports.
    default: ./server -port $SERVER_PORT
    visibility: admin
    rules: required|string|max:1000
