A comprehensive Docker solution for FusionPBX, providing a complete VoIP platform with all necessary components pre-configured and ready to deploy.
Stack: Ubuntu 20.04 β’ FusionPBX 5.2 β’ FreeSWITCH 1.10.9 β’ PHP 7.4 β’ PostgreSQL 12
- FusionPBX Install Scripts: github.com/fusionpbx/fusionpbx-install.sh
- Docker Hub Repository: hub.docker.com/repository/docker/michaelfangtw/fusionpbx-docker-dev
- ποΈ Software Stack
- π¦ Included Services
- π Quick Start
- π Project Structure
- π Default Credentials
- π Network Configuration
- πΎ Data Persistence
- βοΈ Requirements
- π§ Troubleshooting
- π Additional Resources
- π€ Contributing
- π License
| Component | Version |
|---|---|
| Base OS | Ubuntu 20.04 |
| FusionPBX | 5.2 |
| FreeSWITCH | 1.10.9 |
| PHP | 7.4 |
| PostgreSQL | 12 |
The Docker image includes the following pre-configured services:
- iptables - Firewall management
- sngrep - SIP packet capture tool
- fusionpbx - Web-based PBX system
- php - PHP runtime
- nginx - Web server
- postgres - Database server
- freeswitch - Voice over IP platform
- fail2ban - Intrusion prevention system
Set the proper ownership for the config directory:
sudo chown 33:33 config -Rπ‘ Note: The
srcdirectory contains the complete FusionPBX installer source code, allowing for customization and transparency in the build process.
Pull the latest image from Docker Hub:
docker pull michaelfangtw/fusionpbx-docker-dev:5.2If you want to build the image locally: you can change password in config.sh
docker build -t fusionpbx-docker-dev:5.2 .The docker-compose.yaml file is already configured. Choose your preferred method:
- 1. Pre-built image (default): Uses
michaelfangtw/fusionpbx-docker-dev:5.2 - 1. Local build: Uncomment the
buildsection in the compose file
services:
pbx:
# 1. Use pre-built image from Docker Hub
image: michaelfangtw/fusionpbx-docker-dev:5.2
# 2. Or build locally (uncomment to use)
# build:
# context: .
# 3. Or build locally (uncomment to use)
# image: fusionpbx-docker-dev:5.2
# Host networking for RTP port range
network_mode: "host"
container_name: fusionpbx
restart: always
privileged: true
# Persist configuration
volumes:
- ./config/fusionpbx:/etc/fusionpbx
entrypoint: ["/usr/sbin/init"]docker compose up -dOnce the container is running, access FusionPBX at:
- URL: http://localhost
- Username:
admin@localhost - **vi **:
password* dont forget to change password *
fusionpbx-docker-dev/
βββ config/ # Configuration files
β βββ fusionpbx/ # FusionPBX configuration
βββ src/ # Source code and installers
β βββ fusionpbx-install.sh/ # Official FusionPBX installer scripts
β βββ centos/ # CentOS installation scripts
β βββ debian/ # Debian installation scripts
β βββ devuan/ # Devuan installation scripts
β βββ freebsd/ # FreeBSD installation scripts
β βββ ubuntu/ # Ubuntu installation scripts
β βββ windows/ # Windows installation scripts
βββ docker-compose.yaml # Docker Compose configuration
βββ Dockerfile # Docker image definition
βββ README.md # Documentation
π Note: The
src/fusionpbx-install.shdirectory contains the complete official installer with platform-specific scripts and resources for various operating systems.
- URL: http://localhost
- Username:
admin@localhost - Password:
password* dont forget to change password *
β οΈ IMPORTANT: Do not change these credentials - they are required for proper operation
- Host:
localhost - User:
fusionpbx - Password:
password* don't forget to change your password *
This container uses host networking mode to properly handle RTP traffic for VoIP communications. This means:
- All services are accessible on the host's network interface
- No port mapping is required
- FreeSWITCH can properly handle media streams
Configuration data is persisted through Docker volumes:
| Host Path | Container Path | Description |
|---|---|---|
./config/fusionpbx |
/etc/fusionpbx |
FusionPBX configuration files |
- Docker Engine: 20.10+
- Docker Compose: v2.0+
- Operating System: Linux (required for host networking mode)
If you can't access the web interface at http://localhost:
-
Check container status:
docker ps
-
View container logs:
docker logs fusionpbx
-
Check port availability:
sudo netstat -tulpn | grep :80
If you cannot log in to the web interface:
-
Access the container:
docker exec -it fusionpbx /bin/bash -
Backup existing configuration:
mv /etc/fusionpbx/config.conf /etc/fusionpbx/config.conf.old
-
Reset admin credentials:
http://localhost 1.reset admin id=admin pass=password * don't forget to change your password * domain:localhost postgresq db host:localhost port:5432 id=fusionpbx pass=password * don't forget to change your password *
-
Use default credentials:
- Username:
admin - Password:
password* don't forget to change your password *
- Username:
If you encounter database-related login failures:
-
Access the container:
docker exec -it fusionpbx /bin/bash -
Navigate to resources directory:
cd /src/fusionpbx-install.sh/ubuntu/resources -
Recreate the database:
./postgresql.sh # Create database ./finish.sh # Set admin credentials
To preserve modifications made inside the container:
# Make changes inside the container
docker exec -it fusionpbx /bin/bash
# ... perform your modifications ...
# Exit the container
# Commit changes to create a new image
TAG=5.2
docker tag fusionpbx-docker:$TAG michaelfangtw/fusionpbx-docker:$TAG
docker login
docker push michaelfangtw/fusionpbx-docker:$TAG# Real-time logs
docker logs -f fusionpbx
# Last 100 lines
docker logs --tail 100 fusionpbxdocker restart fusionpbx- FusionPBX Official Documentation
- FusionPBX Install Scripts
- FreeSWITCH Documentation
- Docker Hub Repository
This project includes the complete FusionPBX installer source code in the src/ directory for transparency and customization. Feel free to submit issues and pull requests.
This project follows the same licensing as the original FusionPBX project. Please refer to the official FusionPBX repository for license details.