Updated for ɳSelf v0.4.8
The nself service command provides unified management for all optional services in nself. It consolidates individual service commands into a single coherent interface for email, search, functions, MLflow, storage, cache, and metrics.
| Service | Description | Enable Variable |
|---|---|---|
| nself-admin | Web management UI | NSELF_ADMIN_ENABLED=true |
| MinIO | S3-compatible storage | MINIO_ENABLED=true |
| Redis | Cache and sessions | REDIS_ENABLED=true |
| Functions | Serverless runtime | FUNCTIONS_ENABLED=true |
| MLflow | ML experiment tracking | MLFLOW_ENABLED=true |
| MailPit | Development email | MAILPIT_ENABLED=true |
| MeiliSearch | Full-text search | MEILISEARCH_ENABLED=true |
List all available services and their status:
nself service list
# Output:
# Optional Services
# =================
# SERVICE STATUS PORT URL
# nself-admin enabled 3001 admin.local.nself.org
# minio enabled 9000 minio.local.nself.org
# redis enabled 6379 -
# functions enabled 5555 functions.local.nself.org
# mlflow disabled - -
# mailpit enabled 8025 mail.local.nself.org
# meilisearch enabled 7700 search.local.nself.orgCheck detailed service status:
nself service status [service]
# All services
nself service status
# Specific service
nself service status redis
# Example output:
# Redis Status
# ============
# Status: Running
# Container: myapp_redis
# Port: 6379
# Memory Usage: 45MB / 256MB
# Connected Clients: 3
# Keys: 1,247
# Uptime: 2d 4h 32mEnable or disable a service:
# Enable a service
nself service enable <service>
nself service enable mlflow
# Output:
# Enabling MLflow...
# Adding MLFLOW_ENABLED=true to .env
# Rebuilding configuration...
# Starting MLflow container...
# MLflow enabled and running at: http://mlflow.local.nself.org
# Disable a service
nself service disable <service>
nself service disable mlflow
# Note: Rebuild after changes
nself build
nself restartRestart a specific service:
nself service restart <service>
# Example
nself service restart redisView service logs:
nself service logs <service>
# Example
nself service logs meilisearchConfigure email delivery with development (MailPit) and production providers.
Show email configuration:
nself service email config
# Output:
# Email Configuration
# ===================
# Provider: mailpit (development)
# SMTP Host: mailpit
# SMTP Port: 1025
# Web Interface: http://mail.local.nself.org
#
# Production providers available:
# - sendgrid
# - mailgun
# - ses
# - smtpSend a test email:
nself service email test
# Output:
# Sending test email...
# To: test@example.com
# From: noreply@local.nself.org
# Subject: ɳSelf Test Email
#
# Email sent successfully!
# View in MailPit: http://mail.local.nself.orgOpen MailPit inbox in browser:
nself service email inbox
# Opening MailPit inbox in browser...Configure full-text search with MeiliSearch.
Reindex data:
# Reindex all data
nself service search index
# Output:
# Indexing data to MeiliSearch...
# users: 1,247 documents indexed
# products: 5,892 documents indexed
# posts: 3,421 documents indexed
# Indexing complete!
# Index specific table
nself service search index --table productsRun a search query:
nself service search query <term>
# Example
nself service search query "ergonomic keyboard"
# Output:
# Search Results (23 matches)
# ===========================
# 1. Ergonomic Mechanical Keyboard Pro (score: 0.95)
# 2. Split Ergonomic Keyboard (score: 0.89)
# 3. Wireless Ergonomic Keyboard Set (score: 0.84)Show index statistics:
nself service search stats
# Output:
# MeiliSearch Statistics
# ======================
# Indexes: 3
# Total Documents: 10,560
# Database Size: 45MB
# Last Update: 2 minutes ago
#
# INDEX DOCUMENTS SIZE
# users 1,247 5MB
# products 5,892 28MB
# posts 3,421 12MBDeploy and manage serverless functions with multiple runtimes.
Deploy functions:
nself service functions deploy
# Output:
# Deploying functions...
# ✓ sendWelcomeEmail
# ✓ processPayment
# ✓ generateReport
# ✓ resizeImage
#
# 4 functions deployed successfullyInvoke a function:
nself service functions invoke <name> [--data <json>]
# Example
nself service functions invoke sendWelcomeEmail --data '{"userId": 123}'
# Output:
# Function: sendWelcomeEmail
# Status: Success
# Duration: 245ms
# Response:
# {
# "sent": true,
# "messageId": "msg_abc123"
# }List deployed functions:
nself service functions list
# Output:
# NAME RUNTIME TRIGGER STATUS
# my-api ts http running
# worker python queue running
# cron-job ts scheduled runningView function logs:
nself service functions logs <name> [-f]
# Follow logs
nself service functions logs sendWelcomeEmail -f
# Output:
# [2026-01-23 10:30:15] INFO: Function invoked
# [2026-01-23 10:30:15] INFO: Fetching user 123
# [2026-01-23 10:30:16] INFO: Sending email to user@example.com
# [2026-01-23 10:30:16] INFO: Email sent: msg_abc123Machine learning experiment tracking with MLflow.
Open MLflow UI in browser:
nself service mlflow ui
# Opening MLflow UI in browser...
# URL: http://mlflow.local.nself.orgList experiments:
nself service mlflow experiments
# Output:
# MLflow Experiments
# ==================
# ID NAME RUNS LAST RUN
# 1 Default 12 2026-01-22
# 2 image-classification 45 2026-01-23
# 3 price-prediction 28 2026-01-21List runs for an experiment:
nself service mlflow runs [--experiment <name>]
# Example
nself service mlflow runs --experiment image-classification
# Output:
# Recent Runs
# ===========
# RUN ID STATUS ACCURACY LOSS DURATION
# abc123 FINISHED 0.945 0.124 5m 32s
# def456 FINISHED 0.932 0.156 4m 18s
# ghi789 FAILED - - 2m 05sBrowse artifacts:
nself service mlflow artifactsS3-compatible object storage management.
Manage buckets:
# List buckets
nself service storage buckets
# Output:
# MinIO Buckets
# =============
# BUCKET OBJECTS SIZE CREATED
# uploads 1,247 2.3GB 2026-01-15
# backups 45 15.6GB 2026-01-10
# public 892 456MB 2026-01-18Upload a file:
nself service storage upload <file> --bucket <bucket>
# Example
nself service storage upload ./image.jpg --bucket uploads
# Output:
# Uploading image.jpg to uploads...
# Size: 2.4MB
# Progress: 100%
# Uploaded: uploads/image.jpg
# URL: http://minio.local.nself.org/uploads/image.jpgDownload a file:
nself service storage download <bucket>/<path> <local>
# Example
nself service storage download uploads/image.jpg ./image.jpgGenerate a presigned URL:
nself service storage presign <bucket>/<path> [--expires <duration>]
# Example
nself service storage presign uploads/report.pdf --expires 1h
# Output:
# Presigned URL (valid for 1 hour):
# https://minio.local.nself.org/uploads/report.pdf?X-Amz-...Redis cache and session management.
Show Redis statistics:
nself service cache stats
# Output:
# Redis Statistics
# ================
# Version: 7.2.4
# Uptime: 2d 4h 32m
# Memory Used: 45MB / 256MB
# Connected Clients: 3
# Total Keys: 1,247
# Ops/sec: 156
# Hit Rate: 94.2%Flush the cache:
nself service cache flush [--confirm]
# Output:
# WARNING: This will delete all cached data.
# Continue? [y/N]: y
# Flushing Redis cache...
# Cache flushed successfully
# Flush specific pattern
nself service cache flush "session:*"List cache keys:
nself service cache keys [pattern]
# Examples
nself service cache keys # All keys
nself service cache keys "user:*" # User keys only
# Output:
# Keys matching 'user:*'
# ======================
# user:123:session
# user:123:preferences
# user:456:session
# user:789:cart
# ...
# (showing 10 of 1,247 keys)Monitoring and observability stack management.
Enable a monitoring profile:
nself service metrics enable <profile>
# Profiles:
# minimal - 4 services (~500MB): Prometheus, Grafana, Node Exporter, cAdvisor
# standard - 7 services (~1GB): + Loki, Promtail, Alertmanager
# full - 10 services (~2GB): + Tempo, Postgres Exporter, Redis Exporter
# auto - Auto-detect based on ENV
# Examples
nself service metrics enable minimal
nself service metrics enable standard
nself service metrics enable fullShow metrics status:
nself service metrics status
# Output:
# Profile: standard
# Services: 7/7 running
# Memory: ~850MB
# Scrape Targets: 12 healthyEach service can be configured via environment variables:
# Email
EMAIL_PROVIDER=sendgrid
SENDGRID_API_KEY=SG.xxx
# Search
SEARCH_PROVIDER=meilisearch
MEILISEARCH_API_KEY=xxx
# Functions
FUNCTIONS_RUNTIME=nodejs20
# MLflow
MLFLOW_TRACKING_URI=http://mlflow:5000
# Storage
MINIO_ACCESS_KEY=minioadmin
MINIO_SECRET_KEY=minioadmin
# Cache
REDIS_URL=redis://redis:6379# Enable development services
nself service enable mailpit
nself service enable meilisearch
nself service enable redis
# Check status
nself service list
# Test email
nself service email test# Configure production email
nself service email config --provider sendgrid
# Enable production services
nself service enable redis
nself service enable meilisearch
nself service enable functions
# Deploy functions
nself service functions deploy