# Vaultwarden not working with HAProxy after Updates

**URL:** <https://vaultwarden.discourse.group/t/vaultwarden-not-working-with-haproxy-after-updates/3592>\
**Category:** Third Party Help\
**Created:** [April 29, 2024, 8:57pm UTC](https://vaultwarden.discourse.group/t/vaultwarden-not-working-with-haproxy-after-updates/3592 "2024-04-29T20:57:09Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![shivamg42](https://avatars.discourse-cdn.com/v4/letter/s/ecae2f/32.png) [@shivamg42](https://vaultwarden.discourse.group/u/shivamg42)\
**Post date:** [April 29, 2024, 8:57pm UTC](https://vaultwarden.discourse.group/t/vaultwarden-not-working-with-haproxy-after-updates/3592/1 "2024-04-29T20:57:09Z")

</div>

Hello,

I recently updated my PFsense with HAProxy and my Vaultwarden Docker container. After updating both, I am getting a 503 Service Unavailable message. Prior to the update everything was working as intended. I was able to reach the server via the local IP(but not login due to no HTTPS) and from the domain. I believe I was running v.1.27 of Vaultwarden on docker. For HAProxy on my pfsense I upgraded to 2.9.1.

I tried reissuing the certificate and restarting all the services that are attached. Is there anything that changed in the recent versions on Vaultwarden that would break the previous configuration? I am attaching my HAProxy configuration below to see if anything looks off for the latest version of HAProxy

```auto
global
	maxconn 100
	log 127.0.0.1:5140	syslog	debug
	stats socket /tmp/haproxy.socket level admin expose-fd listeners
	uid 80
	gid 80
	nbthread 1
	hard-stop-after 15m
	chroot /tmp/haproxy_chroot
	daemon
	tune.ssl.default-dh-param	2048
	server-state-file /tmp/haproxy_server_state

listen HAProxyLocalStats
	bind 127.0.0.1:2200 name localstats
	mode http
	stats enable
	stats admin if TRUE
	stats show-legends
	stats uri /haproxy/haproxy_stats.php?haproxystats=1
	timeout client 5000
	timeout connect 5000
	timeout server 5000

frontend Synology
	bind WAN:443 name WAN:443 ssl crt-list /var/etc/haproxy/Synology.crt_list  
	mode http
	log global
	option http-keep-alive
	option forwardfor
	acl https ssl_fc
	http-request set-header X-Forwarded-Proto http if !https
	http-request set-header X-Forwarded-Proto https if https
	timeout client 30000
	acl vaultwarden	var(txn.txnhost) -m str -i custom.domain.dev
	acl aclcrt_Synology	var(txn.txnhost) -m reg -i ^([^\.]*)\.domain\.dev(:([0-9]){1,5})?$
	http-request set-var(txn.txnhost) hdr(host)
	use_backend Synology_Vaultwarden_ipvANY if vaultwarden aclcrt_Synology
	use_backend Synology_Vaultwarden_ipvANY if aclcrt_Synology

backend Synology_Vaultwarden_ipvANY
	mode http
	id 100
	log global
	option log-health-checks
	timeout connect 30000
	timeout server 30000
	retries 3
	load-server-state-from-file	global
server Synology Docker_IP:5151 id 101 ssl verify none

```

---

<div class="post-metadata">

**Author:** ![BlackDex](https://yyz2.discourse-cdn.com/free1/user_avatar/vaultwarden.discourse.group/blackdex/32/8_2.png) [@BlackDex](https://vaultwarden.discourse.group/u/BlackDex)\
**Post date:** [May 5, 2024, 8:00am UTC](https://vaultwarden.discourse.group/t/vaultwarden-not-working-with-haproxy-after-updates/3592/2 "2024-05-05T08:00:37Z")

</div>

I would suggest to read the proxy examples [Proxy examples · dani-garcia/vaultwarden Wiki · GitHub](https://github.com/dani-garcia/vaultwarden/wiki/Proxy-examples) and compare

---

<div class="post-metadata">

**Author:** ![shivamg42](https://avatars.discourse-cdn.com/v4/letter/s/ecae2f/32.png) [@shivamg42](https://vaultwarden.discourse.group/u/shivamg42)\
**Post date:** [May 8, 2024, 8:42pm UTC](https://vaultwarden.discourse.group/t/vaultwarden-not-working-with-haproxy-after-updates/3592/3 "2024-05-08T20:42:49Z")

</div>

I have looked at it and tried to copy it and have not had any luck. The weird thing is that everything was working fine between my HAProxy and Vaultwarden before updating both. I am not sure if the issue is coming from the HAProxy side or the Vaultwarden side. Would you have any insight on where I should look to troubleshoot?

---

<div class="post-metadata">

**Author:** ![shivamg42](https://avatars.discourse-cdn.com/v4/letter/s/ecae2f/32.png) [@shivamg42](https://vaultwarden.discourse.group/u/shivamg42)\
**Post date:** [May 10, 2024, 8:50pm UTC](https://vaultwarden.discourse.group/t/vaultwarden-not-working-with-haproxy-after-updates/3592/4 "2024-05-10T20:50:48Z")

</div>

I fixed this issue. When I was running 23.09, I had my backed “Encrypt(SSL)” option checked and everything was working as expected. When I upgraded to 24.03, I had to UNCHECK “Encrypt(SSL)” and my services stopped showing the error.

---

<div class="post-metadata">

**Author:** ![dirtmerchant](https://avatars.discourse-cdn.com/v4/letter/d/e68b1a/32.png) [@dirtmerchant](https://vaultwarden.discourse.group/u/dirtmerchant)\
**Post date:** [November 28, 2024, 7:13am UTC](https://vaultwarden.discourse.group/t/vaultwarden-not-working-with-haproxy-after-updates/3592/5 "2024-11-28T07:13:21Z")

</div>

I created an account here to simply say “Thank you”. I’m so happy I found your resolution, even after ripping some hair out …
