HAProxy Enterprise Documentation 2.4r1

Update the database during runtime

Use the DeviceAtlas Update module to keep the contents of the device detection database current. This allows you to keep multiple HAProxy Enterprise nodes synced with the latest data.

  1. Install a web server of your choice and host the database file at a URL where HAProxy Enterprise can access. For example, host the file at

  2. Install the package hapee-2.4r1-lb-da-update:

    $ # On Debian/Ubuntu
    $ sudo apt-get install hapee-2.4r1-lb-da-update
    $ # On CentOS/RedHat/Oracle/Photon OS
    $ sudo yum install hapee-2.4r1-lb-da-update
    $ # On SUSE
    $ sudo zypper install hapee-2.4r1-lb-da-update
    $ # On FreeBSD
    $ sudo pkg install hapee-2.4r1-lb-da-update
  3. Add the following lines to the global section of your configuration file, where the URL hosts an updated version of the file:

       # ... other global settings
       module-load hapee-lb-da-update.so
       deviceatlas-update url delay 24h log

With this configuration, HAProxy Enterprise downloads the database every 24 hours and displays a message in the logs when it succeeds or if it encountered errors during the update.


The deviceatlas-update directive enables updating the database over HTTP from a specified URL. Updating a database with a newer version invalidates any cached lookups (if caching is used), unless you enable checksum and the new and old database contents are identical.

The directive supports the following syntax:

deviceatlas-update url <url>
   [delay <u> | xdelay <u s b r>]
   [timeout <t>]
   [retries <n>]
   [source <addr>[:<port>]]


url <url>

Required. Specifies the database update URL. The updated data can be either JSON or precompiled JSON.

delay <u>

Specifies the period between each attempt to download a new database version. The delay is a simplified version of the xdelay keyword.

xdelay <u s b r>

  • <u> specifies the period between each attempt to download a new database version

  • <s> specifies the initial (first) download delay

  • <b> specifies the delay between the download of each element of the database

  • If the download fails, <r> determines the delay for the next attempt

  • Default values are: u = 5m, s = 5s, b = 10s, and r = 30s

timeout <t>

Specifies the HTTP connection timeout for attempts to download a new database vers - The value is set in milliseconds by default, but you can set it to any other unit if you add a unit suffix to the number. - Defaults to 5 seco

retries <n>

Specifies the number of retries to download a new DeviceAtlas database version. If not set, the global retries value applies (defaults to 3).


If set, determines the use of the SHA1 control sum to verify that the contents of the recently downloaded database is identical to the current one. If they are identical, then live-reload of the database does not occur, thereby preserving the cached contents (if using caching). See note below


If set, enables authentication of the downloaded d - Each file undergoing upgrade must have the associated file with SHA1 checksum. - A SHA1 checksum file has the extension .sha1. - The typical way of creating a SHA1 checksum file is: sha1sum file > file.sh


Specifies the use of the time from the Last-Modified response HTTP header. Example: checks whether to update the data using the If-Modified-Since request HTTP header. See note below

source <addr>[:<port>]

Sets the source address for outgoing connecti - <addr> is the IPv4 address HAProxy Enterprise binds to before it connects to a server - The default value is to let the system select the most optimal address to reach its destination - <port> is optional - The default value of zero means that the system selects a free port - Does not support port ra


Specifies whether to log operation errors.


Deactivates logging of successful updates.


Lists other server parameters that are useful for configuring SSL features.

Next up

DeviceAtlas API Reference