- Home
- DocSpace
- Installation
- Community
- Switching your ONLYOFFICE DocSpace Community to HTTPS for the Windows version
Switching your ONLYOFFICE DocSpace Community to HTTPS for the Windows version
Introduction
When you install ONLYOFFICE DocSpace Community on Windows, you can use the letsencrypt.org service and script 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.
Creating and installing CA-signed certificate
Run Windows PowerShell as administrator. By default, PowerShell is installed at the following path:
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exeIn the PowerShell console, go to the \sbin\ directory. To do that, use the following command:
cd "C:\Program Files (x86)\Ascensio System SIA\DocSpace\sbin"Run the following script:
./docspace-ssl-setup.ps1 EMAIL DOMAINWhere:
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:
./docspace-ssl-setup.ps1 "EMAIL1,EMAIL2" DOMAINDOMAINis the address of the domain where your ONLYOFFICE DocSpace Community portal is installed.
ping command), otherwise the certificate will not be issued.The script will create and install the CA-signed certificate to your server.
Now your portal should be available via the https:// address.
Using own certificates
You can use your own certificates via the -f parameter:
./docspace-ssl-setup.ps1 -f yourdomain.com CERTIFICATE PRIVATEKEYWhere:
CERTIFICATEis the path to the certificate file for the domain.PRIVATEKEYis the path to the private key file for the certificate.
Now your portal should be available via the https:// address.