FAQ
Why does the container need privileged: true?
Because it runs systemd as PID 1, and systemd needs privileges Docker doesn’t grant by default (managing
cgroups, mounting filesystems, controlling devices) to supervise the services FreePBX depends on — Apache,
MariaDB, Asterisk. Without it, /sbin/init won’t boot cleanly inside the container. See
Introduction for the trade-off this implies.
Why isn’t FreePBX installed automatically when I build the image?
Sangoma’s install script assumes it’s running on an already-booted system with a working init system
managing services — that’s only true once the container is actually running, not while docker build is
assembling layers. So the build stage only prepares the environment (Debian + systemd + the script itself);
you run the installer yourself after docker-compose up -d. See Usage for the exact steps.
Why --skipversion?
It skips the install script’s own version-freshness check, which otherwise tries to compare against the latest script on GitHub — noisy and unnecessary for a container image that’s already pinned to a known-good script.
Where does my FreePBX data actually live?
In three named Docker volumes: freepbx_www (/var/www/html, the web app), freepbx_etc
(/etc/asterisk, Asterisk config), and mysql_data (/var/lib/mysql, the database). As long as those
volumes aren’t removed, you can recreate the container without losing configuration, extensions, or CDRs.
Can I run this without --privileged?
Not with this setup as-is — the whole approach relies on running FreePBX’s official installer more or less the way it expects to run on a real host, which means a real init system with real privileges. A rootless or unprivileged setup would mean reimplementing what the installer does as discrete container processes instead of relying on it directly, which is a fundamentally different (and much larger) project.
The install script only supports Debian 12 — what happens on other bases?
It exits immediately: sng_freepbx_debian_install.sh explicitly checks VERSION_CODENAME/
/etc/debian_version and refuses to continue on anything other than bookworm. Don’t change the
Dockerfile’s FROM debian:bookworm line without expecting the install step to fail.
Is this an officially supported way to run FreePBX?
No — Sangoma doesn’t officially support or publish a Docker deployment path for FreePBX. This project runs their unmodified install script inside a container built to look enough like a real Debian host for it to work, but it’s a community approach, not an official one. Treat upgrades and troubleshooting accordingly (the FreePBX Community Forum is the right place for issues with the installer/FreePBX itself, as the script’s own output points out).
What’s the docker file at the repo root?
A standalone reset script, unrelated to building or running FreePBX — see Usage. It stops/removes all Docker containers and images on the host, not just this project’s, so only run it if that’s actually what you want.