SOLVED Nextcloud plugin and Nginx Proxy Manager configuration problem

theomolenaar

Dabbler
Joined
Jun 12, 2016
Messages
43
Hi. I'm having a problem making a secure connection (HTTPS) from a public DNS to a locally installed Nextcloud plugin (version 23.0.0). I'm using Nginx Proxy Manager 2.9.12 with Portainer inside an Ubuntu VM. The Ubuntu VM is hosted on TrueNAS.
Ports 80 and 443 are opened in my router. I know NPM is working with another public DNS record (somesubdomainname.duckdns.org). Unfortunately I can't create a new subdomain with duckdns because of this error:
Screenshot 2021-12-06 at 11.33.51.png

So I registered a new subdomain at https://freedns.afraid.org.
Back in NPM I have set up a new Proxy host entry with this new Domain name. As an example (due to privacy) somesubdomainname.mooo.com).
Screenshot 2021-12-06 at 11.38.03.png
Screenshot 2021-12-06 at 11.39.38.png

After saving Letsencrypt will make an SSL certificate. As you can see the status for this new domain is Online.
Screenshot 2021-12-06 at 11.45.34.png

For Nextcloud I was told I needed to change some settings in:
/usr/local/www/nextcloud/config/config.php
Screenshot 2021-12-06 at 11.52.44.png

The yellow part is the public domain somesubdomainname.mooo.com. The same I used inside NPM.
Trusted proxies is the local ip for NPM.
Screenshot 2021-12-06 at 11.58.06.png

Any ideas on how to get an HTTPS connection with this setup?
 
Last edited:

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
It may be worth knowing that duckdns automatically creates the *.domain.duckdns.org record, so you already have all possible subdomains pointing at your IP from duckdns.

Any ideas on how to get an HTTPS connection with this setup?
You need to do a little more searching on config.php setups for reverse proxy and edit many more of the settings to make https the returned url/protocol.
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776

theomolenaar

Dabbler
Joined
Jun 12, 2016
Messages
43
Allright. I found a solution.
The first issue was that I didn't select NAT when installing the nextcloud plugin. I followed this video where Kevin Stevenson explained all the steps involved : https://www.youtube.com/watch?v=hxSAGY5zRwQ
As sretalla pointed out I could use a subdomain with duckdns. So that's what I did.
It may be worth knowing that duckdns automatically creates the *.domain.duckdns.org record, so you already have all possible subdomains pointing at your IP from duckdns.
You may get a 400 error " The plain HTTP request was sent to HTTPS port "
To fix this do this in NPM:
Screenshot 2021-12-08 at 03.50.18.png

 
Top