Before you begin, make sure you have:
That's it! nself will automatically install Docker, Docker Compose, and any other required dependencies.
Run this single command to install the nself CLI:
curl -sSL https://install.nself.org | bashThe installer will:
~/.nself/binCreate a new directory for your project and initialize nself with the new streamlined workflow:
mkdir my-backend && cd my-backend
nself init # Minimal setup by default in v0.3.9This creates essential files with smart defaults. For complete setup, use nself init --full.
Open .env.local in your favorite editor and customize:
# Basic Configuration
PROJECT_NAME=my-backend
ENV=dev # or 'prod' for production
# Database
POSTGRES_PASSWORD=your-secure-password
POSTGRES_DB=myapp
# Optional Services (set to true to enable)
REDIS_ENABLED=true
FUNCTIONS_ENABLED=true
NSELF_ADMIN_ENABLED=true # v0.3.9 Admin UI
# Database Seeding
DB_ENV_SEEDS=true # Use environment-specific seed directoriesFor development, the default values work great. For production, see our Production Deployment Guide.
Enable the new web-based Admin UI for enhanced management:
nself admin enable
nself admin password mypasswordGenerate your Docker configuration and start all services:
nself build
nself startYour backend is now running with 35+ CLI commands and comprehensive management tools! 🎉
Web-based admin interface at localhost:3100, simplified initialization with minimal setup by default, enhanced reset system with timestamped backups, and 25+ service templates.
For the best development experience, enable SSL certificate trust to eliminate browser security warnings:
nself trustThis command installs trusted SSL certificates for both *.localhost and *.local.nself.org domains, giving you green lock security in all browsers.
After running nself trust, you can access your services with HTTPS (recommended):
https://admin.localhosthttps://hasura.localhost/consolehttps://dashboard.localhosthttps://storage.localhosthttps://mailpit.localhosthttp://localhost:3100http://localhost:8080/consolehttp://localhost:3030http://localhost:9001localhost:5432nself now supports both *.localhost and *.local.nself.org domains with automatic SSL:
nself trustnself v0.3.9 includes powerful database management with interactive menu system:
# Interactive database menu (v0.3.9)
nself db
# Quick database operations
nself db status
nself db run
nself db seed
nself backup createEnable additional services in your .env.local:
# NestJS microservices
NESTJS_SERVICES=api,webhooks
# Python services
PYTHON_SERVICES=ml-processor
# Go services
GOLANG_SERVICES=data-fetcher
# BullMQ workers
BULLMQ_WORKERS=email-worker,notification-workerThen rebuild and restart:
nself build && nself restartWhen ready for production:
# Generate production configuration
nself prod
# Review and customize .env.prod-template
# Copy to .env before deployment
# Deploy to your server# Service Management (v0.3.9)
nself start # Start all services (primary command)
nself stop # Stop all services (primary command)
nself restart # Restart all services
nself status # Check service status
nself logs # View logs
# Admin UI Management (v0.3.9)
nself admin enable # Enable admin UI
nself admin open # Open admin UI in browser
nself admin password # Set admin password
nself admin status # Check admin status
# Database Management (Interactive Menu)
nself db # Interactive database operations menu
nself db run # Generate migrations from schema.dbml
nself db seed # Seed database
nself backup create # Create backup
# Configuration
nself build # Rebuild configuration
nself reset # Reset with timestamped backups
nself update # Update nself CLIdocker psnself logsnetstat -tulpn | grep LISTENdocker ps | grep postgres.env.localnself reset (⚠️ deletes all data)nself statusReady to dive deeper? Check out our Architecture Overview to understand how everything works together.