Skip to content

server.toml

server.toml is read by LoadServerConfig, a minimal flat key = value parser (a TOML scalar subset), not a full TOML parser. Practical consequences:

  • Flat keys only. [section] headers and nested tables are ignored.
  • Arrays must be single-line: resources = ["a", "b"]. Multi-line arrays are not supported (the parser reads the file line by line).
  • A bool is true for true, 1, yes, or on; anything else is false.
  • Quotes around strings are optional and stripped automatically (name = "X" and name = X are equivalent).
  • # comments truncate the rest of the line — do not use # inside values (URLs, passwords).
  • Unknown keys are silently ignored.

Fields split into two groups: (A) parsed by the loader (setting them works) and (B) present in ServerConfig but NOT parsed by the flat loader (setting them has no effect — the compiled default is kept).

Example

toml
name = "My Varion Server"
host = "0.0.0.0"
port = 7788
httpPort = 7789
maxPlayers = 128
maxQueueSlots = 32

gamemode = "roleplay"
channel = "release"
minClientBuild = 0
tickRate = 64
streamingDistance = 300
migrationDistance = 150

debug = false
collectClientDiagnostics = false
encryptTransport = true
announce = true
masterListUrl = "https://master.example/api"
serverPassword = ""
language = "en"
description = "Freeroam + roleplay"
website = "https://example.com"
tags = ["roleplay", "voice"]

resourcesDir = "resources"
resources = ["my-gamemode"]
modulesDir = "modules"

spawnAfterConnect = false

(A) Parsed fields

KeyTypeDefaultPurpose
namestring"Varion Server"Server name shown in the server browser
hoststring"0.0.0.0"Game socket bind address
portuint167788Game UDP/ENet port
httpPortuint167789HTTP port (manifest, resource files, /server-info.json)
maxPlayersuint321024Admitted player cap
maxQueueSlotsuint3264Extra ENet slots for the connection queue (on top of maxPlayers)
gamemodestring"freeroam"Gamemode label for the server browser
channelstring"release"Release channel (release/rc/dev); the client must match
minClientBuilduint320Minimum client build (0 = no minimum)
tickRateuint3264Server tick frequency (Hz)
streamingDistancefloat300Entity streaming radius (m)
migrationDistancefloat150Radius within which empty vehicles migrate ownership to the nearest player (m)
debugboolfalseDebug logging
collectClientDiagnosticsboolfalseAllow clients to upload bounded log tails to the HTTP endpoint
clientDiagnosticsDirstring"logs/client-diagnostics"Directory for uploaded client logs
encryptTransportbooltrueTransport encryption (ECDH P-256 + AES-256-GCM)
announcebooltruePublish to the masterlist (false = never announce, even with a URL set)
masterListUrlstring""Masterlist backend URL (empty = don't announce)
descriptionstring""Server browser description
websitestring""Server website
languagestring"en"Server language
serverPasswordstring""Connection password (empty = no password)
useEarlyAuthboolfalseEnable an external login page before the connection completes
earlyAuthUrlstring""Early-auth page URL
useCloudAuthboolfalseEnable cloud identity validation at handshake (see note)
spawnAfterConnectboolfalseDev only: the engine spawns the player itself (see note)
resourcesDirstring"resources"Resource directory
modulesDirstring"modules"Native module directory
resourcesstring[][]Resources in order; empty = auto-scan every subfolder with a resource.toml
modules / loadModulesstring[][]Parsed but NOT used (see note)
tagsstring[][]Server browser tags

Notes for (A):

  • Exact key names. Use maxPlayers, maxQueueSlots, serverPassword. The old players, queueSlots, password names are ignored.
  • Empty resources → auto-scan. Every subfolder of resourcesDir that has a resource.toml is loaded (resources with enabled = false are skipped). A non-empty list is loaded strictly in the given order by exact folder name — wildcards (*, dir/*) are NOT expanded in this list.
  • The JS host auto-starts. Any type = "js" resource with a non-empty main automatically starts the server JavaScript host — no modules entry is needed.
  • modules / loadModules has no effect on loading. The key is parsed, but the module loader loads EVERY library (*.dll/*.so) in modulesDir regardless of this list.

(B) Fields NOT parsed by the flat parser

These fields are declared in ServerConfig, but the flat parser has no case for them — setting them in server.toml has no effect and the compiled default (the Default column) is kept. Don't waste time configuring them via TOML.

KeyTypeDefault (compiled)Purpose
maxEntitiesuint3265535Upper entity cap
maxStreamedEntitiesuint328192Concurrent streamed-entity cap
serverAntiCheatbooltrueAnti-cheat flag
extendedLoggingbooltrueExtended logging
masterListTokenstring""Inline owned-server token
masterListTokenFilestring"data/masterlist-token.txt"Token cache path
publicHoststring""Public host sent to the backend
serverIdstring""Official server identity
serverLicenseTokenstring""Inline license proof
serverLicenseTokenFilestring"data/server-license.txt"License proof file
requireServerLicenseboolfalseFail startup without identity/proof
allowLocalUnlicensedbooltrueAllow local dev mode without a license
dataDirstring"data"Data directory
configFilestring"server.toml"Config path (set via launch argument, not from TOML)
cloudAuthUrlstring""Cloud identity validation URL
cloudAuthRequiredbooltrueRequire cloud identity
cloudApiUrlstring""Cloud API URL
cloudApiTokenstring""Cloud API token
spawnXfloat215.76Dev spawn X
spawnYfloat-810.12Dev spawn Y
spawnZfloat30.73Dev spawn Z
spawnHeadingfloat157.0Dev spawn heading
spawnModeluint320x705E61F2 (mp_m_freemode_01)Dev spawn model
debugSpawnRemotePedboolfalseTest server-owned ped through the normal streaming path
debugRemotePedNetworkIduint1665000Test ped network id
debugRemotePedModeluint320x9B22DBAF (player_one)Test ped model
debugRemotePedOffsetXfloat2.0Test ped X offset
debugRemotePedOffsetYfloat0.0Test ped Y offset
debugRemotePedOffsetZfloat0.0Test ped Z offset
debugRemotePedHeadingfloat337.0Test ped heading

Two important asymmetries

  • Cloud-auth is half-wired. useCloudAuth is parsed (you can enable it), but none of its detail fields — cloudAuthUrl, cloudAuthRequired, cloudApiUrl, cloudApiToken — are parsed. You can turn cloud validation on, but you cannot configure it via TOML. (Early-auth, by contrast, is fully wired: both useEarlyAuth and earlyAuthUrl are parsed.)
  • Dev spawn is fixed. spawnAfterConnect is parsed (the dev fallback can be enabled), but spawnX/Y/Z, spawnHeading, spawnModel are not — the spawn point is hard-compiled (215.76, -810.12, 30.73, heading 157, model mp_m_freemode_01). For a real server keep spawnAfterConnect = false and spawn from a resource's playerReady handler through the SDK.

Identity and license

The identity/license fields (serverId, masterListToken, serverLicenseToken*, requireServerLicense, allowLocalUnlicensed, publicHost) and the trust model are documented in Masterlist. Note: except for masterListUrl and announce, the keys listed there are not read by the current flat server.toml parser — they keep their compiled defaults.

Varion Multiplayer Platform