NextCloud VM - Pfsense HAProxy setup

Nextcloud version: 28.0
Operating system and version: NextCloud VM
Apache or nginx version 2.4.52
PHP version 7.4

The issue you are facing:

First of all, thanks you for this great setup. I already tried different methods of installing NextCloud and this one is by far the easiest one.

I’m running Pfsense and use HAproxy withing the Pfsense appliance to face internal web pages to the internet (home assistant, bitwarden, zoneminder etc.)

But I can’t get NextCloud vm to work over the HaProxy.

Internal I can reach Nextcloud on → it points to the “hank you for downloading the Nextcloud VM” page, if I type manually /nextcloud behind that it will redirect to the login page

Internal I can also reach Nextcloud on → it points directly to the login page.

Now the Pfsense Haproxy part:

I configured the backend as follow:

Name: cloud mydomain com
Forwardto: Address+Port
Port: 443
Encrypt: Yes
SSL checks: No

Health check: none / http / ssl (tried all of them) The backend server will not come online, it stay down. I also tried it with SSL checks: yes or Encrypt: No or both of them.

The only way it will work is with this backend settings:

Name: cloud mydomain com
Forwardto: Address+Port
Port: 80
Encrypt: No
SSL checks: No

Health Check method: http

But then I will faced to the webserver *80 default-website that is facing to the Welcome page again, if I putt /nextcloud behind https:// then it will redirect to the login page (same behaviour as the internal http://

But when I login to NextCloud I receive Permissions denied errors when navigating trough NextCloud

For example, if I press “files” or “photos” I will receive:


You don’t have permissions to access this resource.

So I cannot simply solve this by add the redirect page /nextcloud to the internal http site because of the Forbidden.

can someone point me in the right direction to solve this?

Preferably I disable the https backend so I can have ssl offloaded by haproxy

All settings are left default except the trusted domains, to which I added cloud mydomain com