Repository navigation
Configuration Precedence
Where a configuration key gets its value, which source wins, and which command flags supply a key.
The loader reads the cascade files for the active environment, lowest precedence first, and each file that sets a key replaces the value set before it:
.env-
.env.dev,.env.staging,.env.prodor.env.<name>(exactly one, matchingENV;localreads.env.dev) .env.secrets.env.local
The process environment is the lowest source in practice: a file in the cascade replaces a value that the process environment carries, so the process environment wins only when no cascade file sets the key. A key that nothing sets falls back to its documented default. ENV is the one exception: the loader reads the process value of ENV first (then .env, then dev) to choose which cascade files to read, so nself config explain ENV prints cascade selected by: process environment (environment_source in --json) even when a file wins the final value. NSELF_LEGACY_ENV_ORDER=1 restores the previous order for one minor version (see Configuration).
nself config explain BASE_DOMAIN # by key
nself config explain <command> --<flag> # by command flag; resolves to the key the flag supplies
nself config explain BASE_DOMAIN --reveal # show values (redacted by default)
nself config explain BASE_DOMAIN --json # one envelopeFor example, the command init with the flag --domain resolves to BASE_DOMAIN.
The answer lists the env name, the default, the flags that supply the key, the MCP tool and HTTP route parameter that carry each flag, the nself.yaml row, every cascade file that sets the key and the winner. A key that is not a known configuration key, and a flag that supplies no key, exit 1 with E434. nself config env explain VAR walks the same cascade and prints the same winner.
Each flag with a configuration meaning is bound to its key once, in internal/config/bindings/flags.yaml. A flag whose upper-snake name is a known key and which is not bound is listed with a reason in exempt.yaml; a test fails for any flag that is neither. The command registry reports the bound key as env on the flag (nself help --json).
An explicit flag sets its key for that one invocation and wins over every file and the process environment. nself config explain lists the flags that supply a key but never shows one as a source or the winner, because a flag exists only on the command line of the run it is given to. Two bindings do not meet this rule yet: start --skip-health-checks=false cannot override NSELF_SKIP_HEALTH_CHECKS=true, and build --debug sets DEBUG, which no code reads.
| Command | Flag | Key | Default |
|---|---|---|---|
nself build |
--debug |
DEBUG |
none |
nself config |
--env |
ENV |
dev |
nself config secrets |
--env |
ENV |
dev |
nself config services |
--env |
ENV |
dev |
nself db seed run |
--env |
ENV |
dev |
nself init |
--domain |
BASE_DOMAIN |
local.nself.org |
nself start |
--skip-health-checks |
NSELF_SKIP_HEALTH_CHECKS |
false |
nself status health |
--env |
ENV |
dev |
nself status urls |
--env |
ENV |
dev |
| Command | Flag | Reason |
|---|---|---|
nself (every command) |
--no-monorepo |
NSELF_NO_MONOREPO is listed as a known key but no code reads it; the flag is the only control |
nself backup list |
--env |
filters backup rows by environment label; it does not select the local ENV cascade |
nself build |
--no-monorepo |
NSELF_NO_MONOREPO is listed as a known key but no code reads it; the flag is the only control |
nself db drift |
--env |
selects a deploy inventory target (NSELF_DEPLOY_HOST_ or control-plane.yaml); an existing project directory is still accepted for back-compat; not the local ENV cascade |
nself db generate |
--env |
names the target environment of the generated output (local, staging or prod), not the local ENV cascade |
nself db hasura apply-ref |
--env |
selects a deploy inventory target (NSELF_DEPLOY_HOST_ or control-plane.yaml), not the local ENV cascade |
nself db hasura metadata apply |
--env |
selects a deploy inventory target (NSELF_DEPLOY_HOST_ or control-plane.yaml), not the local ENV cascade |
nself db hasura sync |
--env |
selects a deploy inventory target (NSELF_DEPLOY_HOST_ or control-plane.yaml), not the local ENV cascade |
nself db import firebase |
--project-name |
names generated SQL files; it is not the PROJECT_NAME of the project |
nself db migrate status |
--env |
selects a deploy inventory target (NSELF_DEPLOY_HOST_ or control-plane.yaml), not the local ENV cascade |
nself db migrate up |
--env |
selects a deploy inventory target (NSELF_DEPLOY_HOST_ or control-plane.yaml), not the local ENV cascade |
nself db reconcile |
--env |
selects a deploy inventory target (NSELF_DEPLOY_HOST_ or control-plane.yaml); an existing project directory is still accepted for back-compat; not the local ENV cascade |
nself deploy |
--env |
selects the deploy inventory environment (staging, prod, qa), not the local ENV cascade |
nself deploy access grant |
--env |
selects hosts in a deploy inventory environment, not the local ENV cascade |
nself deploy access list |
--env |
selects hosts in a deploy inventory environment, not the local ENV cascade |
nself deploy access revoke |
--env |
selects hosts in a deploy inventory environment, not the local ENV cascade |
nself deploy status |
--env |
selects the deploy inventory environment to check, not the local ENV cascade |
nself exec |
--env |
repeatable KEY=VALUE pairs for the child process, not the ENV key |
nself logs |
--no-color |
boolean inverse of NO_COLOR, which is presence based and read by internal/ui and internal/output; the flag does not set it |
nself reset |
--no-monorepo |
NSELF_NO_MONOREPO is listed as a known key but no code reads it; the flag is the only control |
nself start |
--debug |
shows debug output for this run only; it does not set DEBUG (build --debug does) |
nself stop |
--no-monorepo |
NSELF_NO_MONOREPO is listed as a known key but no code reads it; the flag is the only control |
nself.yaml is not a configuration source. It carries app, bundle, bundles and plugins; it holds no configuration keys, so no key is read from it and nself config explain reports it as "not a source".
Getting Started
Commands
- Commands, Overview
- Lifecycle: cmd-init · cmd-build · cmd-start · cmd-stop · cmd-restart · cmd-dev
- Monitoring: cmd-status · cmd-logs · cmd-health · cmd-urls · cmd-doctor · cmd-monitor · cmd-alerts · cmd-sentry · cmd-watchdog
- Data: cmd-db · cmd-backup · cmd-dr · cmd-queue · cmd-webhooks
- Config: cmd-config · cmd-service · cmd-env · cmd-promote
- Networking: cmd-ssl · cmd-trust · cmd-dns-setup
- Security: cmd-access · cmd-security · cmd-secrets
- Tenancy: cmd-tenant · cmd-billing
- Plugins: cmd-plugin · cmd-license · cmd-dogfood (extracted, CLI-R11) · cmd-k8s (extracted, CLI-R11) · cmd-encryption (extracted, CLI-R11) · cmd-waf (extracted, CLI-R11) · cmd-federation (extracted, CLI-R11) · cmd-mail (extracted, CLI-R11) · cmd-dlq (extracted, CLI-R11)
- AI: cmd-ai · cmd-claw · cmd-model
- Templates: cmd-template
- Utilities: cmd-exec · cmd-clean · cmd-reset · cmd-update · cmd-upgrade · cmd-version · cmd-admin · cmd-migrate · cmd-migrate-firebase · cmd-migrate-supabase · cmd-completion
Features
- Features, Overview
- Feature-Auth
- Feature-Storage
- Feature-Search
- Feature-Functions
- Feature-Email
- Feature-Monitoring
- Feature-Plugins
- Feature-nClaw, AI Assistant
- Feature-nChat, Messaging
- Feature-nFamily, Family Social
- Feature-nCloud, Managed Hosting
- Feature-Memory-Rooms, Knowledge Organization
- Feature-Agent-Dashboard, Agent Metrics
- Feature-Image-Generation, AI Image Generation
Configuration
- Configuration, Overview
- Config-Env-Vars
- Config-Postgres
- Config-Hasura
- Config-Auth
- Config-Nginx
- Shared-Proxy
- Config-Optional-Services
- Config-Custom-Services
- Config-System
Plugins (87 + 10 monitoring)
- Plugin-Overview
- Plugin-Catalog
- Plugin-Install
- Plugin-Licensing
- Plugin-Architecture
- Plugin-Dev-Guide
- Plugin-Migrations-Contract
Free (25)
- plugin-backup
- plugin-content-acquisition
- plugin-content-progress
- plugin-cron
- plugin-donorbox
- plugin-feature-flags
- plugin-github
- plugin-github-runner
- plugin-invitations
- plugin-jobs
- plugin-link-preview
- plugin-mdns
- plugin-mlflow
- plugin-monitoring
- plugin-notifications
- plugin-notify
- plugin-paypal
- plugin-search
- plugin-shopify
- plugin-stripe
- plugin-subtitle-manager
- plugin-tokens
- plugin-torrent-manager
- plugin-vpn
- plugin-webhooks
Pro (62)
- plugin-access-controls
- plugin-activity-feed
- plugin-admin-api
- plugin-analytics
- plugin-auth
- plugin-bots
- plugin-browser
- plugin-calendar
- plugin-cdn
- plugin-chat
- plugin-claw
- plugin-claw-budget
- plugin-claw-news
- plugin-claw-web
- plugin-cloudflare
- plugin-cms
- plugin-compliance
- plugin-ddns
- plugin-devices
- plugin-documents
- plugin-entitlements
- plugin-file-processing
- plugin-game-metadata
- plugin-geocoding
- plugin-geolocation
- plugin-google
- plugin-home
- plugin-idme
- plugin-knowledge-base
- plugin-linkedin
- plugin-livekit
- plugin-media-processing
- plugin-meetings
- plugin-moderation
- plugin-mux
- plugin-object-storage
- plugin-observability
- plugin-photos
- plugin-podcast
- plugin-post
- plugin-realtime
- plugin-retro-gaming
- plugin-rom-discovery
- plugin-social
- plugin-sports
- plugin-support
- plugin-tmdb
- plugin-voice
- plugin-web3
- plugin-workflows
Planned (26)
plugin-auditplugin-blogplugin-checkoutplugin-commerceplugin-drmplugin-exportplugin-flowplugin-importplugin-ldapplugin-mailgunplugin-mediaplugin-oauth-providersplugin-pagesplugin-postmarkplugin-rate-limitplugin-reportsplugin-samlplugin-schedulerplugin-sendgridplugin-ssoplugin-subscriptionplugin-thumbplugin-transcoderplugin-twilioplugin-wafplugin-watermark
Guides
- Guide-Production-Deployment
- Guide-SSL-Setup
- Guide-Multi-Tenancy
- Guide-Security-Hardening
- Guide-Monitoring-Setup
- Guide-Backup-Restore
- Guide-Custom-Services
- Guide-Migration-from-v1
Architecture
- Architecture
- Architecture-Guardrails
- Service-Graph
- Compose-Generation
- Nginx-Generation
- Plugin-Architecture
Reference
Machine interface
-
JSON-Output,
--jsonenvelope -
Command-Registry,
nself help --json - Exit-Codes
- error-codes, Error Codes
-
Compat-V15,
NSELF_V15gate
Licensing
Security
Brand
Operations
- operations/release-cascade, Release Cascade
- operations/self-healing, Self-Healing Schema
- operations/redis-tuning, Redis Pool Tuning
- operations/meilisearch-warmup, MeiliSearch Warm-Up
- operations/jwt-rotation, JWT Key Rotation
- operations/windows-wsl2-setup, Windows / WSL2 Setup
- operations/gemini-oauth-reauth, Gemini OAuth Reauth
Contributing
Admin
- USER-ACTION-QUEUE, Pending Admin Actions
All commands (21)
- A: cmd-add · cmd-admin
- B: cmd-backup · cmd-build
- C: cmd-clean · cmd-config
- D: cmd-db · cmd-deploy · cmd-doctor
- E: cmd-exec
- I: cmd-init
- L: cmd-license · cmd-logs
- M: cmd-mcp
- R: cmd-remove · cmd-reset · cmd-restart
- S: cmd-start · cmd-status · cmd-stop
- U: cmd-update