Self-host your own complete backend in just seconds.

Complete modular backend infrastructure with PostgreSQL, GraphQL, Auth, Storage, Serverless Functions, Mail, Seeding, Migrations, and more - all with just a single command.

Terminal
Docker Compose
# Initialize your backend infrastructure
nself init
# Build Docker images locally
nself build
# Start all services
nself up

nself Documentation

Complete guide to deploying enterprise-grade backend infrastructure with nself CLI. Learn how to set up PostgreSQL, Hasura GraphQL, Redis, authentication, storage, and microservices in minutes.


Quick start

Get your backend infrastructure running in minutes. nself handles all the complexity of orchestrating multiple services, configuring databases, and setting up authentication.

Installing nself

Install the nself CLI with our simple installer script. This will download the latest version and add it to your PATH automatically.

curl -fsSL https://raw.githubusercontent.com/acamarata/nself/main/install.sh | bash

The installer detects your operating system and architecture, downloads the appropriate binary, and sets up shell completions for an enhanced developer experience.

System Requirements

Make sure you have Docker and Docker Compose installed before running nself. The CLI will check for these dependencies during initialization.

Creating your first project

Initialize a new nself project with default configuration. This creates all necessary files and validates your environment.

# Initialize a new project
nself init

# Build out the project
nself build

# Start all services
nself up

Your backend is now running! Access your services at:

  • Hasura GraphQL Console: http://localhost:8080
  • MinIO Console: http://localhost:9001
  • Database: localhost:5432
  • Redis: localhost:6379

Pro Tip

Use nself logs -f to stream logs from all services, or nself logs hasura -f to follow logs from a specific service.


Basic usage

nself provides a comprehensive set of commands for managing your backend infrastructure. Here are the most common operations you'll use daily.

Managing your services

Control your backend services with simple commands. nself handles orchestration, health checks, and graceful shutdowns automatically.

# Start all services
nself up

# Stop all services
nself down

# Restart a specific service
nself restart hasura

# View service status
nself status

Database operations

The v0.2.0 release introduces powerful database management tools. Work with schema-first development using DBML and automatic migrations.

# Create sample schema
nself db sample

# Generate migrations from schema changes
nself db run

# Apply migrations safely
nself db update

# Seed your database
nself db seed

# Check database status
nself db status

# Sync with dbdiagram.io
nself db sync

Adding microservices

Extend your backend with additional microservices. nself provides templates for common patterns and frameworks.

# Enable optional services in .env.local
# NESTJS_ENABLED=true
# BULLMQ_ENABLED=true
# GOLANG_ENABLED=true
# PYTHON_ENABLED=true

# Rebuild with new services
nself build
nself up

# View all running services
nself status

Getting help

We're here to help you succeed with nself. Find answers, report issues, and connect with the community.

Submit an issue

Found a bug or have a feature request? Open an issue on our GitHub repository. We actively monitor and respond to all issues.

Before submitting, please check existing issues to avoid duplicates. Include as much detail as possible, including your nself version, OS, and steps to reproduce.

Join the community

Connect with other nself users, share your projects, and get help from the community. We maintain active discussions on GitHub where you can ask questions and share knowledge.

Follow the project on GitHub to stay updated with new releases, and consider starring the repository if you find nself useful!