[GH-ISSUE #127] DocumentServer via HTTP works but not via HTTPS #70

Closed
opened 2026-02-26 09:35:58 +03:00 by kerem · 7 comments
Owner

Originally created by @dreamflasher on GitHub (Sep 24, 2018).
Original GitHub issue: https://github.com/ONLYOFFICE/Docker-DocumentServer/issues/127

Do you want to request a feature or report a bug?
bug

What is the current behavior?
DocumentServer is reachable via HTTP but not via HTTPS

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem.
Exactly followed this documentation: https://github.com/ONLYOFFICE/Docker-DocumentServer/blob/master/README.md#running-onlyoffice-document-server-using-https
Except changing the port to 444, because 443 is already in use.

What is the expected behavior?
"Unable to connect" in browser

DocumentServer Docker tag:
latest (please add in the github template for the tickets the command to find this out)

Host Operating System:
Ubuntu 16.04

Originally created by @dreamflasher on GitHub (Sep 24, 2018). Original GitHub issue: https://github.com/ONLYOFFICE/Docker-DocumentServer/issues/127 **Do you want to request a *feature* or report a *bug*?** bug **What is the current behavior?** DocumentServer is reachable via HTTP but not via HTTPS **If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem.** Exactly followed this documentation: https://github.com/ONLYOFFICE/Docker-DocumentServer/blob/master/README.md#running-onlyoffice-document-server-using-https Except changing the port to 444, because 443 is already in use. **What is the expected behavior?** "Unable to connect" in browser **DocumentServer Docker tag:** latest (please add in the github template for the tickets the command to find this out) **Host Operating System:** Ubuntu 16.04
kerem closed this issue 2026-02-26 09:35:59 +03:00
Author
Owner

@ibnpetr commented on GitHub (Sep 26, 2018):

Hello

Except changing the port to 444, because 443 is already in use.

Did you use sudo docker run -i -t -d -p 444:443 -v app/onlyoffice/DocumentServer/data:/var/www/onlyoffice/Data onlyoffice/documentserver to run a new container?
If DocumentServer is still reachable via HTTP and the certificates are in the folder /app/onlyoffice/DocumentServer/data/certs/, please restart the container, default nginx config in the container will be changed to HTTPS

<!-- gh-comment-id:424778744 --> @ibnpetr commented on GitHub (Sep 26, 2018): Hello > Except changing the port to 444, because 443 is already in use. Did you use `sudo docker run -i -t -d -p 444:443 -v app/onlyoffice/DocumentServer/data:/var/www/onlyoffice/Data onlyoffice/documentserver` to run a new container? If DocumentServer is still reachable via HTTP and the certificates are in the folder **/app/onlyoffice/DocumentServer/data/certs/**, please restart the container, default nginx config in the container will be changed to HTTPS
Author
Owner

@dreamflasher commented on GitHub (Sep 27, 2018):

Did you use sudo docker run -i -t -d -p 444:443 -v app/onlyoffice/DocumentServer/data:/var/www/onlyoffice/Data onlyoffice/documentserver to run a new container?

No, your command does not work because it is missing the leading slash before the app. The command I used is

sudo docker run -i -t -d -p 444:443 -v /app/onlyoffice/DocumentServer/data:/var/www/onlyoffice/Data onlyoffice/documentserver

I think my main issue is that it's not clear to me which folder is the local and which the docker folder (in the volume), and I also find the docker documentation incomprehensible (they call it source and target, but this depends on the perspective). So I copied them now everywhere:
outside of docker:
ls /var/www/onlyoffice/Data/certs and ls /app/onlyoffice/DocumentServer/data/certs/ yield dhparam.pem onlyoffice.crt onlyoffice.csr onlyoffice.key. While the latter one apparently gets deleted when starting a new docker container (after killing the old one).

Within the docker container (sudo docker exec -it “container-id” bash)
ls /var/www/onlyoffice/Data/certs yields the same as above and /app/onlyoffice/DocumentServer/data/certs/ does not exist, so I created it and copied the certificates over.

please restart the container, default nginx config in the container will be changed to HTTPS

Done several times via sudo docker restart "container".
The server is still not reachable.

<!-- gh-comment-id:424978215 --> @dreamflasher commented on GitHub (Sep 27, 2018): > Did you use `sudo docker run -i -t -d -p 444:443 -v app/onlyoffice/DocumentServer/data:/var/www/onlyoffice/Data onlyoffice/documentserver` to run a new container? No, your command does not work because it is missing the leading slash before the app. The command I used is `sudo docker run -i -t -d -p 444:443 -v /app/onlyoffice/DocumentServer/data:/var/www/onlyoffice/Data onlyoffice/documentserver` I think my main issue is that it's not clear to me which folder is the local and which the docker folder (in the volume), and I also find the docker documentation incomprehensible (they call it source and target, but this depends on the perspective). So I copied them now everywhere: outside of docker: `ls /var/www/onlyoffice/Data/certs` and `ls /app/onlyoffice/DocumentServer/data/certs/` yield `dhparam.pem onlyoffice.crt onlyoffice.csr onlyoffice.key`. While the latter one apparently gets deleted when starting a new docker container (after killing the old one). Within the docker container (`sudo docker exec -it “container-id” bash`) `ls /var/www/onlyoffice/Data/certs` yields the same as above and `/app/onlyoffice/DocumentServer/data/certs/` does not exist, so I created it and copied the certificates over. > please restart the container, default nginx config in the container will be changed to HTTPS Done several times via `sudo docker restart "container"`. The server is still not reachable.
Author
Owner

@ibnpetr commented on GitHub (Sep 27, 2018):

When creating a new container you use -v /app/onlyoffice/DocumentServer/data:/var/www/onlyoffice/Data where /app/onlyoffice/DocumentServer/data is on your host and /var/www/onlyoffice/Data is inside the container.
If the files onlyoffice.crt and onlyoffice.key are in the /app/onlyoffice/DocumentServer/data/certs and both certificate and key are ok, it will work (just tried in the test environment)

The server is still not reachable.

Not reachable at all or not reachable via 444?

<!-- gh-comment-id:425065443 --> @ibnpetr commented on GitHub (Sep 27, 2018): When creating a new container you use -v /app/onlyoffice/DocumentServer/data:/var/www/onlyoffice/Data where /app/onlyoffice/DocumentServer/data is on your **host** and /var/www/onlyoffice/Data is **inside the container**. If the files onlyoffice.crt and onlyoffice.key are in the /app/onlyoffice/DocumentServer/data/certs and both certificate and key are ok, it will work (just tried in the test environment) > The server is still not reachable. Not reachable at all or not reachable via 444?
Author
Owner

@dreamflasher commented on GitHub (Sep 27, 2018):

Thank you for the -v host:container explanation, that's very helpful.

Not reachable at all or not reachable via 444?

The document server is not reachable via https://server.tld:444/ -- Nextcloud is running on the same server and is reachable via https://server.tld

I restarted the server, and it's still not working. I created the certificates as described here: https://github.com/ONLYOFFICE/Docker-DocumentServer/blob/master/README.md#running-onlyoffice-document-server-using-https

<!-- gh-comment-id:425132175 --> @dreamflasher commented on GitHub (Sep 27, 2018): Thank you for the `-v host:container` explanation, that's very helpful. > Not reachable at all or not reachable via 444? The document server is not reachable via https://server.tld:444/ -- Nextcloud is running on the same server and is reachable via https://server.tld I restarted the server, and it's still not working. I created the certificates as described here: https://github.com/ONLYOFFICE/Docker-DocumentServer/blob/master/README.md#running-onlyoffice-document-server-using-https
Author
Owner

@dreamflasher commented on GitHub (Oct 3, 2018):

Do you have any ideas how to debug this? Where do I find error logs?

<!-- gh-comment-id:426529149 --> @dreamflasher commented on GitHub (Oct 3, 2018): Do you have any ideas how to debug this? Where do I find error logs?
Author
Owner

@dreamflasher commented on GitHub (Oct 5, 2018):

I tried a bunch of things (unfortunately I can't tell anymore which led to the change), and now I get a certificate error -- so that looks good, something is running there. But then I get a 502 Bad Gateway (nginx). After a few minutes after creation of the docker container it stops working at all Unable to connect -- even a restart of the container does not help, only if I kill it and start a new one I can get back to the 502 Bad Gateway.

<!-- gh-comment-id:427277794 --> @dreamflasher commented on GitHub (Oct 5, 2018): I tried a bunch of things (unfortunately I can't tell anymore which led to the change), and now I get a certificate error -- so that looks good, something is running there. But then I get a `502 Bad Gateway (nginx)`. After a few minutes after creation of the docker container it stops working at all `Unable to connect` -- even a restart of the container does not help, only if I kill it and start a new one I can get back to the 502 Bad Gateway.
Author
Owner

@dreamflasher commented on GitHub (Oct 8, 2018):

Solved it by uninstalling a local documentserver installation. I had tried an installation of documentserver without docker, and that was apparently badly interacting with the documentserver docker. The uninstall requires editing a dpkg file, here's the solution for that: https://github.com/ONLYOFFICE/DocumentServer/issues/399#issuecomment-428004663

<!-- gh-comment-id:428009138 --> @dreamflasher commented on GitHub (Oct 8, 2018): Solved it by uninstalling a local documentserver installation. I had tried an installation of documentserver without docker, and that was apparently badly interacting with the documentserver docker. The uninstall requires editing a dpkg file, here's the solution for that: https://github.com/ONLYOFFICE/DocumentServer/issues/399#issuecomment-428004663
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/Docker-DocumentServer-ONLYOFFICE#70
No description provided.