Configuration Reference
Complete reference for environment variables, internal configuration, data directory layout, and tier behavior.
Environment Variables
These variables are set in your .env file and read by Docker Compose.
| Variable | Default | Tiers | Description |
|---|---|---|---|
SOPHON_DATA | required | All | Absolute path to host data directory. No ~ expansion — use full path. Forward slashes on Windows. |
DOCKER_GID | 999 | All (Linux) | Docker socket group ID. Find with getent group docker | cut -d: -f3 |
GATEWAY_PORT | 8081 | All | Host port for the Gateway API |
DASHBOARD_PORT | 8080 | All | Host port for the Dashboard UI |
POSTGRES_USER | sophon | Pro, Enterprise | PostgreSQL username |
POSTGRES_PASSWORD | sophon | Pro, Enterprise | PostgreSQL password — change in production |
POSTGRES_PORT | 5432 | Pro, Enterprise | Host port for PostgreSQL |
QDRANT_HTTP_PORT | 6333 | Pro, Enterprise | Host port for Qdrant HTTP API |
QDRANT_GRPC_PORT | 6334 | Pro, Enterprise | Host port for Qdrant gRPC |
REDIS_PORT | 6379 | Enterprise | Host port for Redis |
REDIS_PASSWORD | sophon | Enterprise | Redis password — change in production |
RABBITMQ_USER | sophon | Enterprise | RabbitMQ username |
RABBITMQ_PASSWORD | sophon | Enterprise | RabbitMQ password — change in production |
RABBITMQ_PORT | 5672 | Enterprise | Host port for RabbitMQ AMQP |
RABBITMQ_MGMT_PORT | 15672 | Enterprise | Host port for RabbitMQ management UI |
VAULT_PROVIDER | local | Enterprise | Credential vault backend (local, hashicorp, aws, azure) |
VAULT_ADDRESS | http://vault:8200 | Enterprise | HashiCorp Vault address |
VAULT_TOKEN | (empty) | Enterprise | HashiCorp Vault token |
JWT_SECRET | (empty) | Enterprise | JWT signing secret for multi-user auth |
SSO_ENABLED | false | Enterprise | Enable SSO/OIDC authentication |
Internal Environment Variables
These are set inside the compose files and should not be changed in .env. They configure the gateway container's internal behavior.
| Variable | Value | Description |
|---|---|---|
SOPHON__Tier | Personal / Pro / Enterprise | Feature tier — controls which features are enabled |
SOPHON__Database | sqlite / postgresql | Database backend. Personal uses SQLite; Pro/Enterprise use PostgreSQL. |
SOPHON__DataDirectory | /home/sophon/.sophon | Container-internal path where the data volume is mounted |
SOPHON__Sandbox__HostWorkspacesPath | ${SOPHON_DATA}/sandbox/workspaces | Host path for sandbox bind mounts (must be accessible from the Docker daemon) |
ConnectionStrings__PostgreSQL | Host=postgres;... | PostgreSQL connection string (Pro/Enterprise) |
Qdrant__Endpoint | http://qdrant:6334 | Qdrant gRPC endpoint (Pro/Enterprise) |
Sophon__Redis__ConnectionString | redis:6379,... | Redis connection with password (Enterprise) |
Sophon__MessageBus__Provider | rabbitmq | Message bus backend (Enterprise) |
SOPHON_GATEWAY_URL | http://sophon-gateway:8080 | Internal URL the Dashboard uses to reach the Gateway |
Application Settings
These keys are set in config/appsettings.user.json inside the data directory. Each can also be set as an environment variable by replacing : with __ (e.g. SOPHON__Plugins__Enabled=true).
| Key | Default | Description |
|---|---|---|
Sophon:Plugins:Enabled | false | Master switch for the out-of-process plugin host. Plugins run as full-trust local processes — leave disabled unless you install plugins from sources you trust. |
Sophon:Plugins:Allow | (empty) | Optional allowlist of plugin names. Empty means every discovered plugin may load (when plugins are enabled); when set, only listed plugins start. |
Sophon:Memory:RetentionDays | 30 | Daily logs older than this are deleted by the consolidation job's retention sweep. |
Sophon:Memory:Consolidation:Enabled | true | Enable the scheduled job that promotes durable daily-log facts into long-term memory entries. |
Sophon:Memory:Consolidation:Schedule | 0 0 3 * * ? | Quartz 6-field cron expression for the consolidation job. Default: daily at 03:00 UTC. |
Sophon:Memory:Consolidation:LookbackDays | 2 | How many days of recent daily logs each run considers, per owner. |
Sophon:Memory:Consolidation:MinLogsToConsolidate | 5 | Owners with fewer logs than this in the lookback window are skipped for the run. |
Sophon:Memory:Consolidation:MaxFactsPerRun | 20 | Upper bound on how many facts a single run promotes for one owner. |
Sophon:AgentExecution:PlanApproval | Always | Host-wide default for plan approval on interactive sessions (Always, ElevatedRisk, Never). Live-reloaded — no restart needed. Also editable at Settings → Security → Approvals. |
Voice
Host-wide tunables for the speech engine, under Sophon:Voice. These are operator settings: everything a user controls (language, speech speed, input and output mode, conversation mode, endpointing, max utterance) is a per-user preference in Voice Center, not a config key. See Voice Settings.
| Key | Default | Description |
|---|---|---|
Sophon:Voice:SpeakProgressUpdates | true | Master switch for the short spoken progress line during long, multi-step work. Set false to keep long tool runs silent. |
Sophon:Voice:NarrationGapSeconds | 12 | Seconds of silence — no new assistant text — before a progress line becomes eligible. |
Sophon:Voice:NarrationIntervalSeconds | 20 | Minimum spacing between two spoken progress lines. |
Sophon:Voice:MaxSpokenSentenceChars | 280 | Sentences longer than this are split at clause boundaries before synthesis, so speech starts sooner. |
Sophon:Voice:NodeWake:Enabled | false | Master switch for the node-token voice routes (/api/nodes/me/voice/runtime, /state, /wake). All three return 404 until this is true — no shipped client calls them. |
Sophon:Voice:NodeWake:MaxTranscriptChars | 2000 | A longer wake transcript is rejected before it can become a prompt. Applies to /wake only. |
Sophon:Voice:NodeWake:EventsPerMinute | 6 | Wake events allowed per node per minute, and the burst size. Read at startup only — changing it needs a Gateway restart. |
Sophon:Voice:HealthMonitor:Enabled | true | Background health sweep over every configured speech provider. |
Sophon:Voice:HealthMonitor:IntervalMinutes | 15 | How often the sweep runs. A provider is marked failing after two consecutive failed sweeps and recovers on one success, so an outage can take roughly half an hour to surface on the Voice page. Status is held in memory and resets to active on restart. |
Sophon:Voice:BargeInMinWords exists in the configuration shape but is reserved — nothing reads it. There is no automatic speech-triggered barge-in in this release; interrupting is a mic press. See Voice Limits.
Sophon:Voice:NodeWake:Enabled is the one voice key with real security surface: the /wake route runs a full agent turn as the node's owner, from a transcript the node supplies. Turning it on also needs the node's voice.runtime scope, which isn't granted by default. Read Sophon Node permissions first.
Data Directory Layout
All Sophon runtime state lives in SOPHON_DATA on the host (mounted at /home/sophon/.sophon inside the container):
~/.sophon/
├── config/
│ ├── appsettings.user.json # User-level configuration overrides
│ ├── models.json # LLM provider configs (API keys encrypted)
│ ├── channels.json # Channel connections (encrypted)
│ ├── tts.json # Text-to-speech provider list (non-secret)
│ └── stt.json # Speech-to-text providers + host listening defaults
├── agents/
│ └── default/
│ ├── SOUL.md # Agent personality
│ ├── BOOT.md # First-run init script
│ ├── HEARTBEAT.md # Heartbeat checklist
│ └── TOOLS.md # Available tools config
├── skills/
│ ├── bundled/ # Ships with Sophon (read-only)
│ ├── installed/ # From Marketplace
│ └── self-authored/ # Created by the agent
├── memory/
│ ├── daily/ # Short-term daily logs
│ ├── MEMORY.md # Long-term curated facts
│ └── entities/ # Structured entity store
├── documents/
│ ├── uploads/ # User-uploaded files
│ ├── processed/ # Extracted text and embeddings
│ └── index/ # Search index (FTS + vector)
├── cron/
│ └── jobs.json # Scheduled jobs
├── workflows/
│ └── *.json # Workflow definitions
├── sandbox/
│ └── workspaces/ # Ephemeral code execution (auto-cleaned)
├── security/
│ └── vault.key # AES-256 encryption key — CRITICAL, back up!
├── logs/
│ └── sophon-YYYYMMDD.log # Application logs (rotated daily)
└── data/
├── sophon.db # SQLite database (Personal tier only)
└── cache/ # Local cache (thumbnails, embeddings)The security/vault.key file is the AES-256 encryption key used to encrypt credentials at rest. Without this file, encrypted credentials cannot be decrypted. Always include it in backups.
tts.json and stt.json hold non-secret configuration only — the provider id, display name, provider type, endpoint or region, voice id, priority and last health status. Provider API keys live in the credential vault; each entry stores a credential id, not a key. stt.json also carries the host-wide listening defaults that a user's personal overrides fall back to.
Tier Behavior
| Feature | Personal | Pro | Enterprise |
|---|---|---|---|
| Database | SQLite (embedded) | PostgreSQL 17 | PostgreSQL 17 |
| Authentication | Auto-admin (single user) | JWT multi-user | JWT + SSO/OIDC |
| Credential Encryption | AES-256 (vault.key) | AES-256 (vault.key) | External vault (HashiCorp/AWS/Azure) |
| Vector Store | (none) | Qdrant | Qdrant |
| Cache | In-memory | In-memory | Redis 7 |
| Message Bus | In-process | In-process | RabbitMQ 4.0 |
| Multi-Tenancy | (none) | (none) | Full tenant isolation |
| Audit Logging | (none) | (none) | Full audit trail |
| RBAC | (none) | Basic roles | Full RBAC + custom roles |
| Horizontal Scaling | Single instance | Single instance | Multiple replicas (K8s) |
Changing tiers is a configuration change — the same binary, different feature flags. Set SOPHON__Tier in your compose file to switch.
First-Run Behavior
On first startup, Sophon:
- Creates the data directory if
SOPHON_DATAdoesn't exist on the host - Seeds the default agent — creates
agents/default/SOUL.mdwith a starter personality - Runs database migrations — creates the SQLite database (Personal) or migrates PostgreSQL (Pro/Enterprise)
- Generates
vault.key— creates the encryption key for credential storage - Enters Setup Mode — the Dashboard shows the Setup Wizard to configure your first LLM provider
No manual migration step is ever needed. EF Core migrations run automatically on startup.