Configuration Overview

Orbis configuration options

Configuration Overview

Orbis can be configured through environment variables and configuration files.

Configuration Files

orbis.toml

Main configuration file (optional):

toml
[server]
host = "0.0.0.0"
port = 8080

[database]
url = "sqlite://./data/orbis.db"

[auth]
jwt_secret = "your-secret-key"
session_duration = "24h"

[plugins]
directory = "./plugins"
hot_reload = true

Environment Variables

Environment variables override file configuration:

VariableDescriptionDefault
ORBIS_MODEstandalone or client-serverstandalone
ORBIS_HOSTServer bind address127.0.0.1
ORBIS_PORTServer port8080
ORBIS_DATABASE_URLDatabase connection URLSQLite default
ORBIS_JWT_SECRETJWT signing secretGenerated
ORBIS_PLUGINS_DIRPlugins directory./plugins
ORBIS_LOG_LEVELLogging levelinfo
RUST_LOGRust logging filterorbis=info

Configuration Sections

Server Configuration

Server and networking options:

  • Host and port binding
  • TLS/SSL configuration
  • CORS settings
  • Rate limiting

Database Configuration

Database connection and management:

  • Connection URLs
  • Pool settings
  • Migration options
  • SQLite vs PostgreSQL

Authentication

Authentication and security:

  • JWT configuration
  • Session management
  • Password policies
  • User management

TLS Security

HTTPS and encryption:

  • Certificate configuration
  • Key management
  • Security headers

Mode Configuration

Standalone Mode

Local desktop application with embedded database:

bash
ORBIS_MODE=standalone
ORBIS_DATABASE_URL=sqlite://./data/orbis.db

Client-Server Mode

Multi-user deployment with remote database:

bash
ORBIS_MODE=client-server
ORBIS_DATABASE_URL=postgres://user:pass@host:5432/orbis
ORBIS_HOST=0.0.0.0
ORBIS_PORT=8080

Plugin Configuration

Plugin Directory

bash
ORBIS_PLUGINS_DIR=/path/to/plugins

Hot Reload

Enable plugin hot reloading (development):

toml
[plugins]
hot_reload = true
watch_interval = 1000  # milliseconds

Logging Configuration

Log Levels

LevelDescription
errorErrors only
warnWarnings and errors
infoGeneral information
debugDebug messages
traceDetailed tracing

Rust Log Filter

bash
RUST_LOG=orbis=debug,orbis_server=trace

Development vs Production

Development

bash
ORBIS_MODE=standalone
ORBIS_LOG_LEVEL=debug
RUST_LOG=orbis=debug

Enable:

  • Hot reload
  • Verbose logging
  • Development server

Production

bash
ORBIS_MODE=client-server
ORBIS_LOG_LEVEL=warn
ORBIS_DATABASE_RUN_MIGRATIONS=false

Enable:

  • TLS/HTTPS
  • Secure headers
  • Rate limiting
  • Minimal logging

Configuration Priority

  1. Environment variables (highest)
  2. Configuration file (orbis.toml)
  3. Default values (lowest)

Quick Reference

Minimal Standalone

bash
# No configuration needed - uses defaults
cargo run --release

Minimal Server

bash
ORBIS_MODE=client-server \
ORBIS_DATABASE_URL=postgres://localhost/orbis \
ORBIS_JWT_SECRET=your-secure-secret \
cargo run --release

Docker

yaml
environment:
  - ORBIS_MODE=client-server
  - ORBIS_DATABASE_URL=postgres://db:5432/orbis
  - ORBIS_JWT_SECRET=${JWT_SECRET}
  - ORBIS_HOST=0.0.0.0
  - ORBIS_PORT=8080

See Also