# Nextcloud/Synology/Portainer/HaProxy

**URL:** <https://help.nextcloud.com/t/nextcloud-synology-portainer-haproxy/230930>\
**Category:** ℹ️ Support\
**Tags:** nas, synology\
**Created:** [August 25, 2025, 5:21pm UTC](https://help.nextcloud.com/t/nextcloud-synology-portainer-haproxy/230930 "2025-08-25T17:21:38Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ahole4sure](https://help.nextcloud.com/letter_avatar/ahole4sure/32/6_449c533f586939b6e5f246632a46421f.png) [@ahole4sure](https://help.nextcloud.com/u/ahole4sure)\
**Post date:** [August 25, 2025, 5:21pm UTC](https://help.nextcloud.com/t/nextcloud-synology-portainer-haproxy/230930/1 "2025-08-25T17:21:38Z")

</div>

Wondering if anyone is using similar setup.

I am trying to install Nextcloud on my Synology NAS using Portainer and Docker Compose

I have a pfsense router/firewall that I use haproxy  
I have pointed [nextcloud.mydomain.com](http://nextcloud.mydomain.com) to port xx443 in haproxy

I have tried using the following docker compose:

* * *

services:  
nextcloud:  
image: [lscr.io/linuxserver/nextcloud:latest](http://lscr.io/linuxserver/nextcloud:latest)  
container\_name: nextcloud  
environment:  
- PUID=1038  
- PGID=100  
- TZ=America/NewYork

```
volumes:
  - /volume2/docker_ssd/nextcloud/config:/config
  - /volume1/data/nextcloud:/data
ports:
  - xx443:xx443
restart: unless-stopped

```

I cannot reach the server -  
When going to [https://nextcloud.mydomain.com](https://nextcloud.mydomain.com) I get the following:  
— 400 Bad Request

## The plain HTTP request was sent to HTTPS port

nginx

But I can’t reach the nextcloud server locally either using 192.168.1.xx:xx443

Any help or thoughts on how I should configure would be helpful. I was trying to handle this at the haproxy level because I may be moving away form Synology soon

---

<div class="post-metadata">

**Author:** ![bb77](https://help.nextcloud.com/letter_avatar/bb77/32/6_449c533f586939b6e5f246632a46421f.png) [@bb77](https://help.nextcloud.com/u/bb77)\
**Post date:** [August 26, 2025, 8:49am UTC](https://help.nextcloud.com/t/nextcloud-synology-portainer-haproxy/230930/2 "2025-08-26T08:49:08Z")

</div>

> [@ahole4sure](#):
>
> ```auto
> ports:
> - xx443:xx443
> 
> ```

I assume that xx are placeholders and that the actual port number is something like 10443.

If so, try the following:

```auto
ports:
  - 10443:443

```

This will map port 10443 on the Docker host to port 443 in the container.

---

<div class="post-metadata">

**Author:** ![bb77](https://help.nextcloud.com/letter_avatar/bb77/32/6_449c533f586939b6e5f246632a46421f.png) [@bb77](https://help.nextcloud.com/u/bb77)\
**Post date:** [August 26, 2025, 9:07am UTC](https://help.nextcloud.com/t/nextcloud-synology-portainer-haproxy/230930/3 "2025-08-26T09:07:37Z")

</div>

Also make sure HA proxy points to `https://xxx.xxx.xxx.xxx:10443`, “Encrypt(SSL)” is set to “yes”, and “SSL checks” is set to “no”, in your HA Proxy backend config. Also try clearing your browser cache.

If that still doesn’t help, maybe post your HA Proxy, and the output of:

```auto
occ config:list system

```

Also, since you are using the [Linuxserver.io](http://Linuxserver.io) image, it might make sense to ask your question here: [Support | LinuxServer.io](https://www.linuxserver.io/support)

And for specific questions about HA Proxy on pfSense, you also might want to ask here: [https://forum.netgate.com/](https://forum.netgate.com/)

---

<div class="post-metadata">

**Author:** ![system](https://help.nextcloud.com/user_avatar/help.nextcloud.com/system/32/29333_2.png) [@system](https://help.nextcloud.com/u/system)\
**Post date:** [November 24, 2025, 9:08am UTC](https://help.nextcloud.com/t/nextcloud-synology-portainer-haproxy/230930/4 "2025-11-24T09:08:16Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
