This article provides a guide for how to install and deploy FusionPBX on Debian VPS. Installing FusionPBX on a Debian Virtual Private Server (VPS) provides a robust platform for managing Voice over IP (VoIP) communications. FusionPBX offers an intuitive web interface for managing FreeSWITCH, an open-source telephony platform.
This guide is designed for system administrators and IT professionals looking to set up FusionPBX on Debian. Here’s a step-by-step guide on how to do it.
How to Install and Deploy FusionPBX on Debian VPS
Pre-requisites
Before you begin, ensure you have the following:
- A Debian VPS (Debian 11 or 12 is recommended).
- Root access to the VPS.
- Basic knowledge of Linux commands and networking.
Step 1: System Update and Preparation
- Connect to your VPS: Use SSH to connect to your server as the root user.
ssh root@your-vps-ip
- Update your system to ensure all packages are up to date:
apt update && apt upgrade -y
Step 2: Install Required Dependencies
FusionPBX depends on various packages, including Nginx, PHP, and PostgreSQL. Install these by running:
apt install -y nginx php php-fpm php-cli php-pgsql php-sqlite3 postgresql postgresql-contrib
Step 3: Install FusionPBX
- Download FusionPBX:
cd /usr/src git clone https://github.com/fusionpbx/fusionpbx.git
- Set file permissions for the web directory:
cp -R fusionpbx /var/www/html chown -R www-data:www-data /var/www/html/fusionpbx
Step 4: Configure Nginx
- Create an Nginx configuration file for FusionPBX:
nano /etc/nginx/sites-available/fusionpbx
Insert the following configuration:
server { listen 80; server_name your-domain.com; root /var/www/html/fusionpbx; index index.php; location / { try_files $uri $uri/ /index.php?$query_string; } location ~ \.php$ { include snippets/fastcgi-php.conf; fastcgi_pass unix:/var/run/php/php7.4-fpm.sock; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } }
Replace
php7.4-fpm.sock
with the PHP version installed on your server. - Enable the site by linking the configuration file:
ln -s /etc/nginx/sites-available/fusionpbx /etc/nginx/sites-enabled/
- Test Nginx configuration and restart the service:
nginx -t systemctl restart nginx
Step 5: Configure PostgreSQL
- Switch to the PostgreSQL user:
su - postgres
- Create a new PostgreSQL role and database:
createuser fusionpbx -P --interactive createdb fusionpbx -O fusionpbx
Enter a password when prompted.
- Exit the PostgreSQL user session:
exit
Step 6: Install and Configure FreeSWITCH
- Install FreeSWITCH:
apt install -y freeswitch-meta-all
- Configure FreeSWITCH:
Edit the default configuration to integrate with FusionPBX.nano /etc/freeswitch/freeswitch.xml
Modify the settings according to your requirements.
Step 7: Finalizing FusionPBX Setup
- Navigate to your FusionPBX web installation by entering
http://your-domain.com
in your browser. - Follow the web installer steps to configure FusionPBX with the database credentials created earlier.
- Complete the setup wizard, which will guide you through setting up users, extensions, and initial settings.
Step 8: Secure Your Installation
- Configure a firewall using UFW or a similar tool.
apt install ufw ufw allow 22/tcp ufw allow 80/tcp ufw allow 443/tcp ufw enable
- Set up HTTPS using Let’s Encrypt for secure connections:
apt install certbot python3-certbot-nginx certbot --nginx -d your-domain.com
Conclusion
You have now successfully installed and configured FusionPBX on a Debian VPS. The system is ready for further customization and use in your VoIP projects. Make sure to regularly update your server and FusionPBX installation to keep it secure.
[…] How to Install and Deploy FusionPBX on Debian VPS […]