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 -fsSL https://raw.githubusercontent.com/acamarata/nself/main/install.sh | bash
The installer will:
~/.nself/bin
Create a new directory for your project and initialize nself:
mkdir my-backend && cd my-backend
nself init
This creates a .env.local
file with default configuration values.
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
NHOST_DASHBOARD_ENABLED=true
# Database Seeding (v0.2.1+)
DB_ENV_SEEDS=true # Use environment-specific seed directories
For development, the default values work great. For production, see our Production Deployment Guide.
Generate your Docker configuration and start all services:
nself build
nself start # or 'nself up' (both work the same)
Your backend is now running with 100% service reliability! 🎉
All 17 services now start successfully every time with smart port allocation (3000-3099 for frontends, 3100+ for system services) and complete HTTPS support.
For the best development experience, enable SSL certificate trust to eliminate browser security warnings:
nself trust
This 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://hasura.localhost/console
https://dashboard.localhost
https://storage.localhost
https://mailpit.localhost
https://adminer.localhost
http://localhost:8080/console
http://localhost:3030
http://localhost:9001
http://localhost:3101
localhost:5432
nself now supports both *.localhost
and *.local.nself.org
domains with automatic SSL:
nself trust
nself v0.2.2 includes powerful database management with environment-aware seeding:
# Check database status
nself db status
# Create and run migrations
nself db run
# Seed your database
nself db seed
# Create a backup
nself db backup
Enable 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-worker
Then rebuild and restart:
nself build && nself restart
When 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
nself up # Start all services (100% reliability in v0.3.5)
nself down # Stop all services
nself restart # Restart all services
nself status # Check service status
nself logs # View logs
# SSL Management (v0.3.5)
nself trust # Install SSL certificates and enable browser trust
nself trust status # Check trust status
nself ssl bootstrap # Bootstrap SSL certificates
nself ssl status # Check SSL certificate status
nself ssl renew # Renew SSL certificates
# Database Management
nself db run # Generate migrations from schema.dbml
nself db update # Apply migrations
nself db seed # Seed database
nself db reset # Reset database
nself db backup # Create backup
# Configuration
nself build # Rebuild configuration
nself reset # Delete all data and reset
nself update # Update nself CLI
docker ps
nself logs
netstat -tulpn | grep LISTEN
docker ps | grep postgres
.env.local
nself reset
(⚠️ deletes all data)nself status
Ready to dive deeper? Check out our Architecture Overview to understand how everything works together.