The easiest way to switch ONLYOFFICE Docs to HTTPS is to automatically get Let's Encrypt SSL Certificates using certbot .
Install certbot. This process differs depending on the operating system - DEB- or RPM-based. Please choose the corresponding tab to read instructions for your OS:
Ubuntu
CentOS
For example, on Ubuntu 20 this can be done with the following commands:
sudo snap install -- classic certbot
sudo ln - s / snap / bin / certbot / usr / bin / certbot
For example, on CentOS8 this can be done with the following commands:
sudo yum install snapd
sudo systemctl enable -- now snapd . socket
sudo ln - s / var / lib / snapd / snap / snap
sudo snap install core
sudo snap refresh core
sudo snap install -- classic certbot
sudo ln - s / snap / bin / certbot / usr / bin / certbot
Once certbot is installed on your machine, run the script specifying your email and domain:
sudo bash / usr / bin / documentserver - letsencrypt . sh email@example . com yourdomain . com
The script will automatically create and install the letsencrypt.org CA-signed certificate to your server and restart the NGINX service for the changes to take effect.
Now your ONLYOFFICE Docs should be available at the https://yourdomain.com address.