Switching your office to HTTPS on Windows

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 protocol.

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

The article below will explain how this can be done. To install your own certificate, please refer to this article.

Creating and installing CA-signed certificate

Step 1. Check 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. Open PowerShell as administrator

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


Step 3. Navigate 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. Run 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 Edition 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 which you use.

The script will create and install the CA-signed certificate to 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