How To Install FreePBX 16 on Debian 11 – Debian 10 FreePBX is a web-based open source GUI (graphical user interface) that controls and manages Asterisk (PBX). This tutorial will help you to Install FreePBX 16 on Debian 11 / Debian 10 Linux system. A pre-requisite for this setup is Asterisk Server that has been installed, configured and confirmed to be running:
Step 1: Install MariaDB Database server
Run the commands below to install
sudo apt update
sudo apt -y install mariadb-server mariadb-client
Step 2: Installing Node.js on Debian
FreePBX has Node.js as a dependency, install it on your system by using the commands below:
sudo apt install nodejs npm
Check the version of Node.js installed:
$ node --version
v12.22.5
Step 3: Install and configure Apache Web Server
Install apache2 package from apt:
sudo apt -y install apache2
Then change Apache user to asterisk
and turn on AllowOverride
option :
sudo cp /etc/apache2/apache2.conf /etc/apache2/apache2.conf_orig
sudo sed -i 's/^\(User\|Group\).*/\1 asterisk/' /etc/apache2/apache2.conf
sudo sed -i 's/AllowOverride None/AllowOverride All/' /etc/apache2/apache2.conf
Remove default index.html
page
sudo rm -f /var/www/html/index.html
sudo unlink /etc/apache2/sites-enabled/000-default.conf
Step 4: Install PHP and required extensions
Add APT repository configuration dependencies:
sudo apt install -y lsb-release ca-certificates apt-transport-https software-properties-common gnupg2
Add the PHP packages APT repository to your Debian server.
echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/sury-php.list
Import repository key:
wget -qO - https://packages.sury.org/php/apt.gpg | sudo apt-key add -
Remove any current version of PHP installed:
sudo apt remove php*
FreePBX is dependent on PHP, run the following commands to install php and required extensions.
sudo apt install php7.4-{mysql,cli,common,imap,ldap,xml,fpm,curl,mbstring,zip,gd,gettext,xml,json}
Install PHP Apache module:
sudo apt install libapache2-mod-php7.4
Update PHP variables
sudo sed -i 's/\(^upload_max_filesize = \).*/\120M/' /etc/php/7.4/apache2/php.ini
sudo sed -i 's/\(^upload_max_filesize = \).*/\120M/' /etc/php/7.4/cli/php.ini
sed -i 's/\(^memory_limit = \).*/\1256M/' /etc/php/7.4/apache2/php.ini
Step 5: Install FreePBX 16 on Debian 11 / Debian 10
Install the following packages.
sudo apt install sox mpg123 lame ffmpeg sqlite3 git unixodbc dirmngr postfix odbc-mariadb pkg-config libicu-dev
Configure ODBC:
sudo tee /etc/odbcinst.ini<<EOF
[MySQL]
Description = ODBC for MySQL (MariaDB)
Driver = /usr/lib/x86_64-linux-gnu/odbc/libmaodbc.so
FileUsage = 1
EOF
sudo tee /etc/odbc.ini<<EOF
[MySQL-asteriskcdrdb]
Description = MySQL connection to 'asteriskcdrdb' database
Driver = MySQL
Server = localhost
Database = asteriskcdrdb
Port = 3306
Socket = /var/run/mysqld/mysqld.sock
Option = 3
EOF
Download the latest version of FreePBX 16 on Debian 11 / Debian 10:
sudo apt -y install wget
wget http://mirror.freepbx.org/modules/packages/freepbx/7.4/freepbx-16.0-latest.tgz
Extract the file:
tar xfz freepbx-16.0-latest.tgz
rm -f freepbx-16.0-latest.tgz
Install FreePBX 16 on Debian 11 / Debian 10
cd freepbx
sudo systemctl stop asterisk
sudo ./start_asterisk start
sudo ./install -n
If you have a root password for database server, use:
sudo ./install -n --dbuser root --dbpass password
Replace password with the root database password.
Sample installation output:
Done. All modules installed.
Updating Hooks...Done
Done installing modules
Taking too long? Customize the chown command, See http://wiki.freepbx.org/display/FOP/FreePBX+Chown+Conf
Setting Permissions...
Setting base permissions...Done
Setting specific permissions...
32451 [============================]
Finished setting permissions
Generating default configurations...
Finished generating default configurations
You have successfully installed FreePBX
Install all Freepbx modules
sudo fwconsole ma disablerepo commercial
sudo fwconsole ma installall
sudo fwconsole ma delete firewall
sudo fwconsole reload
sudo fwconsole restart
Enable Apache Rewrite engine and restart apache2.
sudo a2enmod rewrite
sudo systemctl restart apache2
If you have an active ufw firewall, open http & https ports
sudo ufw allow proto tcp from any to any port 80,443
You have successfully installed FreePBX on Debian Linux server.
Create FreePBX systemd (startup script)
Create a systemd unit for auto-starting the service:
sudo tee /etc/systemd/system/freepbx.service<<EOF
[Unit]
Description=FreePBX VoIP Server
After=mariadb.service
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/sbin/fwconsole start -q
ExecStop=/usr/sbin/fwconsole stop -q
[Install]
WantedBy=multi-user.target
EOF
Enable the service to autostart
sudo systemctl daemon-reload
sudo systemctl enable freepbx
Step 6: Access FreePBX Web Interface
Open your web browser and connect to the ip_address_or_hostname/admin of your new FreePBX server.
1.
Create the first admin account

When done providing admin user details, click “Create Account” to create the account. On the next page, you’ll get a login console.

You’ll get to FreePBX dashboard where you can manage your Asterisk PBX.

You now have FreePBX 16 running on Debian 11 / Debian 10 system.
- How to Install FreePBX 15 on Debian 10 with Asterisk 16, PHP 7.3
- How to Install FreePBX 16 on CentOS 7 / RHEL 7
- How To Install Python 3.11 on Ubuntu 22.04 |20.04 | 18.04
- How To Remove Bitnami Corner Banner From WordPress on Google Cloud
- How to Install and Configure OpenLDAP Server on Rocky Linux 8 / AlmaLinux 8
About Me:I'm the digital marketing specialist, competent in SEO (Google, Yahoo & Bing), Google Adwords (Search, Display, Google Shopping etc.), Facebook & Instagram Advertising etc. I can work in all platforms of digital marketing & advertise the legitimate products/services in a specific country, city or all over the world.
Request a free quote
We offer professional SEO services that help websites increase their organic search score drastically in order to compete for the highest rankings even when it comes to highly competitive keywords.
About us and this blog
We are a digital marketing company with a focus on helping our customers achieve great results across several key areas.
Subscribe to our newsletter!
Recent Posts
- Digital Marketing Tips and Tricks: Boost Your Online Presence
- Unlocking the Power of Backlinks: A Guide to Boosting Your Website’s Visibility and Authority
- Unlocking the SEO Benefits of Backlinks: A Comprehensive Guide
- Backlinks 101: Everything You Need to Know to Improve Your SEO
- Understanding the Rel Nofollow Attribute and How to Use It for SEO
- The Power of Backlinks: How Incoming Hyperlinks Impact Website Ranking
- Boost Your Website’s Ranking with High-Quality Backlinks
- The Power of Backlinks: How Incoming Links Can Skyrocket Your Website ‘s Ranking!
- Keyword Research: A Complete Guide to Identify and Analyze Keywords
- Off-page SEO: The Practice of Optimizing External Web Pages to Improve Website Rankings
- On-page SEO: The Practice of Optimize Individual Web Pages to Rank Higher in Search Engines
- How Much Does TikTok Pay per View, Likes, and Follower?