How to Install FreePBX on a VPS

FreePBX is a widely-used, open-source web interface built on top of Asterisk — making PBX configuration dramatically more approachable than editing raw Asterisk configuration files directly.

Prerequisites

  • Ubuntu 22.04/24.04 VPS: 2 vCPU, 4 GB RAM
  • Apache or Nginx, PHP, MariaDB
  • Asterisk (FreePBX installs and manages this, or can integrate with an existing installation)

Step 1 — Install Required Dependencies

sudo apt install apache2 mariadb-server php php-cli php-mysql php-gd php-curl php-xml php-mbstring sox -y

Step 2 — Set Up the Database

sudo mysql
CREATE DATABASE asterisk;
CREATE DATABASE asteriskcdrdb;
CREATE USER 'asteriskuser'@'localhost' IDENTIFIED BY 'CHANGE_ME_STRONG_PASSWORD';
GRANT ALL PRIVILEGES ON asterisk.* TO 'asteriskuser'@'localhost';
GRANT ALL PRIVILEGES ON asteriskcdrdb.* TO 'asteriskuser'@'localhost';
FLUSH PRIVILEGES;

Step 3 — Download FreePBX

cd /usr/src
sudo wget http://mirror.freepbx.org/modules/packages/freepbx/freepbx-VERSION-latest.tgz
sudo tar xvfz freepbx-*-latest.tgz

Step 4 — Run the FreePBX Installer

cd freepbx
sudo ./start_asterisk start
sudo ./install -n

-n runs a non-interactive install using default settings; omit for an interactive setup with more control over configuration choices.

Step 5 — Access the Web Interface

http://YOUR_SERVER_IP

Create your administrator account on first visit.

Step 6 — Add HTTPS

sudo certbot --apache -d yourdomain.com

Step 7 — Configure Firewall Rules

sudo ufw allow 80/tcp
sudo ufw allow 443/tcp
sudo ufw allow 5060/udp
sudo ufw allow 10000:20000/udp

Creating Your First Extension

Under Applications → Extensions, add a new extension, configure a secure password, and note the connection details for configuring a SIP phone or softphone app.

Setting Up Call Routing (Dialplan) Visually

FreePBX's Applications menu lets you configure IVR menus, ring groups, and call routing through a graphical interface, rather than hand-editing Asterisk's dialplan syntax directly — the main convenience FreePBX provides over raw Asterisk.

Installing Additional Modules

Under Admin → Module Admin, browse and install additional FreePBX modules for extended functionality (call recording, reporting, and more).

Securing FreePBX

See How to Secure a VoIP Server Against Toll Fraud — critically important, since FreePBX's ease of configuration also means misconfiguration mistakes are easier to make.

Common Errors

Installer fails at the database step — verify MariaDB is running and the database/user created in Step 2 exactly match what's referenced during installation.

Web interface shows a blank page — check Apache/PHP error logs; often a missing PHP extension or a permissions issue on FreePBX's web directory.

Continue Reading

Browse more articles in VoIP & Communication Servers.

  • freepbx installation, freepbx vps, pbx web interface, freepbx setup
  • 0 istifadəçi bunu faydalı hesab edir
Bu cavab sizə kömək etdi?

Uyğun məqalələr

How to Install Asterisk PBX on a VPS

Asterisk is the foundational open-source telephony engine powering most self-hosted PBX systems...

How to Set Up SIP Trunking for Your PBX

A SIP trunk connects your self-hosted PBX to the public telephone network, letting you make and...

How to Configure Extensions and Voicemail in Asterisk

Extensions are the individual phone lines within your PBX system, and voicemail lets callers...

How to Secure a VoIP Server Against Toll Fraud

An unsecured VoIP server is a common target for toll fraud — attackers who compromise weak...

How to Set Up an IVR (Interactive Voice Response) Menu

An IVR menu greets callers with recorded prompts and routes them based on their keypad selections...