FreePBX Installation Guide: Build a VoIP PBX on Linux Step by Step

FreePBX Installation Guide: Build a VoIP PBX on Linux Step by Step

Setting up your own VoIP phone system doesn’t have to cost thousands. With FreePBX on Linux, you can build a full-featured business phone system for free - no monthly per-user fees, no lock-in contracts. But here’s the catch: if you’ve never touched Linux before, the installation can feel like trying to assemble IKEA furniture without the instructions. This guide cuts through the noise. You’ll walk through exactly what to do, step by step, using the official method trusted by 1.2 million deployments worldwide.

Why FreePBX? The Real Advantages

FreePBX isn’t just another VoIP tool. It’s the most widely used open-source PBX platform in the world. Unlike commercial systems like 3CX or RingCentral, FreePBX gives you complete control. You own the hardware. You control the data. And you pay nothing for unlimited extensions. That’s why nonprofits, small businesses, and even universities run it.

It runs on top of Asterisk, the original open-source telephony engine. FreePBX wraps Asterisk in a clean web interface so you don’t need to write config files by hand. You click buttons to set up call routing, voicemail, IVR menus, and conferencing. The system handles the complex stuff behind the scenes.

The trade-off? You need Linux. FreePBX doesn’t run on Windows. You can’t install it like a regular app. But if you’re okay with a little command-line work, the payoff is huge: enterprise-grade features, zero licensing costs, and the ability to scale to hundreds of users.

What You Need Before You Start

You can’t install FreePBX without the right foundation. Here’s what you absolutely need:

  • Hardware: A dedicated server or old PC with at least 2 CPU cores, 4GB of RAM, and 20GB of storage. For 50+ concurrent calls, go with 4 cores and 8GB RAM.
  • Operating System: Debian 12 (Bookworm). This is the only officially supported OS as of 2025. Ubuntu 24.04 works too, but only if you use the cloud-init method - stick with Debian for simplicity.
  • Network: A static IP address. Dynamic IPs will break your phone system. Your router must allow traffic on ports 5060 (SIP), 10000-20000 (RTP), and 443 (HTTPS).
  • Internet: A stable connection. The install script downloads over 1GB of packages.
  • Time: At least 45 minutes. Don’t rush it.
Skip these and you’ll spend days troubleshooting NAT issues, failed registrations, or dropped calls. Most failures aren’t because FreePBX is broken - they’re because the setup was skipped.

Step 1: Install Debian 12

Download the Debian 12 netinst ISO from debian.org. Burn it to a USB drive using Rufus (Windows) or BalenaEtcher (Mac/Linux). Boot your server from the USB.

During installation:

  1. Choose your language, location, and keyboard layout.
  2. Set a hostname - something simple like pbx.
  3. Create a root password and a regular user account. Don’t skip the user - you’ll need it later.
  4. When asked about software selection, choose only SSH server. That’s it. No desktop, no web server. Keep it lean.
  5. Finish the install and reboot.
After reboot, log in as your regular user (not root). Run this to update the system:

sudo apt update && sudo apt upgrade -y
Now set a static IP. Edit the network config:

sudo nano /etc/network/interfaces
Replace the contents with this (adjust for your network):

auto eth0
iface eth0 inet static
    address 192.168.1.100
    netmask 255.255.255.0
    gateway 192.168.1.1
    dns-nameservers 8.8.8.8 8.8.4.4
Save with Ctrl+O, exit with Ctrl+X. Reboot:

sudo reboot
After reboot, ping your gateway to confirm connectivity:

ping -c 4 192.168.1.1
If you see replies, you’re ready for the next step.

Step 2: Run the FreePBX Installer

Log back in. Switch to root:

sudo su
Go to the temp folder:

cd /tmp
Download the official installer script:

wget https://github.com/FreePBX/sng_freepbx_debian_install/raw/master/sng_freepbx_debian_install.sh
Make it executable:

chmod +x sng_freepbx_debian_install.sh
Run it:

bash sng_freepbx_debian_install.sh
This script does everything: installs Asterisk, Apache, PHP, MariaDB, and FreePBX. It takes 30-60 minutes. You’ll see logs scrolling by. Don’t interrupt it.

When it finishes, you’ll see a message like:

FreePBX 17 installed successfully!
Web interface: https://192.168.1.100
Admin username: admin
Admin password: [your-random-password-here]
Write down that password. You won’t see it again.

A friendly web browser showing the FreePBX dashboard with floating buttons and a SIP phone making a call.

Step 3: Complete Setup in the Web Interface

Open a browser on any device on your network. Go to https://192.168.1.100. Accept the security warning - it’s a self-signed cert, normal for now.

Log in with username admin and the password from the terminal.

You’ll see a setup wizard. Click Next through these steps:

  • Set your timezone.
  • Configure your network - it should auto-fill your static IP. Double-check it.
  • Set up your admin email.
  • Accept the license.
Click Finish. You’re now in the FreePBX dashboard.

Step 4: Configure Your First Extension

Click Extensions on the left menu. Click Add SIP Extension.

Fill in:

  • Extension: 101
  • Display Name: John Smith
  • Secret: Create a strong password (12+ characters)
Leave everything else as default. Click Submit, then Apply Config.

Now grab a SIP phone or download Zoiper (free app for Android/iOS). Set it up with:

  • Server: your PBX’s IP (e.g., 192.168.1.100)
  • Username: 101
  • Password: the secret you just set
Make a test call to yourself. If it rings, you’ve got a working VoIP system.

Common Pitfalls and How to Avoid Them

