Support for 16+ email providers. Common configuration:
Variable
Default
Description
EMAIL_PROVIDER
mailpit
Email provider
AUTH_SMTP_HOST
<provider-specific>
SMTP host
AUTH_SMTP_PORT
587
SMTP port
AUTH_SMTP_USER
<required>
SMTP username
AUTH_SMTP_PASS
<required>
SMTP password
AUTH_SMTP_SECURE
true
Use TLS
AUTH_SMTP_SENDER
noreply@${BASE_DOMAIN}
Sender address
Supported providers:
SendGrid
AWS SES
Mailgun
Postmark
Gmail
Office365
Brevo (Sendinblue)
Resend
SparkPost
Mandrill
Elastic Email
SMTP2GO
MailerSend
Mailchimp Transactional
Custom SMTP
Frontend Applications
Support for multiple frontend applications:
Individual Format (Preferred for Wizard)
Variable
Example
Description
FRONTEND_APP_COUNT
2
Number of frontend apps
FRONTEND_APP_1_NAME
web
App 1 name
FRONTEND_APP_1_PORT
3001
App 1 port
FRONTEND_APP_1_PREFIX
app
App 1 URL prefix
FRONTEND_APP_2_NAME
admin
App 2 name
FRONTEND_APP_2_PORT
3002
App 2 port
FRONTEND_APP_2_PREFIX
admin
App 2 URL prefix
Compact Format (Alternative)
Variable
Example
Description
FRONTEND_APPS
web:3001:app,admin:3002:admin
Comma-separated app definitions
Internal Routes
Route a custom subdomain to a Docker-internal service (e.g., api.sites.localhost → hasura:8080). These configs survive nself build rebuilds because they are generated deterministically from .env.
Up to 20 routes supported (INTERNAL_ROUTE_1_* through INTERNAL_ROUTE_20_*).
Per-Route Variables
For each route N (1–20):
Variable
Required
Default
Description
INTERNAL_ROUTE_N_NAME
Yes
—
Route identifier. Also used as subdomain if _SUBDOMAIN is not set.
INTERNAL_ROUTE_N_SUBDOMAIN
No
Same as _NAME
Subdomain portion of the URL (e.g., api.sites produces api.sites.{BASE_DOMAIN}).
These variables are maintained for backward compatibility but mapped to new names:
Old Variable
New Variable
Notes
NADMIN_ENABLED
NSELF_ADMIN_ENABLED
Use new name
MINIO_ENABLED
STORAGE_ENABLED
Both work
DB_BACKUP_ENABLED
BACKUP_ENABLED
Use new name
DB_BACKUP_SCHEDULE
BACKUP_SCHEDULE
Use new name
DB_BACKUP_RETENTION_DAYS
BACKUP_RETENTION_DAYS
Use new name
Variable Validation Rules
Required Variables
These must be set for nself to function:
PROJECT_NAME - Must be alphanumeric with hyphens
BASE_DOMAIN - Must be valid domain format
Generated Variables
These are auto-generated if not provided:
All passwords and secrets
API keys
JWT secrets
Admin credentials
Computed Variables
These are computed from other variables:
HASURA_GRAPHQL_DATABASE_URL - Built from PostgreSQL settings
AUTH_DATABASE_URL - Built from PostgreSQL settings
STORAGE_DATABASE_URL - Built from PostgreSQL settings
Validation Patterns
Ports: Must be 1-65535, not in use
Passwords: Minimum 12 characters for generated
Project Name: ^[a-z][a-z0-9-]*$
Domain: Valid domain or IP format
Email: Valid email format
Best Practices
Security
Never commit .env or .env.secrets to version control
Use strong, unique passwords for production
Enable 2FA where available
Rotate secrets regularly
Use environment-specific files
Performance
Start only needed services
Set appropriate resource limits
Enable caching where beneficial
Use connection pooling
Monitor resource usage
Development
Use .env.dev for team defaults
Keep .env for personal overrides
Document custom variables
Use consistent naming conventions
Validate variables before use
Production
Use .env.prod and .env.secrets
Enable monitoring services
Configure backups
Use proper SSL certificates
Set resource limits
Environment-Specific Configurations
Development (ENV=dev)
# Optimized for development
HASURA_GRAPHQL_DEV_MODE=true
HASURA_GRAPHQL_ENABLE_CONSOLE=true
HOT_RELOAD_ENABLED=true
DEBUG_LOGGING=true
SSL_PROVIDER=mkcert
EMAIL_PROVIDER=mailpit
Staging (ENV=staging)
# Production-like but with debugging
HASURA_GRAPHQL_DEV_MODE=false
HASURA_GRAPHQL_ENABLE_CONSOLE=true
HOT_RELOAD_ENABLED=false
DEBUG_LOGGING=true
SSL_PROVIDER=letsencrypt
LETSENCRYPT_STAGING=true
Production (ENV=prod)
# Optimized for production
HASURA_GRAPHQL_DEV_MODE=false
HASURA_GRAPHQL_ENABLE_CONSOLE=false
HOT_RELOAD_ENABLED=false
DEBUG_LOGGING=false
SSL_PROVIDER=letsencrypt
LETSENCRYPT_STAGING=false
BACKUP_ENABLED=true
MONITORING_ENABLED=true