Getting or building HAproxy 2.2+

What is the problem?

The version of HAproxy bundled upstream from Raspbian seems to be 1.8. This means that all the nice new directives that were added around 2.2 are not available. I'm looking to use http-request replace-path in my config and so am chasing a HAp 2.4 upgrade.

What did you already try to solve it?

Spent a zillion years figuring out that what I needed was in a newer version, but that version appears not distributed through available apt repositories for RPi's ARM architecture.

Have you tried running in safe mode?


Did running in safe mode solve the problem?


Systeminfo Bundle

You can download this in OctoPrint's System Information dialog ... no bundle, no support!) (1.6 MB)

Additional information about your setup

OctoPrint version, OctoPi version, printer, firmware, browser, operating system, ... as much data as possible

Stock Octopi image on a RPi Z2 W.

If it's not available to the environment you'll have to find a 3rd party package or build it from source.

Yes, that's what I'm asking for.

Does anyone know a source for a binary?

Has anyone built from source successfully?

You could try an OctoPi nightly image or the current release candidate (there are a few bugs in the RC fixed in nightly) - that has haproxy 2.2.9 apparently:

$ haproxy -v
HA-Proxy version 2.2.9-2+rpi1+deb11u3 2022/03/17 -
Status: long-term supported branch - will stop receiving fixes around Q2 2025.
Known bugs:
Running on: Linux 5.15.32-v7l+ #1538 SMP Thu Mar 31 19:39:41 BST 2022 armv7l
1 Like

2.2+ binary

2.4+ binary

Well I'll be damned. apt didn't find the armhf candidate when I tried to do this the obvious way and I didn't bother to check the ppa.

I guess it's a place to start. Thanks @PrintedWeezl

1 Like

That's the official debian repo

Maybe you can help me understand what you're suggesting @PrintedWeezl. Raspian is based on Debian, but has it's own set of pre-installed official repos. Just because something is in the Debian repo does not mean Raspian has included it in theirs. Case in point:

I had checked the Raspbian repos since they would be dependancy and compatibility point-and-shoot for my device. Grabbing a Bullseye install candidate directly may not be as simple though and if I'm going to have to jump through dependancy-conflict hell, I might as well build from source ... maybe?

Which kind of circles back to my original question, which is for advice from someone who has done this on which way to go. I know "how" to do these things, just not what is smart.

  • Is there a reason haproxy has been pinned a major version and 6 years behind on Raspbian?
  • Is there anything complex about Octopi 1.0 RC suddenly fast-forwarding to HAp 2.2 as @Charlie_Powell pointed out that I would need to beware of?
  • Am I being a tool and over-thinking this?


Everything works correctly with haproxy & OctoPi 1.0.0rc as far as we can tell on the Bullseye images. The only reported issues in general can be seen in the issue I linked above. It needed a new configuration from 1.x to 2.x, however that was all handled a long time ago when Bullseye was released.

In terms of dependency pinning, I'm not sure anybody specifically pinned anything. 1.8.19 is the latest available on Buster, and according to some quick googling I did, 1.8 was an LTS version released in 2018 (so 4 years old). Buster was released in 2019, so it makes sense that they would pick to use the latest version at the time.

I wouldn't mix the debian repos with the 32bit raspbian repos.
If you REALLY want to do it use apt pinning and just install the packages you need.
You just asked for a binary so I sent you the link.

Btw raspbian 64bit uses the debian repos.

I would do what @Charlie_Powell suggested - just switch to OctoPi 1.0.0.
Works fine for me.

Thanks for the feedback everyone!