Flexisip + Account Manager on Docker (Ubuntu 22.04)
This is a summary of a forum article about installing the latest version of the Flexisip server on Ubuntu 22.04 by installing the SDK and building from source. For troubleshooting and more detailed information (flexisip.conf, redis.conf and so on), please refer to the forum article (see link below). After building the binary, a new Docker image file for Flexisip is created, which is combined with other Docker image files necessary for operating the Flexisip server to configure the entire system.
Takanobu FuseAdministrator

17 min read

12 months ago


This is a summary of a forum article about installing the latest version of the Flexisip server on Ubuntu 22.04 by installing the SDK and building from source. For troubleshooting and more detailed information (flexisip.conf, redis.conf and so on), please refer to the forum article (see link below). After building the binary, a new Docker image file for Flexisip is created, which is combined with other Docker image files necessary for operating the Flexisip server to configure the entire system.

Docker Flexisip System

  1. Creating a Linphone SDK Docker image
    Creating a Linphone SDK Docker image will help resolve dependencies for Flexisip.

  2. Building Flexisip and creating a DEB package
    Build Flexisip and create a DEB package.

  3. Creating a Flexisip Docker image
    Create a new Docker image file using the binary built for Flexisip.

  4. SSL/TLS authentication procedure with Certbot Docker container
    Obtain an SSL/TLS certificate using a Certbot Docker container.

  5. Preparing for Flexisip Account Manager installation
    Prepare the necessary files for installing Flexisip Account Manager.

  6. Creating a Docker Compose file
    Create a Docker Compose file to configure the Flexisip server.

  7. Starting and operating in containers
    Use Docker Compose to start the Flexisip server and perform any necessary operations inside the container.

Link to related forum article:Linphone-SDK Ubuntu 22.04 Dockerイメージの作成とアプリのビルド(IPv6対応)

1. Creating a Linphone SDK Docker image(Ubuntu 22.04)

To build the Linphone app and Flexisip server within a Linphone SDK Docker container, you will need to create a Linphone SDK Docker image. To do this, you will need to download the docker-files directory from the following source:

$ git clone

Create a new file that is compatible with Ubuntu 22.04 based on the bc-dev-ubuntu-rolling file in the docker-files directory.


FROM ubuntu:22.04

MAINTAINER Takanobu Fuse  [email protected]>

# Configure locale
RUN apt-get update && \
    apt-get install -y locales && \
    apt-get clean && \
    echo "en_US.UTF-8 UTF-8" > /etc/locale.gen && \
ENV TZ=Europe/Paris
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
ARG DEBIAN_FRONTEND=noninteractive

ENV SHELL=/bin/bash
#ENV PS1='\[\e[33m\]\u@bc-dev-ubuntu-22-04-lts>\[\e[0m\] '

# Install common general tools
RUN apt-get update && \
    apt-get install -y nano sudo vim && \
    apt-get clean

# Install development tools
RUN apt-get update && \
    apt-get install -y alien at autoconf bison ccache clang cmake doxygen elfutils g++ gdb git graphviz intltool libtool lsb-release make nasm ninja-build openssh-client patch python3-pip python3-pystache python-six yasm && \
    apt-get clean

# Install linphone & flexisip dependencies development packages
RUN apt-get update && \
    apt-get install -y libasound2-dev libavcodec-dev libavutil-dev libbsd-dev libegl1-mesa-dev libglew-dev libgsm1-dev libjansson-dev libmariadb-dev-compat libmbedtls-dev libopus-dev libpq-dev libprotobuf-dev libpulse-dev libqt5svg5-dev libsnmp-dev libspeex-dev libspeexdsp-dev libsqlite3-dev libsrtp2-dev libssl-dev libswscale-dev libturbojpeg0-dev libv4l-dev libvpx-dev libxerces-c-dev libxml2-dev libxv-dev protobuf-compiler qt3d5-dev qtbase5-dev qtbase5-dev-tools qtchooser qt5-qmake qtconnectivity5-dev qtdeclarative5-dev qtdeclarative5-dev-tools qtdeclarative5-dev-tools qtquickcontrols2-5-dev qttools5-dev qttools5-dev-tools xsdcxx && \
    apt-get clean

# Configure user bc
RUN useradd -ms /bin/bash bc && \
    echo 'bc:cotcot' | chpasswd && \
    echo 'bc ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers

