Skip to content

Server configuration

The server reads config.toml from its working directory at startup. Relative file paths are resolved from that directory. Restart the server after editing the file.

Place top-level settings before the first [section]. Values below a section header belong to that section until the next header. On Windows, paths can use forward slashes, such as "C:/Revo/server/resources/server/index.js", or TOML literal strings, such as 'C:\Revo\server\resources\server\index.js'.

The defaults below apply when a setting is omitted. Optional sections and values explicitly included in the shipped template are noted where they differ.

Setting Default Value and behavior
name "Server" Server name in the listing. String containing 1–128 UTF-8 bytes, without control characters.
language "en" Language tag in the listing, such as "en", "en-US" or "ru". Accepts 2–35 ASCII letters, digits and hyphens.
dev false Boolean. Marks the server as a development server in the listing and enables periodic replication reports when replication workers are active.
password "" Connection password. An empty string allows joining without a password. Maximum 256 UTF-8 bytes, without null characters.
host "0.0.0.0" Game listener bind address. The default listens on all IPv4 interfaces.
port 27015 Game UDP port. Integer from 1 to 65535.
max_players 32 Maximum connected players. Integer from 1 to 10000. Choose a value supported by your tested workload.
tick_interval 10 Wait after each server-loop iteration, in milliseconds. Nonnegative integer. 0 removes this wait. Processing time contributes to the total time between iterations.
sync_interval 25 Regular client sync interval in milliseconds. Integer from 25 to 45, or "auto". Automatic mode starts at 25 ms, increases the interval under sustained load and lowers it after recovery.
overload_guard false Boolean. Pauses new connections under sustained load and reopens admissions after recovery. Existing players stay connected. With automatic sync enabled, the guard waits until pressure persists at 45 ms.
stream_distance 200 Server streaming radius in metres. Positive finite number. Also supplies the default streamDistance for server-created audio.

For timing, worker and bandwidth choices, see Replication and bandwidth tuning. The hardware guide gives measured workloads and capacity estimates. Password handling in a launcher is covered under Server selection and join codes.

Setting Default Value and behavior
enabled false Boolean. Enables production registration and directory heartbeats. When disabled, local discovery is available on 127.0.0.1.
project_secret "" Private project credential provided through developer access. Required when registration is enabled.
public_host "" Public game hostname or IP address, without a scheme or port. Required when registration is enabled. The advertised port comes from the top-level port.
state_file "data/server-registration.json" File containing the registered server identity. Keep it across restarts and address changes. Each server instance needs its own file.
local_port 27019 Local discovery TCP port. Integer from 1 to 65535. Used when registration is disabled. Join with dev at the default port or dev:PORT at a custom port.
local_state_file "data/local-server.json" Persistent identity file for local discovery. Each local server instance needs its own file.

The shipped template explicitly sets state_file = ".api/data.json" and local_state_file = ".api/local.json". Existing state files should stay at their configured paths when updating a server.

See Register a production server and Multiple server instances for identity and address configuration.

Setting Default Value and behavior
url "" Public base URL for packaged client resources. Empty disables resource preparation and downloads. Use an HTTP(S) URL without credentials, a query or a fragment. A trailing slash is added automatically.
mode "local" "local" loads a package from path. "remote" fetches a published resource release from url.
path ".resources" Local package directory. With [resources.pack], this is the output directory. Without it, this directory must contain a prepared package.
key_path Omitted Path to the private resource key file. Required in remote mode. Use the same key as the resource publisher. Local packaging can also use this key.
release "" Remote mode only. Empty selects the latest release at each startup. A 64-character lowercase manifest SHA-256 hash pins a specific release.

Remote mode requires url and key_path, with [resources.pack] removed and resources.http.enabled = false. Use HTTPS for remote resources. HTTP is accepted for loopback addresses during local testing.

Follow Package and publish client resources for startup packaging during development and separate publication through resource-tool, S3 and a CDN. Key creation and reuse are covered in Resource encryption and keys.

This optional section enables packaging from source files before loading a local package. The shipped template includes it. To load a prepared package, remove both [resources.pack] and [resources.pack.scripts].

