nSelf uses environment switching and the promote command to move between environments. There is no separate nself staging or nself prod top-level command — these were documented in error in earlier versions of these docs.
Source of truth: SPORT F02-COMMAND-INVENTORY.md.
nself staging · ɳSelf prod · nself deploy staging · nself deploy prodThese do not exist in the codebase. Use nself env use <env> + nself build + nself start, or nself promote <source> <target> for environment promotion.
The standard nSelf deployment pattern is:
# 1. Switch to target environment
nself env use staging
# 2. Rebuild configs for that environment
nself build
# 3. Start / restart services
nself start
# Verify health
nself status
nself doctorPromote one environment to another. This copies config forward and optionally runs a database migration.
nself promote staging prod # Promote staging to prod
nself promote local staging # Promote local to staging
nself promote prod staging rollback # Roll back a promotionFull documentation: Environment Commands
nself env use staging # Switch active environment
nself env diff staging prod # Compare environments before deployingBefore going to production, run the security hardening suite. All security checks are free (Security-Always-Free doctrine).
nself security setup # Apply hardening
nself security audit # Full security audit
nself security scan # Baseline scan (runs free, no license)
nself doctor --deep # Full diagnosticsnself ssl setup # Set up Let's Encrypt for your domain
nself ssl status # Check certificate status and expiry
nself ssl renew # Renew all certificates
nself ssl add example.com # Add a custom domain