-
Notifications
You must be signed in to change notification settings - Fork 1
WIZARD_GUIDE
The nself-admin Setup Wizard is a 6-step guided process that helps you configure your nself backend project. This guide provides detailed information about each step, configuration options, and best practices.
- Wizard Overview
- Step 1: Basic Settings
- Step 2: Core Services
- Step 3: Optional Services
- Step 4: Custom Services
- Step 5: Frontend Applications
- Step 6: Review & Build
- Auto-Save Feature
- Environment File Management
- Common Configurations
- Troubleshooting
- 6-step guided setup with progress tracking
- Auto-save to environment files
- Validation of inputs and configurations
- Smart defaults based on environment
- Backwards navigation to modify previous steps
- Real-time preview of configuration
- Use Next to proceed to the next step
- Use Back to return to previous steps
- Click on completed step indicators to jump directly
- Changes are automatically saved as you type
The wizard writes configuration to environment-specific files:
- Development:
.env.dev - Staging:
.env.staging - Production:
.env.prod
Configure fundamental project settings and metadata.
- Format: Lowercase alphanumeric with dashes
-
Example:
my-awesome-app - Validation: Must be provided, no spaces allowed
- Used for: Docker container names, service identification
- Format: Free text
-
Example:
Multi-tenant SaaS platform for task management - Used for: Documentation and admin UI display
- Options:
-
development(dev) - Local development -
staging- Testing environment -
production(prod) - Live environment -
Default:
development -
Impact: Determines which
.env.*file to write to
- Format: Valid domain name
-
Default:
localhost(dev) orlocal.nself.org - Examples:
- Development:
localhost,myapp.local - Production:
myapp.com,api.example.com - Validation:
- Dev mode: Allows subdomains like
api.test - Production: Must be valid FQDN
- Format: Lowercase alphanumeric with underscores
-
Default:
nself -
Example:
myapp_db - Used for: PostgreSQL database name
-
Default:
nself-dev-password(dev only) - Requirements:
- Development: Minimum 3 characters
- Production: Minimum 12 characters, mixed case, numbers, special chars
- Security: Never commit production passwords to git
- Format: Valid email address
-
Example:
admin@mycompany.com - Used for: System notifications, initial admin account
Configure database backup settings with visual schedule builder.
- Toggle to enable automated backups
- When disabled, no backup configuration is saved
Quick Presets:
- Daily at 2 AM
- Every 6 hours
- Weekly (Sunday)
- Custom (opens advanced settings)
Advanced Settings:
- Visual cron builder with dropdowns
- Minute, Hour, Day, Month, Weekday selection
- Live preview of cron expression
- Next run time calculation
- Range: 1-365 days
- Default: 7 days
- Recommendation: 30 days for production
- Compression: Reduce backup size (recommended)
- Encryption: Secure backups with encryption
- Project Name: Use consistent naming across environments
- Passwords: Use strong, unique passwords for each environment
-
Domain: Use
.localor.testTLDs for development - Backups: Always enable for production, consider for staging
View and configure the required services that form the foundation of your nself stack.
- Description: Primary database for all services
- Port: 5432
- Configuration Options:
- Version (default: 16-alpine)
- Extensions (uuid-ossp, pgcrypto, etc.)
- Connection pool settings
- Performance tuning
- Description: Instant GraphQL API for your database
- Port: 8080 (API), 3000 (Console)
- Configuration Options:
- Admin secret (min 32 chars)
- JWT configuration
- CORS settings
- Dev mode toggle
- Console access
- Description: User authentication and authorization
- Port: 4000
- Configuration Options:
- Token expiration times
- Email verification
- Social auth providers
- WebAuthn support
- Description: Reverse proxy and load balancer
- Ports: 80 (HTTP), 443 (HTTPS)
- Configuration Options:
- SSL certificates
- Rate limiting
- Gzip compression
- Client max body size
Click "Configure" on any service to open advanced settings:
- Service-specific environment variables
- Performance tuning options
- Security configurations
- Integration settings
These services are always enabled and cannot be disabled as they form the core of the nself stack.
Enable additional services to enhance your stack's capabilities.
- Description: S3-compatible object storage
- Default: Enabled (recommended)
- Ports: 9000 (API), 9001 (Console)
- Use Cases: File uploads, static assets, backups
- Configuration:
- Root credentials
- Default bucket name
- Region settings
- Description: In-memory data store for caching
- Default: Disabled
- Port: 6379
- Use Cases: Session storage, caching, pub/sub
- Configuration:
- Password protection
- Persistence settings
- Memory limits
- Description: Web-based administration interface
- Default: Disabled
- Port: 3100
- Use Cases: Project management, monitoring, configuration
- Note: Automatically enabled when using the wizard
- Description: Email capture for development
- Default: Disabled (enabled for dev)
- Ports: 1025 (SMTP), 8025 (Web UI)
- Use Cases: Email testing, debugging
- Production: Switches to real email provider
- Description: Full-text search with 6 engine options
- Default: Disabled
- Options:
- Meilisearch (recommended) - Fast, typo-tolerant
- Typesense - High performance alternative
- Zinc - Lightweight Elasticsearch alternative
- Elasticsearch - Industry standard
- OpenSearch - AWS fork of Elasticsearch
- Sonic - Ultra-lightweight
- Description: Complete observability stack
- Default: Disabled
- Includes:
- Prometheus - Metrics collection
- Grafana - Visualization dashboards
- Loki - Log aggregation
- Tempo - Distributed tracing
- cAdvisor - Container metrics
- Note: Enabling this sets all monitoring services
Use the subtle "Enable All" / "Disable All" button in the top-right to quickly toggle all optional services.
Each service card shows:
- Service name and icon
- Brief description
- Detailed explanation on hover/focus
- Enable/disable toggle
- Configure button (if applicable)
Add your own backend services that run as part of the Docker stack.
- Format: Lowercase alphanumeric with dashes
-
Example:
api-gateway,worker-service - Used for: Container naming, logging
- Dropdown Options:
- Node.js:
express,fastify,nestjs,hono - Python:
fastapi,django,flask - Go:
gin,fiber,echo - Ruby:
rails,sinatra - Java:
spring,quarkus - PHP:
laravel,symfony - Rust:
actix,rocket - Other:
custom - Impact: Determines Docker image and setup
- Range: 3000-9999
- Default: 4000, 4001, 4002 (auto-increments)
- Validation: Must be unique across all services
- Reserved Ports: See Port Allocation
- Format: Lowercase alphanumeric with dashes
-
Example:
api,webhooks,admin-api - Result:
- Dev:
api.localhost - Prod:
api.yourdomain.com
Available after service creation:
-
Memory Limit:
256M,512M,1G, etc. -
CPU Limit:
0.25,0.5,1.0, etc. - Replicas: Number of instances
- Health Check: Endpoint for health monitoring
- Table Prefix: Database table namespace
- Public Access: Expose to internet
- Rate Limiting: Request limits
- Add Service: Click "Add Custom Service" button
- Remove Service: Click trash icon on service card
- Reorder: Services are numbered CS_1, CS_2, etc.
- Auto-save: Configuration saves as you type
1. API Gateway
- Framework: Express
- Port: 4000
- Route: api
2. Background Worker
- Framework: Python
- Port: 4001
- No route (internal only)
3. WebSocket Server
- Framework: Socket.io
- Port: 4002
- Route: ws
Configure external frontend applications that will consume your backend services.
- Format: Free text
-
Example:
Admin Dashboard -
Default:
App 1,App 2, etc. - Used for: UI display, documentation
- Format: Lowercase, underscores, no spaces
-
Example:
admin_dashboard - Auto-generated: From display name
- Used for: Internal references, configurations
- Format: Lowercase, underscores, ends with underscore
-
Example:
admin_,customer_ - Used for: Database table namespacing
- Purpose: Enables multi-tenant schemas
- Format: Number 3000-9999
-
Example:
3001,3002 - Auto-increment: Starts at 3001
- Critical: Required for nginx routing
- Validation: Must be unique
- Format: Subdomain or full domain
- Examples:
- Dev:
admin→admin.localhost - Prod:
admin.myapp.com - Used for: Nginx routing configuration
- Format: Valid URL
-
Example:
http://localhost:4001/graphql - Used for: Hasura remote schema integration
- Auto-generates: Schema name from table prefix
Frontend apps must use unique ports. Reserved ranges:
- 3000: Reserved for Hasura Console
- 3001-3099: Frontend applications
- 3100: nself-admin
- 4000-4999: Custom services
- 5432: PostgreSQL
- 6379: Redis
- 8080: Hasura API
- 9000-9001: MinIO
Using table prefixes enables multi-tenant database schemas:
Admin App (prefix: admin_)
├── admin_users
├── admin_settings
└── admin_logs
Customer App (prefix: customer_)
├── customer_accounts
├── customer_orders
└── customer_profiles
Frontend apps can expose GraphQL schemas to Hasura:
- Provide GraphQL endpoint in the app configuration
- Schema name auto-generates from table prefix
- Hasura adds as remote schema
- Result: Unified GraphQL API
App 1: Admin Dashboard
- System Name: admin_dashboard
- Table Prefix: admin_
- Port: 3001
- Route: admin
- GraphQL: http://localhost:4001/graphql
App 2: Customer Portal
- System Name: customer_portal
- Table Prefix: customer_
- Port: 3002
- Route: portal
- GraphQL: http://localhost:4002/graphql
Review your complete configuration and initiate the build process.
The review page displays:
- Project name and description
- Environment setting
- Domain configuration
- Database configuration
- Core Services (always enabled):
- PostgreSQL Database
- Hasura GraphQL
- Authentication Service
- Nginx Proxy
- Optional Services (if enabled):
- Storage (MinIO)
- Redis Cache
- nself Admin UI
- Email Service
- Search Engine
- Monitoring Stack
- Number of custom services configured
- Service details (name, framework, port, route)
- Number of frontend apps configured
- App details (name, port, route)
- Combined count of all services to be built
- Visual indicator of stack complexity
- Return to previous step to make changes
- All configurations are preserved
- Color: Green (indicates readiness)
- Icon: Hammer icon
-
Action: Redirects to
/build?from=wizard - Process:
- Saves final configuration
- Navigates to build page
- Initiates
nself buildcommand - Shows real-time build progress
After clicking "Build Project":
- Configuration Validation
- Checks all required fields
- Validates port uniqueness
- Ensures secret strength
- File Generation
- Creates docker-compose.yml
- Generates nginx configuration
- Sets up service configs
- Container Building
- Pulls required images
- Builds custom services
- Sets up networks
- Completion
- Shows success message
- Provides next steps
- Option to start services
The wizard automatically saves your configuration as you type.
- Debounced Saving: Waits 1 second after you stop typing
- Field Detection: Saves only changed fields
- Visual Feedback: "Auto-saving..." indicator
-
Environment Aware: Saves to correct
.env.*file
Based on your environment selection:
-
Development:
.env.dev -
Staging:
.env.staging -
Production:
.env.prod
- Never lose work: Changes persist immediately
- Resume anytime: Close and reopen without data loss
-
Team sharing:
.env.devcan be committed to git - Quick iteration: Make changes without manual saves
- All form inputs
- Service enable/disable states
- Advanced configurations
- Custom service definitions
- Frontend app settings
Understanding how the wizard manages environment files.
project/
├── .env.dev # Team defaults (commit to git)
├── .env.staging # Staging config (commit to git)
├── .env.prod # Production config (commit to git)
├── .env.secrets # Production secrets (never commit)
└── .env # Local overrides (never commit)
Files load in priority order (later overrides earlier):
.env.dev-
.env.staging(if ENV=staging) -
.env.prod(if ENV=prod) -
.env.secrets(if ENV=prod) -
.env(highest priority)
-
.env.dev- Team development defaults -
.env.staging- Staging configuration -
.env.prod- Production config (no secrets)
-
.env- Personal overrides -
.env.secrets- Production secrets - Any file with passwords/keys
The wizard follows nself's official naming conventions:
- Service flags:
*_ENABLED - Frontend apps:
FRONTEND_APP_N_* - Custom services:
CS_N - Backup:
BACKUP_*(not DBBACKUP*)
# Step 1: Basic Settings
PROJECT_NAME=my-app
ENV=dev
BASE_DOMAIN=localhost
# Step 3: Optional Services
REDIS_ENABLED=true
MAILPIT_ENABLED=true
# Result: Basic stack with caching and email# All optional services enabled
STORAGE_ENABLED=true
REDIS_ENABLED=true
NSELF_ADMIN_ENABLED=true
MAILPIT_ENABLED=true
SEARCH_ENABLED=true
MONITORING_ENABLED=true
# Custom API service
CS_1=api:express:4000:api
# Frontend apps
FRONTEND_APP_1_PORT=3001
FRONTEND_APP_1_ROUTE=appENV=prod
BASE_DOMAIN=myapp.com
# Strong secrets (64+ chars)
HASURA_GRAPHQL_ADMIN_SECRET=<strong-secret>
HASURA_JWT_KEY=<strong-secret>
# Disable dev features
HASURA_GRAPHQL_ENABLE_CONSOLE=false
HASURA_GRAPHQL_DEV_MODE=false
# Production email
EMAIL_PROVIDER=sendgrid
# Enable backups
BACKUP_ENABLED=true
BACKUP_ENCRYPTION=true# Multiple frontend apps with table isolation
FRONTEND_APP_1_DISPLAY_NAME=Admin Portal
FRONTEND_APP_1_TABLE_PREFIX=admin_
FRONTEND_APP_1_PORT=3001
FRONTEND_APP_2_DISPLAY_NAME=Customer App
FRONTEND_APP_2_TABLE_PREFIX=customer_
FRONTEND_APP_2_PORT=3002
FRONTEND_APP_3_DISPLAY_NAME=Partner Portal
FRONTEND_APP_3_TABLE_PREFIX=partner_
FRONTEND_APP_3_PORT=3003- Cause: Network issue or server error
- Fix: Refresh page, changes are likely saved
- Check: Look for errors in browser console
- Cause: Port conflict with running service
- Fix: Choose different port or stop conflicting service
-
Check:
lsof -i :PORTto find process
- Cause: Invalid format for environment
- Fix:
- Dev: Use
localhostor.localdomains - Prod: Use valid FQDN
- Cause: Missing required configuration
- Fix: Review Step 6 for missing items
- Check: Ensure all secrets meet length requirements
- Cause: Configuration or dependency issues
- Fix:
- Check docker logs:
docker-compose logs [service] - Verify environment variables
- Ensure ports are available
To start fresh:
- Click "Reset Configuration" on any step
- Confirm the reset action
- Wizard runs:
nself reset --forcenself init --full
- Returns to Step 1
If the wizard isn't working:
- Edit
.env.devdirectly - Run
nself buildmanually - Check logs for errors
-
Documentation: Check
/docsfolder - Logs: Review docker and service logs
- Support: File issue on GitHub
- Community: join the community at chat.nself.org/Slack
Create reusable service templates:
- Define service in
CS_Nformat - Add memory/CPU limits
- Configure health checks
- Set up table prefixes
Connect multiple GraphQL services:
- Each frontend app exposes GraphQL
- Hasura adds as remote schema
- Single unified API endpoint
- Cross-service queries enabled
Managing multiple environments:
-
Local:
.env.devfor development -
CI/CD:
.env.stagingfor testing -
Production:
.env.prod+.env.secrets -
Overrides:
.envfor personal settings
Optimize your stack:
- Redis: Enable for caching
- Monitoring: Track metrics
- Replicas: Scale services horizontally
- Resources: Set appropriate limits
After completing the wizard:
- Build Project: Click "Build Project" on Step 6
-
Start Services: Navigate to
/startafter build - Access Services:
- Hasura Console:
http://localhost:3000 - nself Admin:
http://localhost:3100 - Your Apps: Configured ports
- Development: Start coding your applications
- Monitoring: Check service health and logs
Last Updated: 2025-01-05 Wizard Version: 1.0.0
Version: 1.0.0 | Updated: 2026-09-16 11:21 UTC | GitHub