Skip to content

Configuration 🔩 ​

Ratchet is configured by editing the config.json file.

Basic Configuration ​

For most cases it is recommended to simply use default settings.

You might want to change a path for plugins and packages.

Below is a minimal example of a config file.

json
{
  "plugins": "C:/Ratchet/plugins",
  "packages": "C:/Users/USERNAME/AppData/Roaming/luarocks/share/lua/5.4/?.lua",
  "webserver": {
    "enabled": true,
    "port": 5460
  }
}

Advanced Configuration ​

Below is an example of a config file that contains all the options that can be changed.

json
{
  "plugins": "C:/Ratchet/plugins",
  "packages": "C:/Users/USERNAME/AppData/Roaming/luarocks/share/lua/5.4/?.lua",
  "extensions": {
    "enabled": true,
    "path": "ratchet/extensions"
  },
  "buildCheck": {
    "enabled": true,
    "loadAnyway": false
  },
  "msPerTick": 50,
  "netFixes": false,
  "webserver": {
    "enabled": false,
    "host": "0.0.0.0",
    "port": 5460,
    "logRequests": false
  },
  "database": {
    "enabled": true,
    "connectionTimeout": 500,
    "logQueries": false
  },
  "hooks": {
    "logHooks": false,
    "debugFocus": ""
  },
  "timers": {
    "enabled": true,
    "logTimers": false
  },
  "scheduler": {
    "enabled": true,
    "logEvents": false
  },
  "sandbox": {
    "enabled": true,
    "logUsage": false
  },
  "defer": {
    "enabled": true
  },
  "playerData": {
    "enabled": true
  },
  "storage": {
    "enabled": true
  },
  "profiler": {
    "enabled": false
  },
  "chatLogger": {
    "enabled": false,
    "path": "ratchet/chat",
    "retainDays": 14
  }
}

plugins ​

Path to plugins directory.

Default: plugins

packages ​

Path to Lua packages used in require for LuaRocks support.

Default: <empty string>

extensions ​

enabled ​

Enable loading of extensions (.dll on Windows, .so on Linux) from a directory.

Default: true

path ​

Path to the directory for extensions.

Default: ratchet/extensions

buildCheck ​

Every Ratchet release is made for one specific build of the Conan Exiles dedicated server. Running it on a different build will most likely crash the server.

When this check is enabled, Ratchet reads the build ID of the server on startup and compares it with the one it was made for. When they don't match, a critical error is logged and Ratchet won't load. Your server will load without Ratchet, unless you force it to try to load Ratchet anyway.

enabled ​

Default: true

loadAnyway ​

Load Ratchet even when the server build doesn't match. A critical error is still logged.

Default: false

DANGER

Changing this to true is likely to get your server stuck in a crash loop whenever there's a game update. Only enable this if you know what you're doing.

msPerTick ​

Amount of milliseconds in between each main loop tick. This is best left unchanged.

Default: 50

netFixes Legacy ​

Conan Exiles has many networking issues on its Legacy version. One such issue is with the connection code that results in refusal of connections when there's too many players online. Ratchet has a built-in solution for this included in the version 0.2.6, enabling this setting will apply three fixes that address these connection issues.

Default: false

webserver ​

enabled ​

Enable web server.

Default: false

host ​

Binding host address for the web server. Default value of 0.0.0.0 allows any interface.

Default: 0.0.0.0

port ​

Web server port.

Default: 5460

logRequests ​

Print debug message with every REST API call.

Default: false

database ​

enabled ​

This can be used to completely disable database thread in case you don't use database connections at all on your server.

Default: true

connectionTimeout ​

Connection timeout for dbConnect in milliseconds. This can be overriden per use case.

Default: 500

logQueries ​

Print debug message with every SQL query.

Default: false

hooks ​

logHooks ​

Log most game server actions. Enabling this can be very resource intensive and cause lags.

Default: false

debugFocus ​

A partial name of a class to focus on and log everything from. Previous setting has to be enabled for this to work. Other hooks will be ignored and not logged.

Default: <empty string>

timers ​

enabled ​

Enable timers, allowing them to tick.

Default: true

logTimers ​

Print debug message whenever timers are created, removed, or executed.

Default: false

scheduler ​

enabled ​

Enable event scheduler.

Default: true

logEvents ​

Print debug message whenever scheduler executes an event.

Default: false

sandbox ​

enabled ​

Enable code execution from /ratchet sandbox.

Default: true

logUsage ​

Print debug message whenever Sandbox is used.

Default: false

defer ​

enabled ​

Enable defer manager.

Default: true

playerData ​

enabled ​

Enable PlayerData (in-memory + SQLite permanent key-value storage).

Default: true

storage ​

enabled ​

Enable Storage (in-memory + SQLite permanent key-value storage).

Default: true

profiler ​

enabled ​

Enable Lua profiler for Admin UI to track heaviest operations per plugin.

Default: false

chatLogger ​

Chat logger saves all chat messages into text files, also accessible in the Admin UI.

This is way more privacy friendly alternative to Discord webhooks, as the data never leave the device and isn't shared with third parties.

enabled ​

Default: false

path ​

Path to save chat logs into. Logs are saved into text files split per each day.

Default: ratchet/chat

retainDays ​

Logs are automatically deleted after this amount of days.

Default: 14