Building & Installing FreeSWITCH v1.11.0 from Source on Debian 13 (Trixie)

When deploying a production-grade communications platform, the foundation you build upon dictates the stability, scalability, and flexibility of your entire system. FreeSWITCH stands as one of the most powerful telephony engines available today.
With the release of FreeSWITCH v.1.11.0, the installation process has become significantly more streamlined compared to the 1.10.x series. Most notably, the requirement for legacy PCRE engines and legacy FFmpeg dependencies has been removed, making it much easier to compile on modern distributions like Debian 13 (Trixie) and beyond.
In this guide, we will walk through the complete process of compiling FreeSWITCH v.1.11.0 on a Debian-based system.
Step 1: System Preparation & Core Build Tools
Before configuring specific telecom libraries, we need the standard Linux compilation toolchain. We will also install modern dependencies like libpcre2-dev, libavformat-dev, and libswscale-dev which are now supported natively by FreeSWITCH v.1.11.0.
Execute the following commands as root (or using sudo):
apt update
apt install -y git build-essential autoconf libtool libtool-bin pkg-config \
cmake uuid-dev libssl-dev libsqlite3-dev libcurl4-openssl-dev \
libldns-dev libspeexdsp-dev libspeex-dev libedit-dev \
libtiff-dev libopus-dev liblua5.2-dev libpq-dev libsndfile-dev \
libpcre2-dev libavformat-dev libswscale-dev
[!TIP] Ensure you have an updated system (
apt upgrade) before beginning to avoid conflicts with shared object libraries during the linking phase.
Step 2: Compiling SpanDSP
Unlike older versions of FreeSWITCH that required locking to a specific commit hash, FreeSWITCH v.1.11.0 works seamlessly with the current master of SpanDSP. We can just clone the repository and compile.
cd /usr/local/src
# Clone the repository to get the full git history
git clone https://github.com/freeswitch/spandsp.git
cd spandsp
# Bootstrapping prepares the autotools configuration
./bootstrap.sh
./configure
# Compile and install
make && make install
# Refresh dynamic linker bindings
/sbin/ldconfig -v | grep spandsp
Step 3: Integrating the Sofia-SIP Stack
Sofia-SIP handles session initiation, tear-down, and the complex state machine required for VoIP endpoints. We will pull the latest master archive.
cd /usr/local/src
# Download the unified master archive
wget https://github.com/freeswitch/sofia-sip/archive/refs/heads/master.tar.gz -O sofia-sip.tar.gz
tar -zxvf sofia-sip.tar.gz
cd sofia-sip-master
# Standard compilation sequence
./bootstrap.sh
./configure
make && make install
# Inform the system of the new library
/sbin/ldconfig -v | grep sofia
Step 4: Adding Modern Cloud Hooks (LibKS & SignalWire-C)
Part A: Installing LibKS
git clone https://github.com/signalwire/libks.git /usr/local/src/libks
cd /usr/local/src/libks
# Note the specific installation prefix required for seamless FS integration
cmake . -DCMAKE_INSTALL_PREFIX=/usr
make && make install
Part B: Installing SignalWire-C
cd /usr/local/src
wget https://github.com/signalwire/signalwire-c/archive/refs/heads/master.tar.gz -O signalwire-c.tar.gz
tar -zxvf signalwire-c.tar.gz
cd signalwire-c-master
cmake .
make && make install
/sbin/ldconfig -v | grep signalwire
Step 5: The Final FreeSWITCH Core Compilation
At last, we can download the official v1.11.0 release tag and compile the core engine. Since we already installed the necessary modern headers (libpcre2-dev and the new FFmpeg headers), the configuration and make process should complete smoothly without needing to pause for legacy dependencies.
cd /usr/local/src
wget https://github.com/signalwire/freeswitch/archive/refs/tags/v1.11.0.tar.gz
tar -zxvf v1.11.0.tar.gz
cd freeswitch-1.11.0
# Bootstrap with multi-core support (-j)
./bootstrap.sh -j
# Configure the build parameters
./configure
# Compile the engine (this will take several minutes depending on CPU)
make
# Install the binaries to /usr/local/freeswitch
make install
Verification and Next Steps
The ultimate proof of a successful build is starting the interactive console. Switch directories and fire up the FreeSWITCH executable, asking it strictly for its version output:
/usr/local/freeswitch/bin/freeswitch -version
If you see FreeSWITCH version: 1.11.0-..., congratulations! You have successfully compiled the latest version of FreeSWITCH from source.
Post Installation Setup
Create Symlinks (Optional)
By default, FreeSWITCH will install its binaries and configurations in /usr/local/bin and /usr/local/freeswitch. To make them available system-wide, you can create the following symlinks:
ln -s /usr/local/freeswitch/conf /etc/freeswitch
ln -s /usr/local/freeswitch/bin/fs_cli /usr/bin/fs_cli
ln -s /usr/local/freeswitch/bin/freeswitch /usr/sbin/freeswitch
Create an Unprivileged User
For security, you should run the FreeSWITCH daemon under a dedicated, unprivileged system user instead of root.
groupadd freeswitch
adduser --quiet --system --home /usr/local/freeswitch --gecos 'FreeSWITCH open source softswitch' --ingroup freeswitch freeswitch --disabled-password
chown -R freeswitch:freeswitch /usr/local/freeswitch/
chmod -R ug=rwX,o= /usr/local/freeswitch/
chmod -R u=rwx,g=rx /usr/local/freeswitch/bin/*
Running as a Systemd Service
In order to run FreeSWITCH in the background seamlessly, open /etc/systemd/system/freeswitch.service in your favorite editor and copy the following configuration into it:
[Unit]
Description=FreeSWITCH open source softswitch
Wants=network-online.target
Requires=network.target local-fs.target
After=network.target network-online.target local-fs.target
[Service]
Type=forking
PIDFile=/usr/local/freeswitch/run/freeswitch.pid
Environment="DAEMON_OPTS=-nonat"
Environment="USER=freeswitch"
Environment="GROUP=freeswitch"
EnvironmentFile=-/etc/default/freeswitch
ExecStartPre=/bin/chown -R ${USER}:${GROUP} /usr/local/freeswitch
ExecStart=/usr/local/freeswitch/bin/freeswitch -u ${USER} -g ${GROUP} -ncwait ${DAEMON_OPTS}
TimeoutSec=45s
Restart=always
[Install]
WantedBy=multi-user.target
Reload the systemctl daemon so it registers the new service file:
systemctl daemon-reload
systemctl start freeswitch
systemctl status freeswitch
That's it! From here, your next journey revolves around mastering XML configuration, dialgroups, and SIP profiles with the modern FreeSWITCH v.1.11.0 environment.
Discussion0
Join the conversation. Sign in to leave a comment.