Skip to content

NATS Configuration

OptionsRealTime uses NATS as its messaging server. Rover starts NATS automatically by default. Most users never need to interact with NATS directly. This page documents the underlying nats.config file, useful when troubleshooting startup issues, customizing storage limits, or running against a centrally-managed NATS server in an institutional deployment.

<install dir>\nats.config

The installer generates this file with absolute paths on first install. Subsequent installs preserve the existing file.

# NATS Server Configuration for OptionsRealTime
host: 0.0.0.0
port: 4222
http: 0.0.0.0:8222
max_payload: 67000000
websocket {
host: 0.0.0.0
port: 9222
no_tls: true
}
jetstream {
store_dir: "C:/Users/<username>/AppData/Local/OptionsRealTime/jetstream"
max_memory_store: 1GB
max_file_store: 50GB
sync_interval: "2m"
}
SettingDefaultDescription
host0.0.0.0IP address to bind. 0.0.0.0 listens on all interfaces.
port4222Main NATS port for client connections
http0.0.0.0:8222HTTP monitoring endpoint
max_payload67000000Maximum message size in bytes (~64MB)
SettingDefaultDescription
websocket.host0.0.0.0IP address for WebSocket connections
websocket.port9222WebSocket port, used by browser clients
websocket.no_tlstrueTLS disabled for LAN use
SettingDefaultDescription
store_dir<install>/jetstreamAbsolute path to JetStream data storage
max_memory_store1GBMaximum memory for stream storage
max_file_store50GBMaximum disk space for stream storage
sync_interval2mHow often to sync data to disk

No changes needed. The default configuration works for single machine use, with Rover automatically managing the NATS lifecycle.

See the Multi-Machine Setup guide for complete instructions, including firewall configuration.

jetstream {
max_memory_store: 2GB
max_file_store: 100GB
}
  • Absolute paths required. The store_dir must be an absolute path, not relative. The installer generates it as an absolute path automatically.

  • Forward slashes. Use forward slashes (/) in paths, not backslashes.

  • Config preserved on upgrade. The installer will not overwrite an existing nats.config. Your customizations are preserved.

  • Restart required. After editing nats.config, restart Rover. Rover picks up the new config when it spawns NATS on the next launch.

ProblemSolution
Remote machine can’t connectSee Multi-Machine Setup, includes firewall configuration
Browser shows no dataVerify the websocket block is present and port 9222 is open
JetStream data not persistingVerify store_dir is an absolute path
Out of disk space errorsIncrease max_file_store or clear old streams
Rover reports NATS won’t startCheck <InstallDir>\logs\nats.log for the underlying error. Common causes include another program using port 4222 or antivirus blocking nats-server.exe