Skip to content

Configuration Reference

R3 uses a TOML configuration file. All settings are documented below.

[referee] Section

Core bot settings.

toml
[referee]
bot_name = "R3"
bot_prefix = "^2R3:^3"
database = "sqlite://r3.db"
logfile = "r3.log"
log_level = "info"
SettingTypeRequiredDefaultDescription
bot_namestringYesBot's display name in-game
bot_prefixstringNo"^2RRR:^3"Color-coded prefix for bot messages (uses Quake 3 color codes)
databasestringYesDatabase connection string (see below)
logfilestringYesPath to R3's own log file
log_levelstringNo"info"Log verbosity: error, warn, info, debug, trace

Database Connection Strings

SQLite (recommended for single-server setups):

toml
database = "sqlite://r3.db"           # Relative path
database = "sqlite:///var/lib/r3/r3.db"  # Absolute path

MySQL (for multi-server or high-volume setups):

toml
database = "mysql://user:password@localhost:3306/r3"

Quake 3 Color Codes

CodeColor
^0Black
^1Red
^2Green
^3Yellow
^4Blue
^5Cyan
^6Magenta
^7White

[server] Section

Game server connection settings.

toml
[server]
public_ip = "192.168.1.100"
port = 27960
# rcon_ip = "192.168.1.100"    # Optional: separate RCON IP
# rcon_port = 27960             # Optional: separate RCON port
rcon_password = "your_rcon_password"
game_log = "/home/gameserver/.q3a/q3ut4/games.log"
delay = 0.33
SettingTypeRequiredDefaultDescription
public_ipstringYesGame server's IP address
portintegerYesGame server's port
rcon_ipstringNopublic_ipRCON IP (if different from game server)
rcon_portintegerNoportRCON port (if different from game port)
rcon_passwordstringYesRCON password (must match rcon_password in server.cfg)
game_logstringYesFull path to the game server's games.log file
delayfloatNo0.33Log polling interval in seconds

TIP

Set delay lower (e.g., 0.1) for faster response times, or higher (e.g., 1.0) to reduce CPU usage. The default 0.33 (3 checks/second) is a good balance.

[web] Section

Web dashboard configuration. Omit this section entirely to disable the dashboard.

toml
[web]
enabled = true
bind_address = "0.0.0.0"
port = 8080
# jwt_secret = "your-secret-key"
SettingTypeRequiredDefaultDescription
enabledboolNofalseEnable/disable the web dashboard
bind_addressstringNo"0.0.0.0"Address to bind the web server to
portintegerNo8080Web server port
jwt_secretstringNoauto-generatedSecret key for JWT token signing

WARNING

If you don't set jwt_secret, a random one is generated on each startup, which will invalidate all existing sessions. Set a fixed value for production use.

[[plugins]] Array

Each plugin is configured as a TOML array entry. All plugins share the same base structure:

toml
[[plugins]]
name = "plugin_name"
enabled = true
# config_file = "path/to/external/config.toml"  # Optional

[plugins.settings]
# Plugin-specific settings go here
SettingTypeRequiredDefaultDescription
namestringYesPlugin identifier (see Plugin Overview)
enabledboolNotrueEnable or disable this plugin
config_filestringNoPath to an external config file for this plugin

Plugin Settings

Each plugin has its own [plugins.settings] table. See individual plugin pages for their settings:

  • Admin — warn reasons, max warnings, spam messages, rules
  • PowerAdminUrt — team balance, radio spam protection
  • Censor — bad words/names regex patterns
  • SpamControl — flood detection thresholds
  • TK — team kill/damage limits
  • And 25 more...

Complete Example

toml
[referee]
bot_name = "R3"
bot_prefix = "^2R3:^3"
database = "sqlite://r3.db"
logfile = "r3.log"
log_level = "info"

[server]
public_ip = "10.10.0.2"
port = 25000
rcon_password = "your_rcon_password"
game_log = "/home/gameserver/.q3a/q3ut4/games.log"
delay = 0.33

[web]
enabled = true
bind_address = "0.0.0.0"
port = 8080

[[plugins]]
name = "admin"
enabled = true
[plugins.settings]
warn_reason = "Server Rule Violation"
max_warnings = 3

[[plugins]]
name = "welcome"
enabled = true

[[plugins]]
name = "spamcontrol"
enabled = true
[plugins.settings]
max_messages = 5
time_window_secs = 10

[[plugins]]
name = "tk"
enabled = true
[plugins.settings]
max_team_kills = 5

[[plugins]]
name = "stats"
enabled = true

[[plugins]]
name = "xlrstats"
enabled = true

[[plugins]]
name = "pingwatch"
enabled = true
[plugins.settings]
max_ping = 250
max_warnings = 3

Released under the GPL-2.0 License.