WORKDIR /home/bc
COPY --chown=bc rpmmacros /home/bc/.rpmmacros
CMD bash

Edit Makefike ( add the section of ubutnu 22.04)

	docker build -f bc-dev-ubuntu-22-04-lts -t $(BASE_NAME)/bc-dev-ubuntu:22.04 --rm .

Build( or build directory by docker build command )

$ make ubuntu-22.04-LTS

Confirm Docker Image

$ docker images
REPOSITORY                                                      TAG          IMAGE ID       CREATED          SIZE   22.04        6ee9dee48674   47 minutes ago   2.28GB

Launch a container using the above image in any folder (where you will build Linphone or Flexisip)

$ docker run --name linphone-sdk -v $PWD:/home/bc -it

2. Building Flexisip and creating a DEB package

Start a container from linphone-sdk image.

$ docker run --name linphone-sdk -v $PWD:/home/bc -it

The following is a task to be performed inside a container. Download the source code of flexisip within the container.

$ git clone --recursive

Next, install the necessary packages for building flexisip by referring to the following file, and build and install them.

Additional Packages

$ sudo apt install file llvm libboost-dev libboost-system-dev libboost-thread-dev libhiredis-dev libjsoncpp-dev mariadb-server libnghttp2-dev redis-server

Build and install for the additional package by the scrypt.

$ cd flexisip/docker
$ sudo ./ 1.43.0

Once you have completed the above preparations, you can build flexisip using the following flow.

$ mkdir build
$ cd build
$ make package

If everything goes well, two types of packages will be created as follows.


Note) Installation of flexisip from official repositories for different operating systems.

For those who do not wish to build flexisip from source and want to register the repository to create a new flexisip Docker image, please refer to the following instructions. This is applicable for CentOS, RockyLinux, Ubuntu, and Debian.

/etc/apt/sources.list.d/belledonne.list Ex):Ubuntu 22.04

deb [arch=amd64] jammy stable # hotfix beta alpha

Install flow

$ wget -O - | sudo apt-key add -
# Not doing this can result in the following error : "[SOCI] connection pool open error: Failed to find shared library for backend mysql"
$ sudo apt install libmariadb-dev
# Update & Install
$ sudo apt update
$ sudo apt install bc-flexisip

3. Creating a Flexisip Docker image

Copy the created packages below to the flexisip/docker directory to proceed with the work.


Create a Dockerfile named "flex-from-ubuntu-deb" based on Ubuntu 22.04 by referring to flex-from-deb. Then add the build command to the Makefile. The installation of snmp-mibs-downloader, snmp, and snmpd is optional. By using SNMP, you can check and rewrite the settings of each section in the flexisip configuration file.


FROM ubuntu:22.04
MAINTAINER  Takanobu Fuse  [email protected]>

# Prepare dependencies
RUN apt-get update
RUN apt-get install -y nano xsdcxx gdb libmariadb3 snmp-mibs-downloader snmp snmpd iproute2

