Every nSelf project uses the same core stack. Four always-on services plus seven optional ones, all orchestrated by Docker Compose and generated from your .env.
| Service | Role | Image | Port | Notes |
|---|---|---|---|---|
| PostgreSQL 16 | Primary database | postgres:16-alpine | 5432 (internal) | Single-source-of-truth data store. pgvector, ltree, JSONB enabled. |
| Hasura GraphQL | API layer | hasura/graphql-engine:v2.42+ | 8080 (internal) | Generates GraphQL over Postgres. Auth via JWT claims. Remote Schemas for per-app APIs. |
| Auth | Authentication | nhost/hasura-auth:latest | 4000 (internal) | Email/password, OAuth, magic link, TOTP, WebAuthn. Issues JWTs with Hasura claims. |
| Nginx | Reverse proxy + TLS | nginx:alpine | 80, 443 | Routes *.local.nself.org or *.yourdomain.com. SSL via Let's Encrypt or self-signed. |
| Service | Role | Notes |
|---|---|---|
| MinIO | S3-compatible object storage | Used by the Storage service and by plugins that need blob storage. |
| Redis 7 | Cache and queue | Sessions, rate limits, BullMQ. Required by several pro plugins. |
| MeiliSearch | Full-text search | Typo-tolerant, fast, open-source. Populated by the search plugin. |
| SMTP gateway | Dev: Mailpit inbox. Prod: Postmark, SendGrid, SES, Resend, Mailgun, and 11 others. | |
| Functions | Serverless runtime | Deno-based edge functions, one per file in <code>functions/</code>. |
| MLflow | ML experiment tracker | Optional. Useful for AI-plugin users. |
| nself-admin | Local GUI | localhost:3021 only. Never exposed publicly. |
Ten services. Enable with MONITORING_ENABLED=true.
| Tier | Stack | Cost | Best for |
|---|---|---|---|
| Local dev | Full stack via Docker Desktop | Free | Every developer. The only setup that feels instant. |
| Single VPS | All services on one Linux box | $4 to $20 / month | Side projects, staging, small apps (< 100 req/s). |
| Managed VPS | Hetzner CX23 or CAX31 with automated backups | $12 to $30 / month | Production for most teams. What nself.org itself runs on. |
| HA cluster | Postgres primary + standby, Redis cluster, Hasura behind load balancer | $100 to $300 / month | Mission-critical production with strict uptime SLO. |
| nCloud (coming) | Managed nSelf hosting by the nSelf team | TBD | Teams that want zero ops overhead. |