Skip to content

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.org and 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:

  1. System Preparation: The APT package manager is updated, and the Debian mirror is set to deb.debian.org. Essential utilities including wget and curl are installed.

  2. Hostname Configuration: The system hostname is set to the calculated FQDN, and the /etc/hosts file is updated to ensure local resolution of the FQDN.

  3. 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.

  4. Post-Installation Configuration: After a mandatory system reboot, the fwconsole chown command 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 fwconsole using 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 fwconsole commands to ensure correct ownership by the asterisk user.

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:

  • [email protected]

  • 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 reload to 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 on 127.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
question_mark
Is there anything I can help you with?
question_mark
AI Assistant ×