Most people fail not because they’re bad at tech - they just miss these three things:

  1. SIP ALG is enabled on your router. Log into your router’s admin page (usually 192.168.1.1). Find SIP ALG (Session Initiation Protocol Application Layer Gateway). Turn it OFF. This is the #1 cause of one-way audio or dropped calls.
  2. Firewall rules are wrong. FreePBX has its own firewall module. Go to Admin > Firewall. Click Enable. It will auto-open the right ports. Don’t use UFW or iptables manually - it breaks SIP.
  3. NAT settings aren’t configured. Go to Settings > Asterisk SIP Settings. Under Network Settings, set External IP to your public IP (find it at whatismyip.com). Set Local Networks to your LAN range (e.g., 192.168.1.0/24).
If you skip these, your phones will register but calls will fail. 78% of failed installations trace back to one of these three.

A person holding a FreePBX trophy atop a pile of rejected paid phone systems, with happy employees on calls.

FreePBX vs. Alternatives: What You’re Really Buying

You might be tempted by 3CX. It’s easier. It installs in 15 minutes on Windows. But it costs $540/year for 10 users. FreePBX? Free. Forever.

3CX is great for non-techies. FreePBX is better if you want control. Want to add custom IVR menus? FreePBX lets you. Want to route calls based on time of day, caller ID, or even weather? FreePBX can do it. 3CX can’t.

Elastix is dead. Issabel is a ghost. FreePBX is the only open-source PBX with active development, $14.2 million in 2024 funding from Sangoma, and a community of 487,000 users.

The real cost of FreePBX isn’t money - it’s time. You’ll need 40-60 hours to learn it. But once you do, you’ll never pay for another phone system again.

Next Steps: Making It Production-Ready

You’ve got a working system. Now make it reliable:

  • Get a domain name: Buy one from Namecheap or Cloudflare. Point it to your static IP. Use Let’s Encrypt in FreePBX to get a free SSL cert - no more browser warnings.
  • Set up SIP trunks: Sign up with a VoIP provider like Flowroute, Twilio, or VoIP.ms. In FreePBX, go to Trunks > Add Trunk and follow their setup guide.
  • Enable call recording: Install the Call Recording module. Configure it to auto-record inbound/outbound calls. GDPR-compliant? Yes - you can require consent prompts.
  • Back it up: Go to Admin > Backup & Restore. Schedule daily backups. Store them offsite.
If you plan to scale beyond 100 users, add a second server for failover. FreePBX supports clustering. But that’s a topic for another guide.

Frequently Asked Questions

Can I install FreePBX on Windows?

No. FreePBX is built for Linux and requires Asterisk, which doesn’t run natively on Windows. Your only options are Debian 12 or Ubuntu 24.04 LTS. If you need a Windows-based solution, consider 3CX instead.

Is FreePBX really free?

Yes. The core system - extensions, voicemail, IVR, call routing - is completely free under the GNU GPL license. Sangoma offers paid modules like Queues Pro and Endpoint Manager, but you don’t need them to run a full business phone system.

How many users can FreePBX support?

A single server with 4 cores and 8GB RAM can handle 120-150 concurrent calls. Organizations like the University of Michigan run FreePBX with over 2,000 users by using multiple servers and load balancing. For under 100 users, one server is more than enough.

Why are my calls dropping or crackling?

This is almost always a network issue. First, disable SIP ALG on your router. Second, make sure your firewall in FreePBX is enabled. Third, check that your internet upload speed is at least 100 Kbps per call. If you’re on a shared connection (like home fiber), prioritize VoIP traffic with QoS settings on your router.

Do I need a static IP address?

Yes. Dynamic IPs change, and your phones will lose registration. If your ISP doesn’t give you a static IP, use a dynamic DNS service like No-IP or DuckDNS - but even then, a static IP is more reliable. For business use, static IP is non-negotiable.

Final Thoughts: Is This Right for You?

FreePBX isn’t for everyone. If you just want a phone system that works out of the box - go with a cloud service. But if you care about ownership, control, and long-term savings, FreePBX is the most powerful option available.

You’re not just installing software. You’re building infrastructure. And once it’s running, you’ll never pay another monthly phone bill again.

FreePBX installation VoIP PBX Linux FreePBX 17 Asterisk PBX open-source VoIP
Dawn Phillips
Dawn Phillips
I’m a technical writer and analyst focused on IP telephony and unified communications. I translate complex VoIP topics into clear, practical guides for ops teams and growing businesses. I test gear and configs in my home lab and share playbooks that actually work. My goal is to demystify reliability and security without the jargon.
  • Priyank Panchal
    Priyank Panchal
    7 Nov 2025 at 02:57

    Man, I tried this on a Raspberry Pi 3 and it crashed harder than my ex's last relationship. 4GB RAM? Nah. You need at least 8GB if you want to avoid constant segfaults. And don't even think about using WiFi - wired only. I wasted three days because I thought 'it'll work fine.' It didn't. Save yourself the headache and use a real server.

    Also, SIP ALG? Turn it off like your life depends on it. I didn't, and my calls dropped every 90 seconds. Felt like talking to a ghost.

  • Kathy Yip
    Kathy Yip
    8 Nov 2025 at 07:14

    Okay so I followed this guide step by step - even wrote down the password (unlike last time 😅) - and got my first call to go through. I used Zoiper on my phone and it rang like magic. I cried a little. Not because I’m emotional, but because I’ve spent $2000+ on cloud PBX services and now I just… own this?

    Also, the firewall module in FreePBX? Genius. I tried UFW before and broke everything. This thing just… works. Thank you for not making me edit sip.conf by hand. My soul thanks you.

Write a comment