Skip to content


If installing ExaCheck from PyPi or source, ExaBGP requires some additional setup steps. If you are deploying the Docker container there is no need to follow the below steps.


If using Python 3.12 and installing an older ExaBGP release, you may get the following error when running ExaBGP:

root@970372c5ffcd:/# exabgp
Traceback (most recent call last):
File "/usr/local/bin/exabgp", line 8, in <module>
File "/usr/local/lib/python3.12/site-packages/exabgp/application/", line 18, in run_exabgp
    from exabgp.application.bgp import main
File "/usr/local/lib/python3.12/site-packages/exabgp/application/", line 18, in <module>
    from exabgp.logger import Logger
File "/usr/local/lib/python3.12/site-packages/exabgp/", line 23, in <module>
    from exabgp.configuration.environment import environment
File "/usr/local/lib/python3.12/site-packages/exabgp/configuration/", line 318, in <module>
    from exabgp.vendoring.six.moves import configparser as ConfigParser
ModuleNotFoundError: No module named 'exabgp.vendoring.six.moves'

If you encounter this error, ExaBGP must be installed from source rather than the current PyPi release. Make sure git is available and install from the GitHub repository instead:

python3 -m pip install git+

System User

A user account should be added for ExaBGP so it does not run as root. To add the account:

useradd -Ms /usr/sbin/nologin -d /run/exabgp exabgp

systemd Service File

Installing ExaBGP from source or pip does not include a systemd service file. Create the file /etc/systemd/system/exabgp.service with this content:


ExecStartPre=-/usr/bin/mkfifo /run/exabgp/
ExecStartPre=-/usr/bin/mkfifo /run/exabgp/exabgp.out
ExecStart=/opt/exacheck/bin/exabgp /etc/exabgp/exabgp.conf
ExecReload=/bin/kill -USR1 $MAINPID


Once the service file is created the service can be enabled to start on boot:

systemctl enable exabgp.service


ExaBGP needs to be configured to use ExaCheck. By default, the ExaBGP and ExaCheck configuration will be sourced from the /etc/exabgp directory; create that directory if it does not already exist:

mkdir /etc/exabgp

Environment File

The ExaBGP environment file needs to be created. To generate a default environment file run the following command:

/opt/exacheck/bin/exabgp --fi > /etc/exabgp/exabgp.env

The following configuration options need to be changed in the environment file:

  • API ack set to false
  • ExaBGP user changed from nobody to exabgp

A sed one liner to change the required values can be executed:

sed -i \
    -e "s:ack = true:ack = false:" \
    -e "s:user = 'nobody':user = 'exabgp':" \

Configuration File

The ExaBGP configuration file, /etc/exabgp/exabgp.conf, then needs to be created. An example template:

# Define the ExaCheck process
process exacheck {
    run exacheck run;
    encoder text;

# Connect to the BGP neighbor
neighbor {
    description "Example BGP neighbor";

    # This should be set to the ExaBGP router ID (eg. the main IP address of this server)

    # The local address to source BGP connections from

    # The local and peer AS numbers
    local-as 65515;
    peer-as 65515;

    # The address family to advertise
    family {
        ipv4 unicast;

    # Allow routes sent from the ExaCheck process to be sent to this neighbor
    api {
        processes [ exacheck ];

For more configuration examples, see the ExaCheck configuration examples page.

Once ExaBGP and ExaCheck have been configured, the systemd service can then be started:

systemctl start exabgp.service