we need version 3.0+ for json logs to work
apt install gnupg1 curl lsb-release # no exist ls -lF /usr/share/keyrings/haproxy.asc ls -lF /usr/share/keyrings/haproxy.gpg ls -lF /etc/apt/sources.list.d/haproxy.list
grab the latest available release for your distribution
#apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 95A42FE8353525F9 wget https://haproxy.debian.net/bernat.debian.org.gpg -O /usr/share/keyrings/haproxy.asc gpg1 --dearmor < /usr/share/keyrings/haproxy.asc > /usr/share/keyrings/haproxy.gpg rel=3.1
cat > /etc/apt/sources.list.d/haproxy.list <<EOF deb [signed-by=/usr/share/keyrings/haproxy.gpg] http://haproxy.debian.net `lsb_release -cs 2>/dev/null`-backports-$rel main EOF
apt update apt install haproxy=$rel.* vim-haproxy=$rel.* # 114:122 on debian12 grep ^haproxy /etc/group grep ^haproxy /etc/passwd
notice syslog config and log rotation are in place
ls -lF /etc/rsyslog.d/49-haproxy.conf ls -lF /etc/logrotate.d/haproxy
# up and enabled systemctl status haproxy journalctl -u haproxy.service --since today --no-pager
you can now proceed with the setup
https://www.digitalocean.com/community/tutorial_series/common-haproxy-errors
https://www.digitalocean.com/community/tutorials/how-to-troubleshoot-common-haproxy-errors
https://github.com/haproxy/haproxy/issues/366
https://serverfault.com/questions/941762/haproxy-tls-configuration/941812