NextcloudPi + Nginx Proxy Manage configuration How to

*This is not a help request. *
Here I want to share how I configured my NCP and NGINX PM:

HOW TO:

  • I have a raspberry pi with only Nextcloud on it (not in docker)
  • I installed Nginx PM on a separate Pi in a docker
  • I added a Proxy Host with the same domain I had it set in the Nextcloud config
  • The proxy host is set with the domain to be forwarded to the intenal LAN IP with scheme https on port 443. Blocked common exploits and websockets support checked.
  • Added SSL support with letsencrypt, force SSL and HTTP/2 checked.
  • Added proxy_hide_header Upgrade; in the Proxy Host Custom Nginx Configuration to solve the Iphone issue (iphone could not connect to nextcloud without this line).
  • No changes at all in the previewsly configured Nextcloud.
  • For some reason, when adding Trusted proxies on NCP, I lost ability to connect to my nextcloud. Works better without trasted proxies
2 Likes

Hi…I currently am running my NextcloudPI on an Odroid HC1. I’m moving away from the Odroid as Nextcloud is requiring 64bit for 26+ and moving to a mini PC as a home server.

I plan on running NextcloudPI in a docker container along with Home Assistant and Nginx PM. I figure this will be relatively similar to what you’ve done, so I was just curious as to if there were any changes you needed to make to the NextcloudPI install or was it just all in Nginx PM?

I just want to be able to use one cert for both Nextcloud and for Home Assistant.

Robert

hi Robert,
I know I am super late and probably you found your solution already.
As far as I understand the all process and the networking part of it, I can say you need to certification: one for each.
Mainly because NCP needs to be reachable and itself needs a certification.
Home assistant will have also to be reachable (if you need it to be reachable from the internet).
Both will have to have a domain or a subdomain.
In Nginx PM, you will just create the Hosts you need and for each of them you will generate a lets-encrypt cert. (all done by Nginx PM)

After 8 month, I believe you found your solution.
For those that read that now, I hope I could help.

Hi kattivius!
I think I have exactly your setup but it’s not working for me.

My first question would be how did you manage to run the Proxy Manager if the default ports for nextcloud are 80 and 443, which now the Proxy Manager needs. Following other guides I changed the ports in /etc/apache2/port.conf, but I can’t get the thing to work.

Now when I access my former nextcloud url I get the 502 Bad Gateway error