CyxWiz LogoCyxWiz
DocsConfiguration

Server Configuration

Complete configuration reference for the CyxWiz Central Server.

Configuration File

The Central Server uses TOML configuration files. Default location: config.toml

# CyxWiz Central Server Configuration

[server]
grpc_address = "0.0.0.0:50051"
rest_address = "0.0.0.0:8080"
max_connections = 1000
request_timeout = 60
tls_enabled = false

[database]
url = "postgresql://user:password@localhost:5432/cyxwiz"
max_connections = 20
min_connections = 5
connect_timeout = 30

[redis]
url = "redis://127.0.0.1:6379"
pool_size = 10
prefix = "cyxwiz:"
default_ttl = 3600

[blockchain]
network = "devnet"
solana_rpc_url = "https://api.devnet.solana.com"
payments_enabled = true

[jwt]
secret = "your-very-secret-key"
expiration = 86400

[logging]
level = "info"
format = "pretty"

Environment Variables

VariableDescriptionExample
CYXWIZ_SERVER_GRPC_ADDRESSgRPC bind address0.0.0.0:50051
CYXWIZ_SERVER_REST_ADDRESSREST bind address0.0.0.0:8080
CYXWIZ_DATABASE_URLDatabase connectionpostgresql://...
CYXWIZ_REDIS_URLRedis connectionredis://127.0.0.1:6379
CYXWIZ_JWT_SECRETJWT signing secretRandom string
CYXWIZ_LOG_LEVELLogging leveldebug

Command-Line Arguments

cyxwiz-central-server [OPTIONS]

Options:
  -c, --config <PATH>      Configuration file path [default: config.toml]
  --grpc-address <ADDR>    gRPC server address
  --rest-address <ADDR>    REST API address
  --database-url <URL>     Database connection URL
  --tui                    Enable terminal UI mode
  --log-level <LEVEL>      Log level (trace/debug/info/warn/error)
  -h, --help               Print help
  -V, --version            Print version

Database Configuration

PostgreSQL (Production)
[database]
url = "postgresql://user:password@localhost:5432/cyxwiz"
max_connections = 20
min_connections = 5
SQLite (Development)
[database]
url = "sqlite:cyxwiz.db?mode=rwc"
max_connections = 1

Scheduler Algorithms

AlgorithmDescription
round_robinSimple rotation through available nodes
least_loadedAssigns to node with fewest active jobs
weighted_scoreConsiders reputation, capacity, load, and requirements

Hot Reload

Some configuration can be reloaded without restart:

# Send SIGHUP to reload config
kill -HUP $(pgrep cyxwiz-central-server)

Hot-reloadable:

  • Log level
  • Rate limits
  • Feature flags

Requires restart:

  • Database URL
  • Server addresses
  • JWT secret
  • Blockchain settings