# Get flexisip package
COPY *.deb *.ddeb deb-packages/
RUN apt-get install -y /deb-packages/*
RUN rm -rf /deb-packages

# Add it to the default path
ENV PATH=$PATH:/opt/belledonne-communications/bin

WORKDIR /opt/belledonne-communications

# Generate a default configuration
RUN flexisip --dump-default all > /etc/flexisip/flexisip.conf

VOLUME /etc/opt/belledonne-communications/flexisip
VOLUME /var/opt/belledonne-communications/log/flexisip
COPY backtrace.gdb /
RUN chmod a+x /

# Script to wait db before launch flexisip [Licence Apache2]
ADD /wait
RUN chmod +x /wait

CMD flexisip

Makefile Note)Write down only additional sections


# For Ubuntu 22.04
	$(eval DOCKER_FILE = flex-from-ubuntu-deb)
	# forcing context to .
	# at the moment of the condition above being executed, $DOCKER_FILE doesn't have the right value
	$(eval CONTEXT = .)
	$(eval DOCKER_TAG = $(DOCKER_TAG)-deb)


# For Ubuntu 22.04
flexisip-ubuntu-deb-build: flexisip-ubuntu-deb-before flexisip-build

flexisip-ubuntu-deb-push: flexisip-ubuntu-deb-before flexisip-push

flexisip-ubuntu-deb-clean: flexisip-ubuntu-deb-before flexisip-clean



Note)Fixed "ulimit -c unlimited*" in, delete '*'.

$ make flexisip-ubuntu-deb-build

Check image file

$ docker images
REPOSITORY                                                      TAG                            IMAGE ID       CREATED       SIZE                     2.3.0-alpha-29-gb19a1ce5-deb   b3e1a47e3efd   9 hours ago   775MB

Start container

Since the configuration file is not defined, only the proxy mode can be launched from this image. To output the configuration file "flexisip.conf", start the container in proxy mode.

Start the container and run flexisip in proxy mode to output the default configuration.

$ docker run -d --network host --name ubuntu-flexisip  IMAGE_ID> --server proxy
$ docker ps
CONTAINER ID   IMAGE          COMMAND                  CREATED       STATUS       PORTS     NAMES
0fd6f8e90621   b3e1a47e3efd   "/flexisip-entrypoin…"   9 hours ago   Up 9 hours             ubuntu-flexisip

Copy flexisip.conf

$ docker cp ubuntu-flexisip:/etc/flexisip/flexisip.conf ./

4. SSL/TLS authentication procedure with Certbot Docker container

The following tasks are to be performed on the host machine.

SSL (TLS) authentication is essential for operating a system with flexisip. Please obtain it in advance using Docker containers and reflect it in the settings of nginx and flexisip.

Note) $PWD: directory in which executed command.

$ docker run -it --rm --name certbot -v "$PWD/letsencrypt:/etc/letsencrypt" -p 80:80 certbot/certbot certonly --standalone -d

Add the following renew command using the Certbot Docker container to the host machine's cron job.

Note) When specifying a directory, please use an absolute path.

$ docker stop nginx && docker run -it --rm --name certbot -v "/??/??/.../letsencrypt:/etc/letsencrypt" -p 80:80 certbot/certbot renew && docker start nginx

The SSL certificate is valid for 90 days, so we recommend renewing it every 60 days to ensure uninterrupted service.

Configure in flexisip.conf as follows.


5. Preparing for Flexisip Account Manager installation

flexisip-account-manage designed by Laravel (php framework)

Create a dockerfile for building a custom image called php-fpm-alpine-laravel that can be used as a service in a Docker Compose file:

To install Composer and PHP extensions, we can use docker-php-extension-installer, which is recommended by the official PHP page on DockerHub.


FROM php:fpm-alpine

# Set working directory
WORKDIR /var/www/html

RUN apk add --no-cache bash nano libpng-dev freetype-dev libjpeg-turbo-dev libxml2-dev

# Install Composer and PHP extensions
RUN curl -sSLf \
        -o /usr/local/bin/install-php-extensions \ && \
    chmod +x /usr/local/bin/install-php-extensions && \
    install-php-extensions redis mysqli xmlrpc pdo_mysql @composer && \
    IPE_GD_WITHOUTAVIF=1 install-php-extensions gd

# Installing Laravel
RUN chown -R www-data:www-data /var/www/html
RUN composer global require laravel/installer \
    && ln -s /root/.config/composer/vendor/laravel/installer/bin/laravel /usr/local/bin/laravel

Download flexisip-account-manager in the same directory as the docker-compose.yml file that will be created later.

$ git clone

6. Creating a Docker Compose file


version: '3.5'

##### redis-server
    container_name: redis
    image: redis:alpine
        - ./redis:/etc/redis
    # need to download default config file:redis.conf from
    # then modify it to enable the auth access(password), and input it into /redis/etc directory.
    command: ["redis-server", "/etc/redis/redis.conf"]
    privileged: true
    restart: always

##### nginx
    container_name: nginx
    image: nginx:alpine
    tty: true
      - "80:80"
      - "443:443"
      # nginx config
      - ./nginx:/etc/nginx/conf.d
      # certbot letsencrypt certification. Created by docker_hub certbot/certbot
      # $ docker run -it --rm --name certbot -v "$PWD/letsencrypt:/etc/letsencrypt" -p 80:80 certbot/certbot certonly --standalone -d
      # Add the below cronjob into the host crontab.
      # docker run -it --rm --name certbot -v "/??/??/.../letsencrypt:/etc/letsencrypt" -p 80:80 certbot/certbot renew
      - ./letsencrypt:/etc/letsencrypt
      # shared the directory /flexisip-account-manager in php-fpm-laravel container
      - ./flexisip-account-manager/flexiapi:/var/www/html/flexiapi
      # shared the directory /var/www/html in phpmysql-fpm container
      - phpmyadmin:/var/www/html/phpmyadmin
    restart: always

##### mariadb
    container_name: flexisip-mariadb
    image: mariadb
    restart: always
      - ./db:/var/lib/mysql

### flexisip
    container_name: ubuntu-flexisip
      - ./letsencrypt:/etc/letsencrypt
      # previously need to add "flexisip" directory and input "flexisip.conf" into it.
      - ./flexisip_conf:/etc/flexisip
      # for conference server linphone db directory
      - ./linphone:/root/.local/share/linphone
      - ""
      - redis
      - nginx
      - flexisip-mariadb
    restart: always
    # for starting only "proxy" server
    command: ["--server","proxy"]
    # for starting "proxy, presence, conference" servers
    #command: [""]
        ## allow the privilege of network to the container
      - NET_ADMIN
    network_mode: "host"
##### phpmyadmin-fpm
    container_name: phpmyadmin-fpm
    image: phpmyadmin/phpmyadmin:fpm-alpine
    tty: true
      - "9000"
      - PMA_HOST=flexisip-mariadb
      - PMA_PORT=3306
      - PMA_ABSOLUTE_URI=http://localhost/phpmyadmin
      - phpmyadmin:/var/www/html
      - /sessions
      - flexisip-mariadb
    restart: always
##### php-fpm-laravel
    container_name: php-fpm-laravel
      context: ./docker_files
      dockerfile: php-fpm-alpine-laravel      
    tty: true
      - "9000"
    # "php artisan serve" commmand default port
      - 8000:8000
      # for laravel php framework
      - ./flexisip-account-manager/flexiapi:/var/www/html/flexiapi
      # provisioning config
      - ./xmlrpc:/opt/belledonne-communications/share/flexisip-account-manager/xmlrpc
      # Flexisip-account-manager log
      - ./log:/var/opt/belledonne-communications/log
      - ubuntu-flexisip
    restart: always

    name: containers-network-ipv6
    external: true

### $ docker volume create phpmyadmin  
    external: true

Note) Docker network and phpMyAdmin volume should be created in advance.

Create Bridge Network

$ docker network create --gateway 172.xx.0.1 --gateway fdxx:xxxx:xxxx:1::1 --subnet 172.xx.0.0/24 -- subnet fdxx:xxxx:xxxx:1::0/80 --ipv6 containers-network-ipv6

Create Volume

$ docker volume create phpmyadmin

7. Starting and operating in containers

Start up

$ docker compose up -d

The following tasks will be performed inside the container : php-fpm-laravel

$ docker compose exec php-fpm-laravel sh
# cd flexiapi

① Download the necessary dependency packages for flexisip-account-manager

# composer install --no-dev

② Create a .env file and apply a security key. Configure authentication SMTP mail server, database, etc. in the .env file.

# cp env.example .env
# php artisan key:generate

③ Create database for Linphone user accounts

# php artisan migrate

④ Register users from the web frontend.

Ficus Register Email

Configure administrator user: Set the registered user as an administrator in the flexisip-account-manager

# php artisan accounts:set-admin {account_id}


# php artisan --help 
# php artisan cache:clear

Note) The front-end is composed of the flexisip-account-manager/flexiapi directory created with Laravel (the flexisip-account-manager/xmlrpc directory is not needed).

The configuration files are stored in the flexisip-account-manager/flexiapi/config directory. The .env file is used to override the variables in this configuration file.

Ficus Admin Accounts

Ficus Admin Accounts Show

2023/04/26 Additional Note)  

It is possible to implement account authentication via SMS transmission by installing the VONAGE package that corresponds to the Laravel Notification class. Prior registration for a VONAGE account (which includes a trial SMS transmission service for up to 2 euros without requiring credit card registration) is required.

Once registered, an API key and API secret will be provided, which should be recorded in the .env file.


# Vonage SMS API
VONAGE_SMS_FROM=1234567890 (During the trial period, any phone number can be used)

Install the necessary package using composer:

# composer require laravel/vonage-notification-channel

To create a new class called VonageSMS for sending SMS messages by extending the Notification class:

# php artisan make:notification VonageSMS

This command will create a new file called VonageSMS.php in the app/Notifications directory. You can then modify this file to customize the SMS message and the logic for sending it using the VONAGE API.

New File


Modified Files


If you have any further requests or need more details, please refer to the contact page and get in touch with us.

Register by Phone


Sms Validate Pin


Vonage Received