Self-Hosting — Coming Q2 2026
The open source repository is not yet public. This guide is a preview of what will be available after our pilot program concludes. Need accessibility compliance now? Join the pilot program for immediate cloud-hosted access with full support.
Self-Hosting Guide
Deploy Aelira on your own infrastructure for complete control over your data. Perfect for universities with FERPA requirements.
Why Self-Host?
Data Privacy
Your documents never leave your infrastructure. Essential for FERPA compliance.
AI On-Premise
Run Ollama locally. No data sent to OpenAI, Google, or any external AI provider.
Full Control
Customize configuration, integrate with existing systems, scale as needed.
System Requirements
| Component | Minimum | Recommended |
|---|---|---|
| CPU | 4 cores | 8+ cores |
| RAM | 8 GB | 16+ GB |
| Storage | 20 GB SSD | 100+ GB SSD |
| GPU (optional) | Not required | NVIDIA GPU for faster AI |
Note: AI models (Llama 3.2, Qwen 2.5) require ~4GB storage each. GPU acceleration is optional but significantly speeds up inference.
Architecture Overview
┌─────────────────────────────────────────────────────────────┐
│ Load Balancer │
│ (nginx / traefik) │
└──────────────────────────┬──────────────────────────────────┘
│
┌─────────────────┼─────────────────┐
│ │ │
▼ ▼ ▼
┌─────────────┐ ┌─────────────┐ ┌─────────────┐
│ Dashboard │ │ Backend │ │ Ollama │
│ (React) │ │ (FastAPI) │ │ (AI) │
│ Port 5173 │ │ Port 8000 │ │ Port 11434 │
└─────────────┘ └──────┬──────┘ └─────────────┘
│
┌───────────────┼───────────────┐
│ │ │
▼ ▼ ▼
┌─────────────┐ ┌─────────────┐ ┌─────────────┐
│ PostgreSQL │ │ Redis │ │ Files │
│ (pgvector) │ │ (cache) │ │ (storage) │
│ Port 5432 │ │ Port 6379 │ │ /data │
└─────────────┘ └─────────────┘ └─────────────┘Docker Deployment
Preview — Q2 20261. Clone the Repository
# Repository not yet public — coming Q2 2026
git clone https://github.com/aelira-ai/aelira.git
cd aelira/backend2. Configure Environment
# Copy and edit environment file
cp .env.example .env
# Required variables:
DATABASE_URL=postgresql://aelira:your_password@postgres:5432/aelira
REDIS_URL=redis://redis:6379/0
SECRET_KEY=your-secret-key-here
OLLAMA_HOST=http://ollama:11434
# Optional: External AI (if not using Ollama)
GEMINI_API_KEY=your-key # Google Gemini
OPENAI_API_KEY=your-key # OpenAI (backup)3. Start Services
# Production deployment
docker compose up -d --build
# Check service status
docker compose ps
# View logs
docker compose logs -f api4. Initialize Database
# Run database migrations
docker-compose exec backend alembic upgrade head
# Verify database connection
docker-compose exec backend python -c "from src.db import engine; print('OK')"Configuration Reference
| Variable | Description | Default |
|---|---|---|
| DATABASE_URL | PostgreSQL connection string | Required |
| REDIS_URL | Redis connection string | Required |
| SECRET_KEY | JWT signing key (32+ chars) | Required |
| OLLAMA_HOST | Ollama server URL | http://localhost:11434 |
| OLLAMA_MODEL | Default AI model | llama3.2:3b |
| MAX_UPLOAD_SIZE | Max file size (MB) | 100 |
| LOG_LEVEL | Logging verbosity | INFO |
Memory Optimization
For servers with limited RAM, configure Ollama to use smaller models:
# Use smaller models (in .env)
OLLAMA_MODEL=llama3.2:1b # 1B params (~2GB RAM)
OLLAMA_VISION_MODEL=moondream2 # ~2GB RAM
# Or disable AI features and use Gemini API
USE_LOCAL_AI=false
GEMINI_API_KEY=your-keyHTTPS with Let's Encrypt
Use Traefik or nginx for automatic SSL certificates:
# docker-compose.yml includes Traefik config
# Set your domain in .env:
DOMAIN=aelira.yourschool.edu
[email protected]
# Traefik handles SSL automaticallySecurity Checklist
Change default passwords
Update DATABASE_URL and Redis credentials
Generate strong SECRET_KEY
Use: openssl rand -hex 32
Enable HTTPS
Use Let's Encrypt or your own certificates
Restrict network access
Only expose ports 80/443 publicly
Set up backups
Regular PostgreSQL backups for scan history
Troubleshooting
Ollama not responding
Check if models are downloaded: docker-compose exec ollama ollama list
Database connection failed
Ensure PostgreSQL is running and DATABASE_URL is correct. Check: docker-compose logs postgres