Switching a Windows installation of ONLYOFFICE Apps Developer to HTTPS
Introduction
When you install ONLYOFFICE Apps Developer on Windows, you can use the letsencrypt.org service and script to easily create a CA-signed certificate and switch the workspace to HTTPS with a single command.
The article below will explain how this can be done.
When switching to HTTPS, port 443 must be available.
Creating and installing CA-signed certificate
You need PowerShell version 5.1 or later installed on your computer.
Run Windows PowerShell as administrator. By default, PowerShell is installed at the following path:
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
In the PowerShell console, go to the \sbin\ directory. To do that, use the following command:
cd "C:\Program Files\Ascensio System SIA\Apps\sbin"
Run the following script:
./apps-ssl-setup.ps1 EMAIL DOMAIN
Where:
-
EMAILis the email used for registration and recovery contact.Use comma to register multiple emails, for example: u1@example.com,u2@example.com. User emails must be enclosed in quotes.
Example of a command to run the script:
./apps-ssl-setup.ps1 "EMAIL1,EMAIL2" DOMAIN -
DOMAINis the address of the domain where your ONLYOFFICE Apps Developer workspace is installed.
Check A records for your domain (e.g. using the ping command), otherwise the certificate will not be issued.
The script will create and install the CA-signed certificate to your server.
Now your workspace should be available via the https:// address.
A task of automatic certificate prolongation will be added to the task scheduler. You will not need to re-run the script when the certificate expires.
Using own certificates
You can use your own certificates via the -f parameter:
./apps-ssl-setup.ps1 -f yourdomain.com CERTIFICATE PRIVATEKEY
Where:
CERTIFICATEis the path to the certificate file for the domain.PRIVATEKEYis the path to the private key file for the certificate.
A self-signed certificate must have a full chain to work correctly.
Now your workspace should be available via the https:// address.