Skip to main content
Self-hosting gives you complete control over the Iqra AI infrastructure, allowing you to run the core agent engine on your own servers while managing all dependencies and configuration.
The self-hosted version excludes the commercial multi-tenant billing and whitelabeling modules. These features are only available in Iqra Cloud.

Pre-release notice

Version 0.1 Pending - The codebase is currently active but requires manual service configuration. Automated database seeding scripts will be included in the official v0.1 release. Production deployment currently requires manual database setup.

Architecture overview

Iqra AI consists of four main services:

Service roles

  • Frontend - Admin dashboard and API interface
  • Backend Proxy - Load balancer and SIP gateway
  • Backend App - Core agent engine handling calls
  • Background Processor - Async tasks and analytics

Prerequisites

Before beginning installation, ensure you have:
1

System requirements

Review the system requirements for hardware specifications and supported operating systems.
2

Install dependencies

Install all required services:
  • .NET 10 Runtime
  • MongoDB (replica set recommended)
  • Redis (cluster mode for production)
  • Milvus vector database
  • S3-compatible storage (RustFS or AWS S3)
3

Network configuration

Configure firewall rules and network interfaces for RTP audio (UDP) and signaling.

Installation steps

1. Clone the repository

2. Install .NET 10 Runtime

3. Set up MongoDB

Iqra AI requires MongoDB for metadata storage:
For production deployments, configure MongoDB as a replica set for high availability and to support transactions.

4. Install Redis

5. Deploy Milvus vector database

Milvus is required for RAG (Retrieval-Augmented Generation) and knowledge base features:
Milvus will be available at http://localhost:19530.

6. Configure S3 storage

7. Configure the applications

Copy and configure the settings for each service:
1

Frontend configuration

See the configuration reference for all available options.
2

Backend Proxy configuration

Configure the server ID, region, and API key from the admin dashboard.
3

Backend App configuration

Set the network interface name for RTP audio binding.
4

Background Processor configuration

Configure MongoDB and Milvus connections.

8. Generate encryption keys

All services require shared encryption keys for security:
Store these keys securely. Losing encryption keys will make existing data unrecoverable. The Integrations.EncryptionKey MUST be identical across all four services.

9. Determine network interface name

The Backend App and Proxy require the OS-level network interface name for RTP audio:
Update the Hardware.NetworkInterfaceName setting in all configuration files.

10. Build the applications

11. Initialize the database

Automated seeding scripts will be included in v0.1. For now, manual database initialization is required.
Connect to MongoDB and create the required collections and indexes manually, or wait for the v0.1 release with automated setup.

12. Start the services

Start each service in order:
For production deployments, use a process manager like systemd (Linux) or create Windows Services to ensure services restart automatically.

Production deployment

Using systemd (Linux)

Create service files for each component:
Enable and start the services:

Using Docker Compose

Official Docker images will be available with the v0.1 release. For now, build custom images from the source.

Load balancing and high availability

For production deployments:
  1. Deploy multiple Backend App instances across different regions
  2. Use a reverse proxy (Nginx, Caddy) in front of the Frontend
  3. Configure MongoDB replica sets for database redundancy
  4. Use Redis Cluster instead of standalone Redis
  5. Deploy Milvus in distributed mode for large-scale vector operations

Monitoring and maintenance

Health checks

Each service exposes health check endpoints:
  • Frontend: http://localhost:5000/health
  • Backend Proxy: http://localhost:5001/health
  • Backend App: http://localhost:5002/health
  • Background Processor: http://localhost:5003/health

Log management

Configure logging in appsettings.json:
For production, integrate with centralized logging:
  • ELK Stack (Elasticsearch, Logstash, Kibana)
  • Grafana Loki
  • Datadog
  • CloudWatch (AWS)

Backup strategy

1

MongoDB backups

2

Redis persistence

Enable RDB snapshots and AOF in redis.conf:
3

S3 versioning

Enable versioning on your S3 bucket to prevent accidental deletions.
4

Configuration backup

Version control all appsettings.json files (excluding secrets) in a private repository.

Troubleshooting

Services fail to start

Check the logs for errors:
Common issues:
  • Incorrect database connection strings
  • Missing encryption keys
  • Network interface name mismatch
  • Port conflicts

Audio quality issues

RTP audio problems are often related to:
  • Incorrect network interface configuration
  • Firewall blocking UDP traffic
  • Insufficient bandwidth allocation
  • Network jitter or packet loss

High memory usage

Optimize Redis and Milvus memory:

Updating

To update to a new version:
Always backup your database before updating. Review the changelog for breaking changes and migration steps.

Next steps

Configuration reference

Detailed documentation for all configuration options

System requirements

Hardware sizing and capacity planning guidance

Security best practices

Harden your self-hosted deployment

Contributing

Contribute to the open-source project