🚀 Installation & Administration Guide
AiPBX automates the entire stack (Asterisk 22, MariaDB 11, Nginx L4, Apache 2.4, Go Chat, Coturn TURNS) with zero hardcoded credentials in under 5 minutes via install.sh.
1. System Requirements & Hardware Sizing
| Param | Minimum Specs (Dev / Test) | Production Recommended (50-200 Ext) |
|---|---|---|
| OS | Ubuntu Server 26.04 LTS (x86_64) | Ubuntu Server 26.04 LTS (x86_64) |
| CPU | 2 vCPU | 4 vCPU+ (Intel Xeon / AMD EPYC / Ryzen) |
| RAM | 2 GB | 4 GB – 8 GB RAM |
| Storage | 15 GB SSD | 50 GB+ NVMe SSD (for CDR Call Recordings) |
| Network | Static Local IP | Static Public IPv4 & Pointed FQDN Domain |
2. Turnkey Automated Installation
bash — Ubuntu Server
# 1. Clone repository
git clone https://github.com/mahirgul/AiPBX.git /opt/aipbx
cd /opt/aipbx
# 2. Run automated installer as root
sudo bash install.sh
What the Installer Automates:
- Stack Provisioning: Installs Asterisk 22, Apache 2.4, Nginx L4 Stream, MariaDB 11, PHP 8 with extensions, Go compiler, Coturn, and Fail2ban.
- Dynamic Cryptographic Passwords: Generates unique 32-character random secrets for MariaDB users, AMI, coturn, and admin portal.
- Automated TLS Provisioning: Interactively prompts for FQDN domain and obtains free Let's Encrypt certificates via Certbot (or generates self-signed SAN SSL).
- Schema Migrations: Executes Phinx database migrations and seeds initial admin accounts.
- Credential Safe: Prints complete terminal summary and writes protected credentials to
/root/aipbx-credentials.txt(chmod 600).
3. Network Ports & Firewall Table
| Port | Protocol | Service / Purpose | Inbound WAN Access |
|---|---|---|---|
| 443 | TCP | Nginx L4 ALPN Stream (Web, WebRTC WSS, Coturn TURNS) | Required / Zorunlu |
| 80 | TCP | HTTP -> HTTPS Redirect & Let's Encrypt ACME HTTP-01 | Required / Zorunlu |
| 10000 - 20000 | UDP | Asterisk RTP Voice Streams (Audio Packets) | Required / Zorunlu |
| 5060 | UDP / TCP | SIP Hardware Desk Phones & Telecom Trunks | Optional (If using hardware SIP) |
| 5061 | TCP | SIP TLS (Encrypted desk phones) | Optional |
| 5038 | TCP | Asterisk Manager Interface (AMI - Web Portal) | NO (127.0.0.1 Local Only) |