Setting Default within the section Value and behavior
path "resources/client" Existing directory containing client resource source files. Keep it separate from resources.path, with neither directory inside the other.
compression true Boolean. Compresses files when this reduces their size.
encryption false Boolean. Encrypts packaged downloads. Use a fresh output directory when changing encryption or the resource key.
workers 0 Integer from 0 to 8. 0 selects up to four concurrent packing jobs. 1 processes files one at a time.

Keep the private key outside the source directory and public package output. An empty resources.url disables the preparation step even when this section is present.

Setting Default Value and behavior
mode "off" "off", "minify" or "obfuscate". Applies JavaScript processing before compression and encryption.
paths ["scripts"] Nonempty array of file or folder paths relative to resources.pack.path. Use forward slashes. Wildcards and parent-directory traversal are rejected.
source_maps false Boolean. Saves source maps in the private package cache when script processing is enabled. These maps include the original source.

See JavaScript processing and source maps for file selection and supported extensions.

Setting Default Value and behavior
enabled false Boolean. Serves the local package through the embedded HTTP server. Requires a nonempty resources.url and local resource mode.
host "0.0.0.0" HTTP listener bind address.
port 27018 HTTP TCP port. Integer from 1 to 65535.

Set resources.url to the address players can reach. Disable embedded HTTP hosting when downloads are served by an external host.

Setting Default Value and behavior
replication 0 Integer from 0 to 8, or "auto". 0 runs replication on the main thread. Positive values select that many replication workers.

"auto" chooses half the logical processors allowed by process affinity, rounded down and capped at eight. It selects zero when fewer than three processors are available or affinity cannot be read. Selection happens once at startup. The resolved count appears in the startup log.

Setting Default Value and behavior
send_rate 1048576 Per-connection send limit in bytes per second. Integer from 65536 to 16777216. The default is 1 MiB/s.
bandwidth_budget 0 Outgoing game-traffic budget in bytes per second for automatic sync and the overload guard. Nonnegative integer. 0 disables bandwidth-based feedback.

Automatic sync and the guard use server-loop timing and replication worker load. A nonzero bandwidth budget adds outgoing game traffic to that assessment. Set it with room for voice, resource downloads and other traffic. See Monitoring and logs for interval and admission changes.

Setting Default Value and behavior
console true Boolean. Allows the in-game console opened with F2.
cef_debugger false Boolean. Allows local CEF inspection while connected to this server.

The client chooses the CEF inspection port through cef_debug_port in client.toml or the --cef-debug-port launch argument. The server must authorize inspection with cef_debugger = true. See CEF debugging.

Setting Default Value and behavior
entry "resources/server/index.js" Nonempty path to the server JavaScript entry file.
node_args [] Array of Node flags, each starting with --. Use --flag=value for arguments with a value, such as "--max-old-space-size=2048" or "--inspect=127.0.0.1:9229".

See Imports and npm dependencies for module loading and Server startup and shutdown for asynchronous initialization.

Setting Default Value and behavior
enabled true Boolean. Enables voice transport. Voice channels and membership are configured through scripts.
mode "embedded" "embedded" runs voice within the game server. "external" connects to a separate voice process.
media_port 27017 Client-facing voice UDP port. Integer from 1 to 65535. In external mode, match the voice process’s media port.
public_host "" Voice hostname or IP given to clients. Empty uses the game connection’s host. Set the public voice address when it runs on another machine.
host "127.0.0.1" External mode only. Voice control host reached by the game server.
port 27016 External mode only. Voice control UDP port, from 1 to 65535. Match the voice process’s control port.
secret "" External mode only. Generated 64-character hexadecimal shared key. Match the voice process’s key.

For external voice, generate the shared key and configure both processes as shown in Deploy a voice server. The voice process has its own configuration file.

Invalid TOML, wrong value types and rejected values stop startup. The log reports Failed to load configuration before the process exits. Check the named setting, its section and the accepted values above. Unknown keys can be ignored, so check spelling and section placement when a setting has no effect.