Author: Humphrey Mpairwe
Last Updated: Thu, Jun 9, 2022ONLYOFFICE is a self-hosted office suite that offers online editors for documents, presentations, spreadsheets, and XML files. It's a great alternative to Google Docs that can integrate with other platforms such as ownCloud to save, edit, and share files. This article explains how you can integrate ONLYOFFICE with ownCloud deployed through the Vultr MarketPlace.
docs.example.com
owncloud.example.com
.http://1.2.3.4
Install Certbot for Nginx to set up SSL for ONLYOFFICE Docs.
$ sudo apt install certbot python3-certbot-nginx
To avoid conflicts on port 80
, temporarily stop the ONLYOFFICE container.
$ sudo docker stop onlyoffice-document-server
Request a free Let's Encrypt SSL certificate. Replace example.com
with your actual domain.
$ sudo certbot certonly --standalone -d docs.example.com -m admin@example.com
Create the ONLYOFFICE Document server certs
directory.
$ sudo mkdir /app/onlyoffice/DocumentServer/certs
Link the Let's Encrypt SSL certificates to the ONLYOFFICE certs
directory.
$ sudo cp /etc/letsencrypt/live/docs.example.com/fullchain.pem /app/onlyoffice/DocumentServer/certs/onlyoffice.crt
$ sudo cp /etc/letsencrypt/live/docs.example.com/privkey.pem /app/onlyoffice/DocumentServer/certs/onlyoffice.key
Each time you renew the Let's Encrypt SSL certificate, run the above commands to update the ONLYOFFICE certificates.
Restart the ONLYOFFICE container.
$ sudo docker restart onlyoffice-document-server
Create a test ONLYOFFICE document system.
$ sudo docker exec -d onlyoffice-document-server sudo supervisorctl start ds:example
Visit your Server IP and load the test documents system.
https://docs.example.com/example
Create sample files to confirm that all applications work well.
Back up the pre-installed self-signed certificates.
$ sudo mv /etc/nginx/ssl/server.crt server.crt.ORIG
$ sudo mv /etc/nginx/ssl/server.key server.key.ORIG
Request an SSL certificate with Certbot. Replace owncloud.example.com
with your actual domain.
$ sudo certbot certonly --nginx -d owncloud.example.com -m admin@example.com
Link the Let's Encrypt certificates to the Nginx SSL directory.
$ sudo ln -sv /etc/letsencrypt/live/owncloud.example.com/fullchain.pem /etc/nginx/ssl/server.crt
$ sudo ln -sv /etc/letsencrypt/live/owncloud.example.com/privkey.pem /etc/nginx/ssl/server.key
Download the ONLYOFFICE connector for ownCloud.
$ wget https://github.com/ONLYOFFICE/onlyoffice-owncloud/releases/latest/download/onlyoffice.tar.gz
Extract files.
$ tar -xvf onlyoffice.tar.gz
Move extracted files to the ownCloud apps
directory.
$ sudo mv onlyoffice /var/www/owncloud/apps
Using a text editor of your choice, open and edit the ownCloud config.php
file.
$ sudo nano /var/www/owncloud/config/config.php
Locate the trusted_domains
section.
'trusted_domains' =>
array (
0 => '1.2.3.4',
),
Replace the Server IP Address with your domain to disable direct IP Access.
0 => 'owncloud.example.com',
Save and close the file.
Restart Nginx to load changes.
$ sudo systemctl restart nginx
Visit your ownCloud domain.
https://owncloud.example.com
Authenticate with ownCloud using Logins listed on your Vultr instance page.
Review the Editor customization settings and click save to finish the integration process.
ownCloud is ready to use with ONLYOFFICE. Supported file formats open with the associated ONLYOFFICE editor application.
Navigate to Files.
.docx
files open in Document, .pptx
in Presentation, .xlsx
in Spreadsheet.You have integrated ONLYOFFICE with ownCloud deployed through the Vultr Marketplace. For further configurations to apply on your servers, refer to the following articles.