- Home
- Docs
- Configuration
- Community
- Windows version
- Switching a Windows installation of ONLYOFFICE Docs to HTTPS
Switching a Windows installation of ONLYOFFICE Docs to HTTPS
Introduction
In most cases, accessing ONLYOFFICE Docs via HTTPS protocol is much more secure than via HTTP which is used by default. To change the editors' access method, certain actions must be performed. Please follow the steps below to find out how to switch your ONLYOFFICE Docs to HTTPS protocol.
Switching ONLYOFFICE Docs v5.3 and later to HTTPS
Before you can start to switch your ONLYOFFICE Docs to HTTPS protocol, you will need to create a security certificate and the certificate private key. Put them into a folder on the computer where ONLYOFFICE Docs is installed.
Once you have the certificate, proceed with the steps below:
All the commands should be executed with administrative privileges. To start a command prompt as an administrator, right-click the Start menu button in the lower left corner of the desktop and click the Command Prompt (Admin) option.
-
Stop the ONLYOFFICE DocumentServer Proxy service:
net stop DsProxySvc -
Copy the
%ProgramFiles%\ONLYOFFICE\DocumentServer\nginx\conf\ds-ssl.conf.tmplfile to the%ProgramFiles%\ONLYOFFICE\DocumentServer\nginx\conf\ds.conffile using the following command:COPY /Y "%ProgramFiles%\ONLYOFFICE\DocumentServer\nginx\conf\ds-ssl.conf.tmpl" "%ProgramFiles%\ONLYOFFICE\DocumentServer\nginx\conf\ds.conf" -
Edit the
%ProgramFiles%\ONLYOFFICE\DocumentServer\nginx\conf\ds.conffile, replacing all the parameters in double curly brackets {{...}} with the actual values:Please note that the backslash characters ( \ ) must be escaped in one of the following ways:C:\\yourfolder\\certificates\\onlyoffice.keyorC:/yourfolder/certificates/onlyoffice.key. If there are spaces in the path, you need to enclose it in quotation marks, e.g.:"C:/yourfolder/my certificates/onlyoffice.key".- {{SSL_CERTIFICATE_PATH}} - the path to the SSL certificate you obtained;
- {{SSL_KEY_PATH}} - the path to the SSL certificate private key;
- {{SSL_VERIFY_CLIENT}} - whether the verification of client certificates is enabled (with available values of
on,off,optionalandoptional_no_ca); - {{CA_CERTIFICATES_PATH}} - the path to the client certificate, which will be verified if enabled with the previous parameter;
- {{ONLYOFFICE_HTTPS_HSTS_MAXAGE}} - advanced configuration option for setting the HSTS max-age in the ONLYOFFICE Docs NGINX vHost configuration, and applicable only when SSL is in use (usually defaults to
31536000which is considered to be safe enough); - {{SSL_DHPARAM_PATH}} - the path to the Diffie-Hellman parameter;
-
Once all changes are saved, restart the ONLYOFFICE DocumentServer Proxy service:
net start DsProxySvcPort 443 must be opened for correct ONLYOFFICE Docs operation. - Execute
%ProgramFiles%\ONLYOFFICE\DocumentServer\bin\documentserver-update-securelink.bat
Switching ONLYOFFICE Docs v4.3–v5.2 to HTTPS
These instructions apply to older versions of ONLYOFFICE Docs (v4.3–v5.2). We recommend upgrading to the latest version. If you cannot upgrade, follow these steps alongside the main instructions above, noting that steps 2 and 3 differ as described below.
- Copy the
%ProgramFiles%\ONLYOFFICE\DocumentServer\nginx-1.11.4\conf\onlyoffice-documentserver-ssl.conf.templatefile to the%ProgramFiles%\ONLYOFFICE\DocumentServer\nginx-1.11.4\conf\onlyoffice-documentserver.conffile using the following command:COPY /Y "%ProgramFiles%\ONLYOFFICE\DocumentServer\nginx-1.11.4\conf\onlyoffice-documentserver-ssl.conf.template" "%ProgramFiles%\ONLYOFFICE\DocumentServer\nginx-1.11.4\conf\onlyoffice-documentserver.conf" - Edit the
%ProgramFiles%\ONLYOFFICE\DocumentServer\nginx-1.11.4\conf\onlyoffice-documentserver.conffile, replacing all the parameters in double curly brackets {{...}} with the actual values as described in step 3 above.
Article with the tag:
Browse all tags