Skip to content

Installation ​

PBXsight is one program, pbxsight, with the web UI built in. It stores everything in one SQLite database and a folder of run files; there is no separate database server, no runtime and nothing else to install. This page covers where to run it and each way of installing it. When it runs, go on with First start.

First step: pick the machine (a small Linux VM next to the PBX is ideal — see Where to run it), then follow the section for your install type: Docker, .deb / .rpm, archive or macOS.

Downloads ​

The Download page lists the files of the latest version (and the older ones still offered), each with its size and SHA-256. Every version has these files:

ForFile
Docker on a Linux hostpbxsight_<version>_docker_<arch>.tar.gz and compose.yaml
Debian, Ubuntupbxsight_<version>_<arch>.deb
RHEL, Rocky, Alma, Fedorapbxsight_<version>_<arch>.rpm
Any Linux (static binary)pbxsight_<version>_linux_<arch>.tar.gz
macOSpbxsight_<version>_darwin_<arch>.tar.gz
Agent for rtpengine hosts (optional)pbxsight-agent_<version>_<arch>.deb
pbxsight-agent_<version>_<arch>.rpm
pbxsight-agent_<version>_linux_<arch>.tar.gz
Checking the fileschecksums.txt (SHA-256 of every file)

<arch> is amd64 (Intel / AMD, x86_64) or arm64 (ARM, aarch64; Apple Silicon on a Mac). The agent is described in rtpengine and the agent.

uname -m tells which one a Linux machine needs.

Checking the download ​

Put the downloaded files and checksums.txt in one folder and run:

sh
sha256sum -c checksums.txt --ignore-missing     # Linux
shasum -a 256 -c checksums.txt --ignore-missing # macOS

Every file you downloaded must say OK. --ignore-missing skips the files you didn't download.

Where to run it ​

PBXsight is the "phones" side of the test: it sends SIP to the PBX's entry point, sends and receives the audio, and reads FreeSWITCH's Event Socket. So it must run on a machine that can reach:

  • the SIP entry point (your proxy / SBC, e.g. Kamailio, or FreeSWITCH itself),
  • the media relay or FreeSWITCH for RTP/SRTP — in both directions: the PBX sends audio back to the tester's media ports,
  • FreeSWITCH's Event Socket (TCP 8021 by default), usually over a LAN or VPN,
  • optionally each Kamailio's JSON-RPC endpoint and each rtpengine host's agent.

Good places: a small VM next to the PBX, or a workstation on the same LAN or VPN. The full list of ports and directions is in Ports and firewall.

Not on the PBX hosts themselves

Don't install PBXsight on the FreeSWITCH, Kamailio or rtpengine machines. A load test spends CPU on the tester side (SIP, TLS, encrypting and decrypting SRTP for every call). On the PBX host that CPU would be taken from the component you are measuring, and the results would show the tester's load as the PBX's limit.

How big? The tester is light compared with what it loads: on one machine the built-in caller engine keeps an exact rate up to at least 100 calls per second, and the media engine carries about 2000 concurrent calls with audio with the default settings. A real PBX usually reaches its limit long before that. Two or more CPU cores and 2 GB of RAM are plenty for typical tests; see Supported versions and limits.

Docker (Linux host) ​

The image is built on a distroless base (no shell), runs as a non-root user (UID 65532) and contains the same configuration as the packages.

sh
docker load -i pbxsight_<version>_docker_amd64.tar.gz    # arm64 hosts: _docker_arm64
docker compose up -d                                     # with compose.yaml from the download page
docker compose logs pbxsight | grep setup_token          # for the first admin from another machine

docker load adds the image as pbxsight:<version> and pbxsight:latest; compose.yaml uses pbxsight:latest. This is the shipped compose.yaml:

yaml
services:
  pbxsight:
    image: pbxsight:latest
    network_mode: host
    restart: unless-stopped
    stop_grace_period: 30s        # a running test is hung up and saved on stop
    environment:
      TZ: "Etc/UTC"               # time zone for schedules and timestamps, e.g. Europe/Warsaw
      # every config key also works as PBXSIGHT_<SECTION>_<KEY>, e.g.
      # PBXSIGHT_SERVER_LISTEN: "127.0.0.1:8080"
    ulimits:
      nofile: 65536               # one TLS connection per test extension
    volumes:
      - pbxsight-data:/var/lib/pbxsight          # database, secret key, run files: back it up
      # your own config instead of the built-in one (e.g. for HTTPS):
      # - ./config.yaml:/etc/pbxsight/config.yaml:ro
volumes:
  pbxsight-data:

Why host networking ​

network_mode: host is required for load tests. SIP and SDP carry IP addresses and ports: the tester writes its own address into Via, Contact and the SDP c= line, and the PBX sends replies, audio and (for virtual phones) incoming calls there. With Docker's usual published ports the container sits behind NAT: it would advertise its internal container address, the PBX's audio and calls to the virtual phones would not arrive, and the extra hop would change the measured audio delay. With host networking the container uses the host's interfaces directly, exactly like the native program.

