Skip to content

Configuration ​

The server reads server.toml once at startup, from the folder that contains resources/. The copy in the repository is the reference: it lists every setting with its default value, valid range and environment variable.

  • A missing file or key uses the default value.
  • Environment variables (DARQLINEMP_*) override the file, and ports given on the command line override both.
  • An unknown key, a value of the wrong type or a value out of range prevents the server from starting, so a typo never goes unnoticed.
  • name is the server name shown in the launcher's server list.
  • [resources] startup lists the resources that start with the server; see Resources.
  • [auth] names the resource that decides who may join. The bundled accounts resource keeps one profile per launcher installation.

ADR 0050 explains the design of the file.

Default file ​

toml
# DarqlineMP server configuration.
#
# The server reads this file once at start from the folder that holds `resources/`. Every value below is the built-in
# default, so a missing file or key behaves exactly like this file. Each value can also be set by an environment variable
# (shown next to it), which wins over the file; the ports given on the command line (`darqlinemp-server
# [game_port [client_files_port]]`) win over both.
#
# An unknown key, a wrong type, a value out of range or an unparsable environment variable prevents the server
# from starting.

# Display name of the server: 1..64 bytes of printable text.
# Env: DARQLINEMP_NAME
name = "DarqlineMP server"

# Player slots: 1..1000. A connection past them is refused as `server_full`.
# Env: DARQLINEMP_MAX_PLAYERS
max_players = 1000

# Password to join: up to 64 bytes of text, no control characters; empty lets everyone in. Players never send it in clear:
# they prove they know it. Change it while running with `password set <text>` / `password clear` or Lua.
# Env: DARQLINEMP_PASSWORD
password = ""

[network]
# UDP port of the game: 1..65535.
# Env: DARQLINEMP_NETWORK_GAME_PORT
game_port = 23277

# TCP port the resource client files are served on, 1..65535; players get it when they join. Unset, it is the game port
# number, so one number opens both UDP and TCP.
# Env: DARQLINEMP_NETWORK_CLIENT_FILES_PORT
# client_files_port = 23277

[resources]
# Resources started at boot, by directory name under `resources/`. They start in dependency order; one that is missing
# or fails to start stops the server. Other installed resources start from the console (`resource start <name>`).
# Env: DARQLINEMP_RESOURCES_STARTUP (comma-separated, e.g. "demo,sandbox"; empty starts none)
startup = ["demo"]

[auth]
# The resource that decides who gets in (logins, accounts, whitelists). Until it accepts a connection, the other
# resources do not see that player. Unset or empty lets everyone in as a guest. The name must be in
# `[resources] startup`; while that resource is not running nobody gets in, and stopping it disconnects everyone. The
# shipped `accounts` keeps one profile per launcher device and turns away a client started without the launcher.
# Env: DARQLINEMP_AUTH_RESOURCE
# resource = "accounts"

# Seconds a connection may wait for the auth resource's decision: 10..600.
# Env: DARQLINEMP_AUTH_TIMEOUT_SECONDS
timeout_seconds = 120

# Auth sites the auth resource's login screen may reach (web login): up to 4, each `id` ([a-z0-9_-], 1..31 bytes), `origin`
# (https://<host>[:port] with a DNS name, or http:// on 127.0.0.1 or localhost for a server on the same computer) and
# `public_key` (its Ed25519 key, base64url).
# The core takes a sign-in token only when it is signed by one of these keys for this server. Needs `resource` above. Not
# settable by environment. Example site: examples/web-auth-provider.
# [[auth.providers]]
# id = "example"
# origin = "http://127.0.0.1:8090"
# public_key = "..."

Documentation licensed under CC BY 4.0. DarqlineMP is not affiliated with Rockstar Games or Take-Two Interactive. Grand Theft Auto is a trademark of Take-Two Interactive Software, Inc.