Need help to get ssl working on docker install on synology NAS

In short I have a basic nextcloud docker image on my synology NAS. I have set up ports 80 and 443 with reverse proxy and an external domain name. So far so good. Traffic gets rerouted and my domain works.
Steps I’ve taken

My ssl certificate is generated on my synology nas through let’s encrypt. I also tried using cloudflare and force https.

  1. I have added
    ‘overwrite.cli.url’ => ‘https://mydomain.com’,
    to the config.php. No change

  2. I wanted to try to add the ssl certificate directly in my nextcloud install by using
    nextcloud.enable-https
    however, that command does not exist on my synology NAS so I can’t do that.

  3. In a desperate attempt I tried the RewriteEngine to force https in .htaccess

What happens: No page found if i go to https://mydomain.com
If i go to http://mydomain.com it works fine. So it’s just https that doesn’t work.

Any ideas?
I would truly appreciate the help.

hi luvis,

synology knowledgebase
https://www.synology.com/en-global/knowledgebase/DSM/help/DSM/AdminCenter/connection_certificate

I also use NC15.0.5 on synology “without docker” and I don´t have problems like this, also I dont made changes for https access into my config.php

I am at office rigth now, so I can not have a look into my settings.

did you set your port forwarding to the IP of Synology in your router?
did you set your certificat on sylogy

Thanks for your response.
I have also been able to get nextcloud working without the docker install on my synology nas with ssl working fine… But I wanted to try out the docker version instead since there often seem to be issues with updating nextcloud when it’s installed directly on the NAS. I always have to change several permissions and do manual config file editing after an update which is a bit annoying. Updating a docker image is so much easier and happens without issue. The certificate is fine and working, it’s just that no page loads when connecting to the docker via https which is strange imo… Their is probably some super easy setting somewhere that I’m just missing.

This is a good description how to set up Synology NAS SSL with Docker but it is in german.

http://webermartin.net/blog/hoste-selbst-die-eigene-ssl-website-mit-docker-auf-dem-nas/

on this link you will found english translation

https://translate.google.com/translate?hl=de&sl=auto&tl=en&u=http%3A%2F%2Fwebermartin.net%2Fblog%2Fhoste-selbst-die-eigene-ssl-website-mit-docker-auf-dem-nas%2F&sandbox=1

I’m having a similar problem as @luvis. I’m running DSM 6.2.2-24922, Docker 17.0.5.0-0401, docker image 'nextcloud:latest ’ version 16.0. I have everything running fine on port 80 but just can’t get SSL to work.

Docker image detail:

Things I’ve done so far to get SSL to work with Nextcloud:

  1. Created SSL cert via Let’s Encrypt through DSM gui
  2. Created 2 DSM reverse proxy entries.
    a. change all incoming port 80 requests to port 443
    b. change all port 443 requests to port 32770 (Nextcloud docker image 443 port)
  3. Modified Nextcloud config.php file and changed ‘overwrite.cli.url’ => ‘http://mydomain.com’ to ‘overwrite.cli.url’ => 'https://mydomain.com
  4. Port forwarding on router also completed.

When I try to access the Nextcloud login page from browser I do get the secure padlock to the left of the address bar. So everything appears to be fine and SSL seems to be working except when I go to password manager I get this HTTPS Setup Report.

Just found a solution to my problem. I simply shutdown the container then added the following to the config.php file then started the image up.

‘trusted_proxies’ => [‘172.17.0.1’],
‘overwriteprotocol’ => ‘https’,

After logging in, I went back into the password manager and it went straight in without any errors. Hope this helps others.