Because of that, the UI listens on the host's port 8080 (the built-in config listens on 0.0.0.0:8080), and the tester's media ports 16000–16015/UDP are the host's ports. Open them in the host's firewall as described in Ports and firewall.

Data volume ​

Everything PBXsight keeps — the database pbxsight.db, the secret key pbxsight.key, the run files in runs/ and a self-signed HTTPS certificate if you use one — is in /var/lib/pbxsight, the named volume pbxsight-data. Back up the volume; the database and the key must stay together (see Secrets at rest and backups).

Your own config file ​

The image contains the packaged config.yaml (listen on 0.0.0.0:8080, data in /var/lib/pbxsight, HTTPS off). Two ways to change it:

  • Environment variables: every key can be set as PBXSIGHT_<SECTION>_<KEY> under environment:, e.g. PBXSIGHT_SERVER_LISTEN: "127.0.0.1:8080". Simple for one or two keys.
  • A mounted file: uncomment the ./config.yaml:/etc/pbxsight/config.yaml:ro line. Start from the packaged config shown under What the package installs. The container runs as UID 65532, so the file (and any certificate and key files you mount for HTTPS) must be readable by that user.

All keys are listed in Configuration.

Time zone ​

Set TZ (e.g. Europe/Warsaw). Schedules use cron times in the app's local time zone, and the HTML reports show local times. Without TZ the container runs in UTC, and "daily at 02:00" means 02:00 UTC.

Not with Docker Desktop ​

Docker Desktop on macOS and Windows runs containers inside a virtual machine behind NAT, and host networking there means the VM's network, not your computer's. SIP and RTP then carry the wrong addresses, exactly the problem host networking avoids on Linux. On a Mac use the native binary; on Windows use a Linux VM.

Commands inside the container ​

The image has no shell, but docker compose exec runs the program directly, e.g. when every admin is locked out:

sh
docker compose exec pbxsight /usr/bin/pbxsight -config /etc/pbxsight/config.yaml reset-admin NAME

Updating ​

Load the new image, then recreate the container: docker compose up -d. The volume keeps the data; database changes are applied on the first start of the new version. A running test is hung up and saved when the container stops (stop_grace_period: 30s).

Debian / Ubuntu (.deb) and RHEL family (.rpm) ​

sh
sudo apt install ./pbxsight_<version>_amd64.deb     # Debian / Ubuntu
sudo dnf install ./pbxsight_<version>_amd64.rpm     # RHEL / Rocky / Alma / Fedora

The packages need systemd. Installing one:

  1. creates the system group and user pbxsight (no login shell, home /var/lib/pbxsight),
  2. installs the files below,
  3. creates /var/lib/pbxsight (owner pbxsight, mode 0750) and makes /etc/pbxsight/config.yaml readable only by root and the pbxsight group (0640),
  4. enables and starts pbxsight.service, and prints where to go next.

What the package installs ​

PathWhat
/usr/bin/pbxsightthe program
/usr/lib/systemd/system/pbxsight.servicethe systemd unit
/etc/pbxsight/config.yamlthe config; a configuration file of the package, so upgrades keep your edits
/var/lib/pbxsight/database pbxsight.db, secret key pbxsight.key, run files runs/, self-signed HTTPS certificate
/usr/share/doc/pbxsight/README.md, config.example.yaml (every key with its default), THIRD_PARTY_LICENSES.txt

The packaged config:

yaml
server:
  listen: "0.0.0.0:8080"   # all interfaces: the team reaches the UI (everyone logs in)
  allowed_hosts: []        # host names the UI is opened under besides IP addresses
  log_level: "info"
  tls:
    enabled: false
    cert_file: ""
    key_file: ""
  trusted_proxies: []      # reverse proxies in front of the app (IPs or CIDRs)

tester:
  media_port: 16000        # RTP/RTCP ports 16000-16015 (UDP): open them in a host firewall
  work_dir: "/var/lib/pbxsight/runs"

storage:
  db_path: "/var/lib/pbxsight/pbxsight.db"
  secret_key_file: ""      # "" = /var/lib/pbxsight/pbxsight.key, next to the database

It listens on all interfaces so colleagues can open the UI from their machines; everyone has to log in. HTTPS is off: turn it on when the network between the users and this machine isn't trusted (HTTPS and remote access), or set listen: "127.0.0.1:8080" to allow only this machine. PBX targets are not in this file: you create them in the UI as PBX profiles.

The service ​

The unit runs /usr/bin/pbxsight -config /etc/pbxsight/config.yaml as pbxsight, restarts it on failure, raises the open-files limit to 65536 (one TLS connection per test extension plus the media sockets) and gives a stopping service 30 s to hang up a running test and save it. It is hardened: read-only system, no home directories, no capabilities; it can write only to /var/lib/pbxsight.

