Help with pfSense HAProxy Websocket configuration

I’m looking for any support regarding enabling Websocket support for my homelab. I’m running pfsense 24.03, and have successfully implemented LetsEncrypt certificates using HAProxy.

Specifically, Open-WebUI has recently rolled an update which requires support for Websockets. I use Open-WebUI to make calls to my local Ollama instance.

My HAProxy configuration is as follows (local only)

Single Wildcard Frontend - *.local.my.domain

Each service I host has an associated ACL and Action. For example:

ACLS

Name Expression Value
serviceA Host matches: serviceA.local.my.domain
serviceB Host matches: serviceB.local.my.domain

Actions

Action Parameters Condition acl names
Use Backend See Below backend: serviceA_backend serviceA
Use Backend See Below backend: serviceB_backend serviceB

Multiple Backends

Each service has a unique backend which identifies the internal IP:Port of its host, and has a valid Client certificate.
All other settings are default.

Other examples

There seems to be a fair amount of information available for Nginx configurations, however i’ve struggled to adapt this to HAProxy. Hope that this thread can provide a resource for someone else in the future.

Thanks!

Please let me know if you need any additional information about my configuration or services.

This may help: WebSocket | HAProxy config tutorials.

HAProxy pretty much handles web sockets by default unless there’s something happening on another backend. If I remember, right, the pfSense implementation should be able to handle most HAProxy features.

1 Like

thanks for the response.

i did see that documentation, but wasn’t quite sure how to implement it in the GUI or integrate it into my config. i hate asking for handholding but… would you mind? :slight_smile:

Ii think it’ll depend a lot on the backend that’s using the websockets. I’m not familiar with Open-webUI, could you fill us in on how it is set up? Are you seeing specific behavior that’s not working after the update?