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

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.