Docker-DocumentServer icon indicating copy to clipboard operation
Docker-DocumentServer copied to clipboard

Enabling HTTPS access Document Server on Ununtu

Open Sys-Admin889 opened this issue 6 years ago • 4 comments

Hello everyone,

  • I'm trying to install ONLYOFFICE Document Server and running it using HTTPS as the following instructions .

  • I need to know how to configure parameters as described bellow? Please refer the docker run command options for the --env-file flag where you can specify all required environment variables in a single file. This will save you from writing a potentially long docker run command.

  • After searching, I found that the syntax is docker run [OPTIONS] IMAGE [COMMAND] [ARG...]

  • In my case: 1- [OPTIONS] will be --env-file 2- IMAGE will be onlyoffice/documentserver 3- [COMMAND] will be "/bin/sh -c /app/ds/…" Is this syntax is correct? 4- [ARG...] ??? I need to know what exactly mean?

    CONTAINER ID IMAGE COMMAND CREATED STATUS
    PORTS NAMES 5877bdecae84 onlyoffice/documentserver "/bin/sh -c /app/ds/…" 8 hours ago Exited ( 255) 26 minutes ago 80/tcp, 0.0.0.0:443->443/tcp inspiring_villani 9a5ddbdcf6d4 onlyoffice/documentserver "/bin/sh -c /app/ds/…" 8 hours ago Exited ( 255) 26 minutes ago 0.0.0.0:80->80/tcp, 443/tcp dreamy_turing b7a86f4d3d19 onlyoffice/documentserver "/bin/sh -c /app/ds/…" 8 hours ago Exited (255) 8 hours ago 80/tcp, 0.0.0.0:443->443/tcp dreamy_albattani cf46e4e99c05 onlyoffice/documentserver "/bin/sh -c /app/ds/…" 8 hours ago Exited (255) 8 hours ago 0.0.0.0:80->80/tcp, 443/tcp silly_bhaskara 3c6b80efed5c hello-world "/hello" 8 hours ago Exited (0) 8 hours ago
    vigila

  • I have SSL certification, SSL key and SSL dhparam paths.

  • I need to know the file that should collect these parameters:

    ONLYOFFICE_HTTPS_HSTS_ENABLED: Advanced configuration option for turning off the HSTS configuration. Applicable only when SSL is in use. Defaults to true. ONLYOFFICE_HTTPS_HSTS_MAXAGE: Advanced configuration option for setting the HSTS max-age in the onlyoffice nginx vHost configuration. Applicable only when SSL is in use. Defaults to 31536000. SSL_CERTIFICATE_PATH: The path to the SSL certificate to use. Defaults to /var/www/onlyoffice/Data/certs/onlyoffice.crt. SSL_KEY_PATH: The path to the SSL certificate's private key. Defaults to /var/www/onlyoffice/Data/certs/onlyoffice.key. SSL_DHPARAM_PATH: The path to the Diffie-Hellman parameter. Defaults to /var/www/onlyoffice/Data/certs/dhparam.pem. SSL_VERIFY_CLIENT: Enable verification of client certificates using the CA_CERTIFICATES_PATH file. Defaults to false

    ONLYOFFICE Document Server OS :- Ubuntu 18.4 LTS.

Sys-Admin889 avatar Mar 14 '20 23:03 Sys-Admin889

@ibnpetr can you help with ssl configuration?

ShockwaveNN avatar Mar 16 '20 08:03 ShockwaveNN

I have the same issue

Jay991 avatar Jul 16 '20 14:07 Jay991

struggling to enable https access too.

jiacai-wang avatar Oct 31 '20 14:10 jiacai-wang

I have got https to work on my ubuntu1804. It seemed that the pem file was to cause the issue in my case. I used Ali Cloud service and the https cert gave me 2 crt, 1 key and 1 pem file. I followed the struction in this github and applied self-generated cert and https worked fine. When using my own ssl file from Ali Cloud, pem file seemed different from the self-generated pem. So I just used .crt and .key file from Ali, leaving pem file missing, then https worked fine.

jiacai-wang avatar Nov 02 '20 07:11 jiacai-wang