Skip to main content
Deploy nao in your own infrastructure to give your entire team access to the analytics agent.

Why Self-Host?

Full Control

Complete control over your deployment and data

Security

Data stays in your infrastructure

Customization

Configure to match your environment

Cost Control

Use your own LLM keys and resources

Deployment Options

1. Docker (Recommended) Easiest way to deploy for production using our official Docker Hub image:
docker pull getnao/nao:latest
2. Docker Compose For more complex setups with databases:
docker-compose up -d
3. Kubernetes For enterprise deployments at scale (documentation coming soon).

Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   Load Balancer β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜
         β”‚
    β”Œβ”€β”€β”€β”€β”΄β”€β”€β”€β”€β”
    β”‚  nao    β”‚  ← FastAPI backend + React frontend
    β”‚  Server β”‚
    β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”˜
         β”‚
    β”Œβ”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
    β”‚                     β”‚
β”Œβ”€β”€β”€β”΄β”€β”€β”€β”€β”        β”Œβ”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”
β”‚Context β”‚        β”‚  Your Data   β”‚
β”‚ Files  β”‚        β”‚  Warehouse   β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”˜        β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Prerequisites

Before deploying:
  1. nao Project - Set up with nao init
  2. LLM API Keys - OpenAI, Anthropic, or other provider
  3. Database Credentials - For your data sources
  4. Domain/Host - Where nao will be accessible

Environment Variables

Key configuration through environment variables:
# Required
NAO_DEFAULT_PROJECT_PATH=/app/context    # Path to your context
OPENAI_API_KEY=sk-...                    # LLM provider API key

# Optional
PORT=5005                                 # Server port (default: 5005)
NAO_ENV=production                        # Environment
DATABASE_URL=postgresql://...             # Conversation history storage
ALLOWED_ORIGINS=https://yourdomain.com    # CORS settings

Full Configuration Guide

See all configuration options

Security Considerations

Network Security
  • Deploy behind a firewall
  • Use HTTPS/TLS for external access
  • Implement authentication (OAuth, SAML, etc.)
** Data Security**
  • Use environment variables for secrets
  • Rotate API keys regularly
  • Limit database user permissions to read-only
  • Enable audit logging
Access Control
  • Implement user authentication
  • Role-based access control (RBAC)
  • Rate limiting for API endpoints
  • Monitor usage patterns

Monitoring

Track your deployment health:
# Check server health
curl http://localhost:5005/health

# View logs
docker logs nao -f

# Monitor resource usage
docker stats nao

Updates

Keep nao up to date:
# Pull latest version
docker pull getnao/nao:latest

# Restart with new version
docker-compose down
docker-compose up -d
Always test updates in a staging environment first before deploying to production.
What’s Next?