Guides

How to Install and Deploy FusionPBX on Debian VPS

Follow our guide to learn how to install and deploy fusionpbx on debian vps servers

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:

Step 1: System Update and Preparation

  1. Connect to your VPS: Use SSH to connect to your server as the root user.
    ssh root@your-vps-ip
    
  2. 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

  1. Download FusionPBX:
    cd /usr/src
    git clone https://github.com/fusionpbx/fusionpbx.git
    
  2. Set file permissions for the web directory:
    cp -R fusionpbx /var/www/html
    chown -R www-data:www-data /var/www/html/fusionpbx
    

Related Post

Step 4: Configure Nginx

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

  2. Enable the site by linking the configuration file:
    ln -s /etc/nginx/sites-available/fusionpbx /etc/nginx/sites-enabled/
    
  3. Test Nginx configuration and restart the service:
    nginx -t
    systemctl restart nginx
    

Step 5: Configure PostgreSQL

  1. Switch to the PostgreSQL user:
    su - postgres
    
  2. Create a new PostgreSQL role and database:
    createuser fusionpbx -P --interactive
    createdb fusionpbx -O fusionpbx
    

    Enter a password when prompted.

  3. Exit the PostgreSQL user session:
    exit
    

Step 6: Install and Configure FreeSWITCH

  1. Install FreeSWITCH:
    apt install -y freeswitch-meta-all
    
  2. 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

  1. Navigate to your FusionPBX web installation by entering http://your-domain.com in your browser.
  2. Follow the web installer steps to configure FusionPBX with the database credentials created earlier.
  3. 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.

Editorial Staff

Rad Web Hosting is a leading provider of web hosting, Cloud VPS, and Dedicated Servers in Dallas, TX and Phoenix, AZ.

Recent Posts

How to Protect Your VPS Against SQL Injection

Cybercriminals often target websites to gain access to valuable user data such as login credentials. This data could then be… Read More

36 mins ago

How to Start a Successful Web Hosting Business

Starting a web hosting business can be an excellent way to generate extra income or profit. But the industry is… Read More

51 mins ago

Launch a FreeBSD 14 VPS Server

This post provides a guide for how to launch a FreeBSD 14 VPS server from Rad Web Hosting. How to… Read More

51 mins ago

Benefits of LiteSpeed Enterprise Web Server

Discussing the benefits of LiteSpeed Enterprise Web Server, LiteSpeed Enterprise Web Server is an easy-to-use, out-of-the-box solution to enhance website… Read More

4 hours ago

Video: How to Install OpenCart on Rad Web Hosting cPanel Account

This OpenCart tutorial provides a guide for how to install OpenCart on Rad Web Hosting cPanel account. Start your ecommerce… Read More

4 hours ago

Top 5 Security Features of Imunify360

Imunify360 is a Linux server security solution designed to safeguard your web-based business against cyber attacks. It includes features like… Read More

4 hours ago