Skip to content

HAProxy HAProxy

Description / nameInput element
Container Registry
Container Configuration Root Path
Timezone
User ID
Group ID
HAProxy Host Port
HAProxy /config Path

Build Status Last Commit

Reliable, high performance TCP/HTTP load balancer and reverse proxy.

Port 80
Registry ghcr.io/daemonless/haproxy
Daemonless daemonless/haproxy
Source haproxy/haproxy
Website www.haproxy.org

Version Tags

Tag Description Best For
3.4 / 3.4-pkg-latest / 3.4.1 / latest / pkg / pkg-latest HAProxy 3.4 release branch installed from FreeBSD latest packages. Most users. Matches Linux Docker behavior.
3.3 / 3.3-pkg-latest / 3.3.11 HAProxy 3.3 release branch installed from FreeBSD latest packages. Alternative build.
3.2 / 3.2-pkg-latest / 3.2.20 / lts HAProxy 3.2 LTS release branch installed from FreeBSD latest packages. Alternative build.
3.0 / 3.0-pkg-latest / 3.0.24 HAProxy 3.0 LTS release branch installed from FreeBSD latest packages. Alternative build.
2.8 / 2.8-pkg-latest / 2.8.25 HAProxy 2.8 LTS release branch installed from FreeBSD latest packages. Alternative build.
2.6 / 2.6-pkg-latest / 2.6.30 HAProxy 2.6 LTS release branch installed from FreeBSD latest packages. Alternative build.
2.4 / 2.4-pkg-latest / 2.4.35 HAProxy 2.4 LTS release branch installed from FreeBSD latest packages. Alternative build.
devel / devel-pkg-latest HAProxy development edge release branch installed from FreeBSD latest packages. Alternative build.
3.4-lua / 3.4-lua-pkg-latest / 3.4.1-lua / lua HAProxy 3.4 release branch with Lua scripting enabled. Alternative build.
3.3-lua / 3.3-lua-pkg-latest / 3.3.11-lua HAProxy 3.3 release branch with Lua scripting enabled. Alternative build.
3.2-lua / 3.2-lua-pkg-latest / 3.2.20-lua HAProxy 3.2 LTS release branch with Lua scripting enabled. Alternative build.
3.0-lua / 3.0-lua-pkg-latest / 3.0.24-lua HAProxy 3.0 LTS release branch with Lua scripting enabled. Alternative build.
2.8-lua / 2.8-lua-pkg-latest / 2.8.25-lua HAProxy 2.8 LTS release branch with Lua scripting enabled. Alternative build.
2.6-lua / 2.6-lua-pkg-latest / 2.6.30-lua HAProxy 2.6 LTS release branch with Lua scripting enabled. Alternative build.
2.4-lua / 2.4-lua-pkg-latest / 2.4.35-lua HAProxy 2.4 LTS release branch with Lua scripting enabled. Alternative build.
3.4-wolfssl / 3.4-wolfssl-pkg-latest / 3.4.1-wolfssl / wolfssl HAProxy 3.4 release branch built with WolfSSL TLS engine. Alternative build.
3.3-wolfssl / 3.3-wolfssl-pkg-latest / 3.3.11-wolfssl HAProxy 3.3 release branch built with WolfSSL TLS engine. Alternative build.
3.2-wolfssl / 3.2-wolfssl-pkg-latest / 3.2.20-wolfssl HAProxy 3.2 LTS release branch built with WolfSSL TLS engine. Alternative build.
3.0-wolfssl / 3.0-wolfssl-pkg-latest / 3.0.24-wolfssl HAProxy 3.0 LTS release branch built with WolfSSL TLS engine. Alternative build.

Root Privileges Required

Podman on FreeBSD currently requires root. All commands must be run as root (or via doas/sudo).

Before deploying, ensure your host environment is ready. See the Quick Start Guide for host setup instructions.

Deployment

services:
  haproxy:
    image: "ghcr.io/daemonless/haproxy:latest"
    container_name: haproxy
    environment:
      - PUID=1000  # User ID for the application process
      - PGID=1000  # Group ID for the application process
      - TZ=UTC  # Timezone for the container
    volumes:
      - "/path/to/containers/haproxy:/config"
    ports:
      - "80:80"
      - "443:443"
      - "8404:8404"
    restart: unless-stopped
1
2
3
4
5
6
# .env

DIRECTOR_PROJECT=haproxy
PUID=1000
PGID=1000
TZ=UTC
# appjail-director.yml

options:
  - virtualnet: ':<random> default'
  - nat:
services:
  haproxy:
    name: haproxy
    options:
      - container: 'boot args:--pull'
      - expose: '80:80 proto:tcp' \
      - expose: '443:443 proto:tcp' \
      - expose: '8404:8404 proto:tcp' \
    oci:
      user: root
      environment:
        - PUID: !ENV '${PUID}'
        - PGID: !ENV '${PGID}'
        - TZ: !ENV '${TZ}'
    volumes:
      - HAPROXY_CONFIG_PATH: /config
volumes:
  HAPROXY_CONFIG_PATH:
    device: '/path/to/containers/haproxy'
1
2
3
4
5
6
# Makejail

ARG tag=latest

OPTION overwrite=force
OPTION from=ghcr.io/daemonless/haproxy:${tag}
1
2
3
4
5
6
7
8
9
podman run -d --name haproxy \
  -p 80:80 \
  -p 443:443 \
  -p 8404:8404 \
  -e PUID=1000 \
  -e PGID=1000 \
  -e TZ=UTC \
  -v /path/to/containers/haproxy:/config \
  ghcr.io/daemonless/haproxy:latest
appjail oci run -Pd \
  -o overwrite=force \
  -o container="args:--pull" \
  -o virtualnet=":<random> default" \
  -o nat \
  -o expose="80:80 proto:tcp" \
  -o expose="443:443 proto:tcp" \
  -o expose="8404:8404 proto:tcp" \
  -e PUID=1000 \
  -e PGID=1000 \
  -e TZ=UTC \
  -o fstab="/path/to/containers/haproxy /config <pseudofs>" \
  ghcr.io/daemonless/haproxy:latest haproxy
- name: Deploy haproxy
  containers.podman.podman_container:
    name: haproxy
    image: "ghcr.io/daemonless/haproxy:latest"
    state: started
    restart_policy: always
    env:
      PUID: "1000"
      PGID: "1000"
      TZ: "UTC"
    ports:
      - "80:80"
      - "443:443"
      - "8404:8404"
    volumes:
      - "/path/to/containers/haproxy:/config"

Interactive Configuration

Parameters

Environment Variables

Variable Default Description
PUID 1000 User ID for the application process
PGID 1000 Group ID for the application process
TZ UTC Timezone for the container

Volumes

Path Description
/config Configuration directory containing haproxy.conf

Ports

Port Protocol Description
80 TCP HTTP Listener
443 TCP HTTPS Listener (optional)
8404 TCP HAProxy Stats Page (optional)

Implementation Details

  • Architectures: amd64
  • User: bsd (UID/GID set via PUID/PGID). Defaults to 1000:1000.
  • Base: Built on ghcr.io/daemonless/base (FreeBSD 15.1).

Need help? Join our Discord community.