Core Variables
| Variable | Default | Description |
|---|
NEXUSDB_PORT | 4200 | Server port |
NEXUSDB_HOST | 0.0.0.0 | Bind address |
NEXUSDB_DATA_DIR | ./data | Data storage path |
NEXUSDB_LOG_LEVEL | info | Log verbosity: debug, info, warn, error |
NEXUSDB_ENV | development | Environment: development, staging, production |
Security
| Variable | Default | Description |
|---|
NEXUSDB_SECRET | — | JWT signing secret (required in production) |
NEXUSDB_API_KEY_SALT | — | Salt for API key hashing |
NEXUSDB_CORS_ORIGINS | * | Comma-separated allowed origins |
NEXUSDB_RATE_LIMIT | 1000 | Requests per minute per IP |
NEXUSDB_TLS_CERT | — | Path to TLS certificate |
NEXUSDB_TLS_KEY | — | Path to TLS private key |
Storage Engine
| Variable | Default | Description |
|---|
NEXUSDB_ENGINE | rocksdb | Storage engine: rocksdb, sqlite, memory |
NEXUSDB_MEMORY_LIMIT | 1024 | Max memory in MB |
NEXUSDB_WAL_ENABLED | true | Write-ahead log |
NEXUSDB_COMPRESSION | lz4 | Compression: none, lz4, zstd, snappy |
Example .env File
# .env
NEXUSDB_PORT=4200
NEXUSDB_ENV=production
NEXUSDB_SECRET=your-secret-key-min-32-chars-here
NEXUSDB_DATA_DIR=/var/lib/nexusdb/data
NEXUSDB_LOG_LEVEL=warn
NEXUSDB_CORS_ORIGINS=https://app.example.com,https://admin.example.com
NEXUSDB_RATE_LIMIT=500
NEXUSDB_ENGINE=rocksdb
NEXUSDB_MEMORY_LIMIT=4096
NEXUSDB_COMPRESSION=zstd
Docker Compose
services:
nexusdb:
image: nexusdb/server:3.2
ports:
- "4200:4200"
environment:
NEXUSDB_ENV: production
NEXUSDB_SECRET: ${NEXUSDB_SECRET}
NEXUSDB_DATA_DIR: /data
NEXUSDB_MEMORY_LIMIT: 4096
volumes:
- nexusdb-data:/data
volumes:
nexusdb-data: