Switching a Windows installation of ONLYOFFICE Workspace Enterprise to HTTPS

Introduction

When you install ONLYOFFICE Workspace Enterprise on Windows, the HTTPS section will be absent from the Control Panel. This does not mean that you will not be able to switch your portal to HTTPS.

Starting with version 9.1, the letsencrypt.org service and script are used to create a CA-signed certificate and switch the portal to HTTPS with a single command.

The article below explains how to do it. To install your own certificate, refer to this article.

Creating and installing a CA-signed certificate

Step 1. Checking the PowerShell version

You need PowerShell version 5.1 or later installed on your computer. By default, PowerShell is installed at the following path:

C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe

To check your PowerShell version, open PowerShell and run:

$PSVersionTable.PSVersion

If the version is earlier than 5.1, update PowerShell before proceeding.


Step 2. Opening PowerShell as administrator

Right-click the PowerShell shortcut and select Run as administrator.


Step 3. Navigating to the Tools directory

In the PowerShell console, navigate to the Tools directory using the following command:

cd "C:\Program Files (x86)\Ascensio System SIA\CommunityServer\Tools"
Step 4. Running the Let's Encrypt script
Before running the script, make sure the DNS A records for your domain and all subdomains are configured correctly and resolve to your server (e.g., verify using nslookup or ping). The certificate will not be issued if DNS is not configured properly.

Run the following script:

.\letsencrypt.ps1 yourdomain.com subdomain1.yourdomain.com subdomain2.yourdomain.com

Where yourdomain.com is the address of the domain where your ONLYOFFICE Workspace Enterprise portal is installed, and subdomain1.yourdomain.com and subdomain2.yourdomain.com (and any additional subdomains, each separated by a space) are the subdomains for the main domain that you use.

The script will create and install the CA-signed certificate on your server. Once it completes, your portal will be available at its https:// address.

A task for automatic certificate renewal will be added to the Task Scheduler. You will not need to re-run the script when the certificate expires.
Article with the tag:
Browse all tags