-
-
Notifications
You must be signed in to change notification settings - Fork 2
Admin UI
GitHub Actions edited this page Feb 21, 2026
·
4 revisions
The nself Admin UI provides a comprehensive web-based interface for managing your backend stack.
The Admin UI is a React-based dashboard that offers:
- Real-time service monitoring
- Docker container management
- Database query interface
- Log viewing and analysis
- Health checks and metrics
- Backup management
- Configuration editor
Default URL: http://localhost:3021
# Enable with temporary password
nself admin enable
# Output:
# ✅ Admin UI enabled
# 📝 Temporary password: xY3mK9pL
# 🌐 URL: http://localhost:3021# Set your own password
nself admin password MySecurePass123!
# Or generate a secure password
nself admin password --generate# Open in default browser
nself admin open
# Or navigate manually to:
# http://localhost:3021Add to your .env file:
# Admin UI Configuration
NSELF_ADMIN_ENABLED=true
NSELF_ADMIN_PORT=3021
NSELF_ADMIN_HOST=0.0.0.0
# Authentication
NSELF_ADMIN_AUTH_PROVIDER=basic
ADMIN_SECRET_KEY=your-secret-key-here
ADMIN_PASSWORD_HASH=generated-hash
# Session Settings
NSELF_ADMIN_SESSION_TIMEOUT=3600
NSELF_ADMIN_SESSION_SECURE=false
# Features
NSELF_ADMIN_ENABLE_LOGS=true
NSELF_ADMIN_ENABLE_EXEC=true
NSELF_ADMIN_ENABLE_BACKUPS=true
NSELF_ADMIN_ENABLE_METRICS=trueNSELF_ADMIN_AUTH_PROVIDER=basic
ADMIN_USERNAME=admin
ADMIN_PASSWORD_HASH=<bcrypt-hash>NSELF_ADMIN_AUTH_PROVIDER=jwt
NSELF_ADMIN_JWT_SECRET=your-jwt-secret
NSELF_ADMIN_JWT_ISSUER=nself-adminNSELF_ADMIN_AUTH_PROVIDER=oauth2
NSELF_ADMIN_OAUTH_CLIENT_ID=your-client-id
NSELF_ADMIN_OAUTH_CLIENT_SECRET=your-secret
NSELF_ADMIN_OAUTH_PROVIDER=githubThe main dashboard provides:
- System Overview: CPU, memory, disk usage
- Service Status: Health of all running services
- Quick Actions: Start, stop, restart services
- Recent Logs: Last 100 log entries
- Alerts: System warnings and errors
- List all Docker containers
- Real-time status updates
- Resource usage per container
- Network information
- Volume mounts
// Available actions
- Start/Stop/Restart
- Scale up/down
- View logs
- Execute commands
- Inspect configuration- SQL editor with syntax highlighting
- Query history
- Export results (CSV, JSON)
- Schema browser
- Table previews
- Create/Drop databases
- Run migrations
- Backup/Restore
- View active connections
- Performance metrics
- Real-time log streaming
- Multi-service log aggregation
- Search and filter
- Log level filtering
- Export logs
- Syntax highlighting
{
service: ["postgres", "hasura", "auth"],
level: ["error", "warn", "info"],
timeRange: "last-1h",
search: "connection refused"
}- One-click backup creation
- Scheduled backups
- Selective service backup
- Compression options
- List available backups
- Point-in-time recovery
- Verify backup integrity
- Restore to different environment
- Visual .env editor
- Syntax validation
- Change history
- Rollback capability
- Hot reload support
- Docker Compose editor
- Nginx configuration
- Service-specific configs
- Template management
// themes/custom.js
export default {
primary: '#007bff',
secondary: '#6c757d',
success: '#28a745',
danger: '#dc3545',
warning: '#ffc107',
info: '#17a2b8',
dark: '#343a40',
light: '#f8f9fa'
}// widgets/custom-metric.jsx
import { Widget } from '@nself/admin-ui';
export default function CustomMetric() {
return (
<Widget title="Custom Metric">
{/* Your custom content */}
</Widget>
);
}// api/custom-endpoint.js
export default {
path: '/api/custom',
method: 'GET',
handler: async (req, res) => {
// Custom logic
res.json({ data: 'custom' });
}
}roles:
admin:
- all permissions
developer:
- view logs
- restart services
- query database
viewer:
- read-only accessNSELF_ADMIN_IP_WHITELIST=127.0.0.1,192.168.1.0/24NSELF_ADMIN_2FA_ENABLED=true
NSELF_ADMIN_2FA_PROVIDER=totp# Automatically configured
X-Frame-Options: DENY
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Content-Security-Policy: default-src 'self'# Enable audit logs
NSELF_ADMIN_AUDIT_ENABLED=true
NSELF_ADMIN_AUDIT_PATH=/var/log/nself/audit.log
# Log format
{
"timestamp": "2024-09-09T10:30:00Z",
"user": "admin",
"action": "restart_service",
"service": "postgres",
"ip": "192.168.1.100",
"result": "success"
}# Login
POST /api/auth/login
{
"username": "admin",
"password": "password"
}
# Response
{
"token": "jwt-token",
"expires": 3600
}# List services
GET /api/services
# Get service details
GET /api/services/{name}
# Control service
POST /api/services/{name}/action
{
"action": "restart"
}# Execute query
POST /api/database/query
{
"sql": "SELECT * FROM users LIMIT 10"
}
# Get schema
GET /api/database/schema# Stream logs
WS /api/logs/stream?service=postgres
# Get historical logs
GET /api/logs?service=postgres&lines=100# Enable/disable admin UI
nself admin enable
nself admin disable
# Check status
nself admin status
# Set password
nself admin password [password]
# Reset to defaults
nself admin reset
# View logs
nself admin logs
# Open in browser
nself admin open# Generate API token
nself admin token generate
# List active sessions
nself admin sessions list
# Revoke session
nself admin sessions revoke [session-id]
# Export configuration
nself admin export > admin-config.json
# Import configuration
nself admin import < admin-config.json# Check if enabled
grep NSELF_ADMIN_ENABLED .env
# Check if running
nself status | grep admin
# Check logs
nself logs admin
# Restart admin service
nself restart admin# Reset password
nself admin password --reset
# Clear sessions
nself admin sessions clear
# Regenerate secret key
nself admin secret --regenerate# Increase memory limit
NSELF_ADMIN_MEMORY_LIMIT=512M
# Enable caching
NSELF_ADMIN_CACHE_ENABLED=true
# Reduce log retention
NSELF_ADMIN_LOG_RETENTION=7d# Exposed at /metrics
nself_admin_requests_total
nself_admin_response_time_seconds
nself_admin_active_sessions
nself_admin_api_errors_totalImport dashboard ID: 14842 or use the provided JSON:
cp admin/grafana-dashboard.json /var/lib/grafana/dashboards/# Generate certificates
nself ssl
# Configure admin UI
NSELF_ADMIN_SSL_ENABLED=true
NSELF_ADMIN_SSL_CERT=/ssl/cert.pem
NSELF_ADMIN_SSL_KEY=/ssl/key.pem# Nginx configuration
location /admin {
proxy_pass http://localhost:3100;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}# Docker Swarm mode
services:
admin:
deploy:
replicas: 3
update_config:
parallelism: 1
delay: 10sNeed help? Check FAQ or create an issue
ɳSelf CLI v1.0.9. MIT licensed. Docs CC BY 4.0.
GitHub · Issues · Discussions · nself.org · docs.nself.org
Getting Started
Commands
- Commands, Overview
- Lifecycle: cmd-init · cmd-build · cmd-start · cmd-stop · cmd-restart · cmd-dev
- Monitoring: cmd-status · cmd-logs · cmd-health · cmd-urls · cmd-doctor · cmd-monitor · cmd-alerts · cmd-sentry · cmd-watchdog · cmd-dogfood
- Data: cmd-db · cmd-backup · cmd-dr · cmd-queue · cmd-webhooks
- Config: cmd-config · cmd-service · cmd-env · cmd-promote
- Networking: cmd-ssl · cmd-trust · cmd-dns-setup
- Security: cmd-security · cmd-secrets · cmd-waf
- Tenancy: cmd-tenant · cmd-billing
- Plugins: cmd-plugin · cmd-license
- AI: cmd-ai · cmd-claw · cmd-model
- Templates: cmd-template
- Utilities: cmd-exec · cmd-clean · cmd-reset · cmd-update · cmd-upgrade · cmd-version · cmd-admin · cmd-migrate · cmd-migrate-firebase · cmd-migrate-supabase · cmd-completion
Features
- Features, Overview
- Feature-Auth
- Feature-Storage
- Feature-Search
- Feature-Functions
- Feature-Email
- Feature-Monitoring
- Feature-Plugins
- Feature-ɳClaw, AI Assistant
- Feature-ɳChat, Messaging
- Feature-ɳTV, Media Player
- Feature-ɳFamily, Family Social
- Feature-ɳCloud, Managed Hosting
- Feature-Memory-Rooms, Knowledge Organization
- Feature-Agent-Dashboard, Agent Metrics
- Feature-Image-Generation, AI Image Generation
Configuration
- Configuration, Overview
- Config-Env-Vars
- Config-Postgres
- Config-Hasura
- Config-Auth
- Config-Nginx
- Config-Optional-Services
- Config-Custom-Services
- Config-System
Plugins (87 + 10 monitoring)
Free (25)
- plugin-backup
- plugin-content-acquisition
- plugin-content-progress
- plugin-cron
- plugin-donorbox
- plugin-feature-flags
- plugin-github
- plugin-github-runner
- plugin-invitations
- plugin-jobs
- plugin-link-preview
- plugin-mdns
- plugin-mlflow
- plugin-monitoring
- plugin-notifications
- plugin-notify
- plugin-paypal
- plugin-search
- plugin-shopify
- plugin-stripe
- plugin-subtitle-manager
- plugin-tokens
- plugin-torrent-manager
- plugin-vpn
- plugin-webhooks
Pro (62)
- plugin-access-controls
- plugin-activity-feed
- plugin-admin-api
- nself-ai-gateway
- nself-ai-cc
- nself-ai-mcp
- plugin-analytics
- plugin-auth
- plugin-backup-pro
- plugin-bots
- plugin-browser
- plugin-calendar
- plugin-cdn
- plugin-chat
- plugin-claw
- plugin-claw-budget
- plugin-claw-news
- plugin-claw-web
- plugin-cloudflare
- plugin-cms
- plugin-compliance
- plugin-cron-pro
- plugin-ddns
- plugin-devices
- plugin-documents
- plugin-donorbox-pro
- plugin-entitlements
- plugin-epg
- plugin-file-processing
- plugin-game-metadata
- plugin-geocoding
- plugin-geolocation
- plugin-google
- plugin-home
- plugin-idme
- plugin-knowledge-base
- plugin-linkedin
- plugin-livekit
- plugin-media-processing
- plugin-meetings
- plugin-moderation
- plugin-mux
- plugin-notify-pro
- plugin-object-storage
- plugin-observability
- plugin-paypal-pro
- plugin-photos
- plugin-podcast
- plugin-post
- plugin-realtime
- plugin-recording
- plugin-retro-gaming
- plugin-rom-discovery
- plugin-shopify-pro
- plugin-social
- plugin-sports
- plugin-stream-gateway
- plugin-streaming
- plugin-stripe-pro
- plugin-support
- plugin-tmdb
- plugin-voice
- plugin-web3
- plugin-workflows
Planned (26)
plugin-auditplugin-blogplugin-checkoutplugin-commerceplugin-drmplugin-exportplugin-flowplugin-importplugin-ldapplugin-mailgunplugin-mediaplugin-oauth-providersplugin-pagesplugin-postmarkplugin-rate-limitplugin-reportsplugin-samlplugin-schedulerplugin-sendgridplugin-ssoplugin-subscriptionplugin-thumbplugin-transcoderplugin-twilioplugin-wafplugin-watermark
Guides
- Guide-Production-Deployment
- Guide-SSL-Setup
- Guide-Multi-Tenancy
- Guide-Security-Hardening
- Guide-Monitoring-Setup
- Guide-Backup-Restore
- Guide-Custom-Services
- Guide-Migration-from-v1
Architecture
Reference
- API-Reference
- reference-error-codes, Error Codes
Licensing
Security
Brand
Operations
- operations/release-cascade, Release Cascade
- operations/self-healing, Self-Healing Schema
- operations/redis-tuning, Redis Pool Tuning
- operations/meilisearch-warmup, MeiliSearch Warm-Up
- operations/jwt-rotation, JWT Key Rotation
- operations/windows-wsl2-setup, Windows / WSL2 Setup
- operations/gemini-oauth-reauth, Gemini OAuth Reauth
Contributing
Admin
- USER-ACTION-QUEUE, Pending Admin Actions