Introduction
What is FreePBX?
FreePBX is an open-source web GUI for Asterisk, the PBX/VoIP engine that underpins it. Asterisk on its own is configured through plain-text dialplan files; FreePBX wraps it in a web interface for managing extensions, trunks, inbound/outbound routes, IVRs, voicemail, and the rest of what a phone system needs, without hand-editing Asterisk config. Version 17 is the current release line, built on Asterisk 22 and PHP 8.2.
What this project is
This repository packages FreePBX 17 to run inside a privileged Docker container on top of Debian 12
(bookworm), using Sangoma’s own official install script
(sng_freepbx_debian_install.sh) — the same script Sangoma ships for bare-metal/VM installs — rather than a
purpose-built container image maintained by a third party.
The container is built with systemd running as PID 1 (/sbin/init), because FreePBX’s installer expects
a full init system to manage the many services it depends on (Asterisk, MariaDB, Apache, nginx, etc.), not
just a single foreground process the way most containers work.
Why it exists
FreePBX doesn’t officially support Docker — Sangoma’s install script assumes a full VM or bare-metal Debian host. The usual alternatives are:
- Running it on a VM, which works fine but carries the overhead of a full virtual machine for something that’s really just a handful of services.
- Third-party FreePBX container images, which exist but are unofficial, may lag behind FreePBX releases, and don’t necessarily track Sangoma’s own install/upgrade path.
This project instead containerizes the official installer itself: a privileged container with systemd gives FreePBX an environment that looks enough like a real Debian host that the unmodified Sangoma script runs successfully, while still getting Docker’s packaging and portability.
Warning
This is not a hardened, minimal container — it’s a privileged container running a full init system and a traditional multi-service Linux install inside it. That’s a deliberate trade-off for compatibility with Sangoma’s installer, not a mistake. Don’t expose it directly to the internet without the same care you’d give a bare-metal PBX (firewalling, fail2ban, strong extension secrets, etc.).