How to Integrate the ONLYOFFICE and ownCloud Vultr Marketplace Apps

Updated on July 25, 2024
How to Integrate the ONLYOFFICE and ownCloud Vultr Marketplace Apps header image

Introduction

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

Prerequisites

1. Setup the ONLYOFFICE Server

  1. Install Certbot for Nginx to set up SSL for ONLYOFFICE Docs.

      $ sudo apt install certbot python3-certbot-nginx
  2. To avoid conflicts on port 80, temporarily stop the ONLYOFFICE container.

      $ sudo docker stop onlyoffice-document-server
  3. 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
  4. Create the ONLYOFFICE Document server certs directory.

      $ sudo mkdir /app/onlyoffice/DocumentServer/certs
  5. 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.

  6. Restart the ONLYOFFICE container.

      $ sudo docker restart onlyoffice-document-server
  7. Create a test ONLYOFFICE document system.

      $ sudo docker exec -d onlyoffice-document-server sudo supervisorctl start ds:example
  8. Visit your Server IP and load the test documents system.

      https://docs.example.com/example

Sample ONLYOFFICE Docs

Create sample files to confirm that all applications work well.

2. Setup ownCloud

  1. 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
  2. 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
  3. 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
  4. Download the ONLYOFFICE connector for ownCloud.

      $ wget https://github.com/ONLYOFFICE/onlyoffice-owncloud/releases/latest/download/onlyoffice.tar.gz
  5. Extract files.

      $ tar -xvf onlyoffice.tar.gz
  6. Move extracted files to the ownCloud apps directory.

      $ sudo mv onlyoffice /var/www/owncloud/apps
  7. Using a text editor of your choice, open and edit the ownCloud config.php file.

      $ sudo nano /var/www/owncloud/config/config.php 
  8. Locate the trusted_domains section.

      'trusted_domains' => 
      array (
        0 => '1.2.3.4',
      ),
  9. Replace the Server IP Address with your domain to disable direct IP Access.

      0 => 'owncloud.example.com',

    Save and close the file.

  10. Restart Nginx to load changes.

     $ sudo systemctl restart nginx

3. Integrate ownCloud with ONLYOFFICE

  1. Visit your ownCloud domain.

      https://owncloud.example.com
  2. Authenticate with ownCloud using Logins listed on your Vultr instance page.

  3. Click your Username in the top right corner and select Settings from the drop-down menu.

  4. Navigate to the Admin section and click Apps.

  5. Click Show disabled apps.

  6. Enable the ONLYOFFICE App.

  7. Navigate to Additional on the left menu.

  8. Locate the ONLYOFFICE section and enter your Docs server domain.

  9. Click Save to establish a connection to the server.

  10. Under Common settings, select file extensions to open with ONLYOFFICE editors.

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

  12. Navigate to Files.

  13. Create new + and choose between Document, Spreadsheet, Presentation, or Form Template files to create.

  14. Upload or find supporting documents in your files and select Open in ONLYOFFICE to launch in the associated ONLYOFFICE application. For example, .docx files open in Document, .pptx in Presentation, .xlsx in Spreadsheet.

ONLYOFFICE Document

Next Steps

You have integrated ONLYOFFICE with ownCloud deployed through the Vultr Marketplace. For further configurations to apply on your servers, refer to the following articles.