sh
systemctl status pbxsight          # state
journalctl -u pbxsight -f          # log
journalctl -u pbxsight | grep setup_token   # the setup token for the first admin
sudo systemctl restart pbxsight    # after editing the config (a running test is hung up and saved)

Environment variables (PBXSIGHT_<SECTION>_<KEY>) go into a drop-in: sudo systemctl edit pbxsight, then

ini
[Service]
Environment=PBXSIGHT_SERVER_LOG_LEVEL=debug

Locked out?

sudo -u pbxsight pbxsight -config /etc/pbxsight/config.yaml reset-admin NAME makes NAME an admin with a new random password. See Users and roles.

Firewall ​

  • TCP 8080 (or your server.listen port) from the users' machines, for the UI.
  • UDP 16000–16015 from the PBX's media side (relay or FreeSWITCH): the audio coming back to the tester. The range is tester.media_port … media_port + 4 × media_sockets − 1.
  • SIP needs no inbound rule over TLS or TCP (the tester opens the connections). Over UDP, the PBX's replies come back to the tester's SIP port; a stateful firewall lets them in.

Details per port: Ports and firewall.

Upgrades ​

Install the newer package the same way (apt install ./…, dnf install ./…). The service restarts on the new version; your /etc/pbxsight/config.yaml and /var/lib/pbxsight are kept, and database changes are applied at the first start.

Remove vs. purge ​

CommandEffect
sudo apt remove pbxsightstops and disables the service, removes the program; keeps /var/lib/pbxsight (database, key, runs), the config and the user
sudo apt purge pbxsightthe same, plus deletes /var/lib/pbxsight, the config and the pbxsight user and group
sudo dnf remove pbxsightstops and disables the service, removes the program; keeps /var/lib/pbxsight and the user (an edited config is saved as config.yaml.rpmsave)

Installing the package again after a remove enables and starts the service with the kept data (log in as before; on RPM systems copy your settings back from config.yaml.rpmsave). To start over completely on an RPM system, remove /var/lib/pbxsight by hand after dnf remove.

Linux archive (any distribution) ​

The archive has no top-level folder: its files land in the folder you unpack it in, so make one first.

sh
mkdir pbxsight && cd pbxsight
tar xzf ../pbxsight_<version>_linux_amd64.tar.gz
./pbxsight                       # UI on http://127.0.0.1:8080, data in the current folder

The archive holds pbxsight, README.md, config.example.yaml (every key with its default), THIRD_PARTY_LICENSES.txt and a systemd/ folder with the unit and config the packages use.

Without a config.yaml the program uses the built-in defaults: it listens on 127.0.0.1:8080 (this machine only) and keeps pbxsight.db, pbxsight.key and runs/ in the current folder. It reads config.yaml from the current folder when there is one, or the file given with -config FILE (which must exist).

As a systemd service by hand ​

The same layout as the packages:

sh
sudo install -m 0755 pbxsight /usr/bin/pbxsight
sudo groupadd --system pbxsight
sudo useradd --system --gid pbxsight --home-dir /var/lib/pbxsight --no-create-home \
    --shell /usr/sbin/nologin pbxsight
sudo install -d -m 0755 /etc/pbxsight
sudo install -m 0640 -o root -g pbxsight systemd/config.yaml /etc/pbxsight/config.yaml
sudo install -m 0644 systemd/pbxsight.service /etc/systemd/system/pbxsight.service
sudo systemctl daemon-reload
sudo systemctl enable --now pbxsight

systemd creates /var/lib/pbxsight itself (the unit's StateDirectory). Upgrading = replacing /usr/bin/pbxsight and systemctl restart pbxsight.

macOS ​

sh
mkdir pbxsight && cd pbxsight                       # the archive has no top-level folder
tar xzf ../pbxsight_<version>_darwin_arm64.tar.gz  # Intel Macs: _darwin_amd64
./pbxsight                                          # UI on http://127.0.0.1:8080

"cannot be opened" on the first start

The macOS build is not notarized by Apple yet. A file downloaded with a browser carries a quarantine flag, and macOS refuses to start it. Remove the flag once:

sh
xattr -d com.apple.quarantine pbxsight

Files fetched with curl are not flagged.

Data (pbxsight.db, pbxsight.key, runs/) goes to the current folder unless a config.yaml says otherwise: copy config.example.yaml to config.yaml in the folder you start it from, or pass -config FILE. The program runs in the foreground; it isn't installed as a launchd service, so schedules only fire while it runs and the Mac is awake.

For large tests with TLS (one connection per test extension) raise the open-files limit in the shell first: ulimit -n 65536.

Windows ​

Not packaged and not supported yet. Run PBXsight on Linux (natively, in a Linux VM, or in Docker on a Linux host) instead.

Checking the version ​

sh
pbxsight -version

The e-mails the feedback buttons in the UI open include it as well.

PBXsight — load testing and monitoring for FreeSWITCH PBXes. Only test systems you own or may test.