Updated for nself v0.4.8 v0.4.8
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:
mkdir my-backend && cd my-backend
nself initYou'll be asked a few questions (or accept defaults):
local.nself.org)What gets created:
my-backend/
├── .env # Your configuration
├── .env.secrets # Sensitive credentials (auto-generated)
└── nself/ # Project directorynself build # Generate docker-compose.yml, nginx configs, etc.
nself start # Launch all servicesFirst start takes 2-5 minutes (downloading Docker images).
Check status:
nself status # Service health
nself urls # Access URLsnself uses a database-first approach. Design your schema, and everything else follows.
nself db schema scaffold basic # Creates schema.dbmlAvailable templates: basic, ecommerce, saas, blog
schema.dbml in your projectnself db schema apply schema.dbmlThis single command creates SQL migration, runs it, generates mock data, and seeds sample users.
Extend nself with third-party integrations: Stripe, GitHub, Shopify, and more. Use nself plugin list to see available plugins and nself plugin install stripe to add them to your project.
For HTTPS to work without browser warnings:
nself trust| Service | URL | Description |
|---|---|---|
| GraphQL API | https://api.local.nself.org | Hasura console + API |
| Auth | https://auth.local.nself.org | Authentication service |
| Admin | https://admin.local.nself.org | Admin dashboard (if enabled) |
https://mail.local.nself.org | Email testing UI (if enabled) |
# Check all URLs
nself urls
# View logs
nself logs
# Database shell
nself db shell
# Run a query
nself db query "SELECT * FROM users"
# Generate TypeScript types
nself db types# Create production environment
nself env create prod production
# Edit server configuration
# .environments/prod/server.json
# Deploy
nself deploy prodSee Deployment Guide for complete instructions.
Edit .env and add:
# Enable Redis
REDIS_ENABLED=true
# Enable MinIO (S3 storage)
MINIO_ENABLED=true
# Enable search
MEILISEARCH_ENABLED=true
# Enable monitoring (10 services)
MONITORING_ENABLED=true
# Enable admin dashboard
NSELF_ADMIN_ENABLED=trueThen rebuild:
nself build && nself restartExtend nself with third-party integrations:
# List available plugins
nself plugin list
# Install Stripe for payments
nself plugin install stripe
# Install GitHub for CI/CD integration
nself plugin install github
# Install Shopify for e-commerce
nself plugin install shopifyPlugins automatically create database tables, set up webhook handlers, and provide CLI commands for managing synced data.
nself start # Start services
nself stop # Stop services
nself restart # Restart services
nself status # Check health
nself logs # View all logs
nself logs postgres # View specific servicenself db migrate up # Run migrations
nself db migrate create NAME # Create migration
nself db seed # Seed data
nself db backup # Create backup
nself db restore # Restore backup
nself db shell # PostgreSQL shell
nself db types # Generate typesnself build # Regenerate configs
nself urls # Show all URLs
nself doctor # Diagnose issues
nself reset # Reset to clean statenself plugin list # Show available plugins
nself plugin install stripe # Install a plugin
nself plugin status # Check plugin health
nself plugin stripe sync # Sync data from Stripe
nself plugin stripe customers list # View synced customersdocker 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.