-
Notifications
You must be signed in to change notification settings - Fork 0
Cross‐server support
This page applies only to the network license. If you purchased the single server license, skip this page, you don't need MySQL or Redis and SQLite mode is correct for your setup.
On a BungeeCord or Velocity network with multiple backend servers, a player's balance and every material's rate need to stay consistent regardless of which server they're currently connected to. SQLite is a local file and cannot be shared safely across multiple server processes at once, so network setups require a shared MySQL backend, with Redis (or a polling fallback if Redis isn't available) handling near real time sync notifications between servers.
- Create a MySQL database and a user with full privileges on it.
- In
config.yml, setdatabase.modetomysqland fill in the connection details underdatabase.mysql. - Repeat this configuration identically on every backend server in your network. All servers must point at the same database.
- Restart each server one at a time, not simultaneously, the first restart will create the necessary tables.
Redis is optional but strongly recommended for network setups, since it provides near instant sync notifications rather than relying on polling intervals, which reduces the window where a player could see a stale balance right after switching servers.
- Set
database.redis.enabledtotrueand fill in your Redis connection details. - Redis must be reachable from every backend server in your network.
Without Redis, Exchequer falls back to a polling interval to check for changes made on other servers, configurable but not instant. This is functional but not recommended for larger networks with frequent trading activity.
After setup, deposit a material on one server, then switch to a second server in the network and check /exchequer bank balance. The balance should reflect the deposit within your configured sync interval (near instant with Redis, up to your polling interval without it).
Balances differ between servers after setup. Double check every server is pointing at the exact same MySQL database, not separate databases with the same schema. This is the most common setup mistake.
Sync works but is slow. Confirm Redis is actually enabled and connected, check /exchequer status on each server. If Redis shows as disconnected, Exchequer is silently falling back to polling.