Deployment Overview of FreePBX on Server¶
Prerequisites and Basic Requirements¶
The deployment requires a server running the Debian operating system. The following requirements must be met for a successful installation:
-
Operating System: Debian 12 (or compatible Debian versions).
-
Privileges: Root or sudo access is required to execute installation scripts and manage services.
-
Network Access: Outbound access to
deb.debian.organd GitHub is required to download packages and the installation script. -
Ports:
-
443/tcp: External HTTPS access via Nginx proxy. -
3000/tcp: Internal application traffic.
FQDN of the final panel on the hostkey.in domain¶
The application is assigned a Fully Qualified Domain Name (FQDN) based on the server ID and a predefined prefix.
| Parameter | Value |
|---|---|
| Prefix | freepbx |
| Domain | hostkey.in |
| Full template | freepbx{Server_ID}.hostkey.in |
Application installation process¶
The installation follows a multi-stage process involving system preparation and an automated installer:
-
System Preparation: The APT package manager is updated, and the Debian mirror is set to
deb.debian.org. Essential utilities includingwgetandcurlare installed. -
Hostname Configuration: The system hostname is set to the calculated FQDN, and the
/etc/hostsfile is updated to ensure local resolution of the FQDN. -
Installer Execution: A dedicated installation script for FreePBX 17 on Debian 12 is downloaded from GitHub and executed. This process installs all necessary dependencies and core components.
-
Post-Installation Configuration: After a mandatory system reboot, the
fwconsole chowncommand is executed to ensure correct file ownership for the application services.
Access Rights and Security¶
Security is managed through several layers:
-
SSL/TLS: Let's Encrypt certificates are automatically generated via
fwconsoleusing the server's FQDN. These certificates are stored in/etc/asterisk/keys/. -
Web Server Security: The Apache configuration is updated to use the newly generated Let's Encrypt certificates instead of default self-signed certificates.
-
Permissions: Application files and directories are managed using
fwconsolecommands to ensure correct ownership by theasteriskuser.
Docker Containers and Their Deployment¶
The deployment utilizes a Docker container to manage SSL certificates and Nginx proxying.
Nginx Certbot Container¶
-
Image Name:
jonasal/nginx-certbot:latest -
Network Mode:
host -
Restart Policy:
unless-stopped -
Environment Variables:
-
Volumes:
-
nginx_secrets:/etc/letsencrypt(External volume for certificate persistence) -
/data/nginx/user_conf.d:/etc/nginx/user_conf.d(Configuration mapping)
Custom Scripts and Additional Setup¶
Several automated actions are performed to finalize the environment:
-
Installation Log: All output from the main installation script is captured in
/root/freepbx-install.log. -
Certificate Integration: The system automatically identifies the newly generated Let's Encrypt certificate ID, sets it as the default for FreePBX, and runs
fwconsole reloadto apply changes across all integrations. -
Proxy Configuration: A configuration file is managed in
/data/nginx/user_conf.d/that directs incoming traffic from port 443 to the internal application service running on127.0.0.1:3000.
Application Update Instructions¶
To update the main FreePBX application, follow these steps:
- Manual Update: Since this is a direct installation on Debian (not via Docker), updates should be performed using the standard system package management tools or by re-running the official FreePBX installation script to ensure all dependencies and configurations are synchronized.
Location of configuration files and data¶
The following paths contain critical application data and configurations:
-
SSL Certificates:
/etc/asterisk/keys/ -
Nginx User Configurations:
/data/nginx/user_conf.d/ -
Installation Logs:
/root/freepbx-install.log -
Apache SSL Configuration:
/etc/apache2/sites-available/default-ssl.conf
Available ports for connection¶
| Port | Protocol | Description |
|---|---|---|
443 | TCP | Secure Web Interface (via Nginx Proxy) |
3000 | TCP | Internal Application Service |