GithubHelp home page GithubHelp logo

alexandervnuchkov / onlyoffice-owncloud Goto Github PK

View Code? Open in Web Editor NEW

This project forked from onlyoffice/onlyoffice-owncloud

0.0 1.0 0.0 1.54 MB

The app which enables the users to edit office documents from ownCloud/Nextcloud using ONLYOFFICE Document Server, allows multiple users to collaborate in real time and to save back those changes to ownCloud/Nextcloud

License: GNU Affero General Public License v3.0

PHP 63.25% CSS 3.09% JavaScript 33.66%

onlyoffice-owncloud's Introduction

onlyoffice icon ownCloud ONLYOFFICE integration app

This app enables users to edit office documents from ownCloud using ONLYOFFICE Document Server. Currently the following document formats can be edited with this app: csv, docx, pptx, txt, xlsx. The above mentioned formats are also available for viewing together with pdf. The edited files of the corresponding type can be converted into the Office Open XML formats: doc, docm, dot, dotx, epub, htm, html, odp, odt, pot, potm, potx, pps, ppsm, ppsx, ppt, pptm, rtf, xls, xlsm, xlsx, xlt, xltm, xltx.

The app will create an item in the new (+) menu to create Document, Spreadsheet, Presentation. It will also create a new Open in ONLYOFFICE menu option within the document library for Office documents. This allows multiple users to collaborate in real time and to save back those changes to ownCloud.

You can also use our Docker installation to get installed and configured Document Server and ownCloud installation with a couple of commands.

Installing ONLYOFFICE Document Server

You will need an instance of ONLYOFFICE Document Server that is resolvable and connectable both from ownCloud and any end clients (version 4.2.7 and later are supported for use with the app). If that is not the case, use the official ONLYOFFICE Document Server documentation page: Document Server for Linux. ONLYOFFICE Document Server must also be able to POST to ownCloud directly.

Starting with version 4.3.0, ONLYOFFICE Document Server and ownCloud can be installed either on different computers, or on the same machine. In case you select the latter variant, you will need to set up a custom port for Document Server as by default both ONLYOFFICE Document Server and ownCloud work on port 80. Or you can use Document Server behind a proxy, please refer to this article to learn how you can configure it.

The easiest way to start an instance of ONLYOFFICE Document Server is to use Docker.

ONLYOFFICE Document Server editions

ONLYOFFICE offers different versions of its online document editors that can be deployed on your own servers.

ONLYOFFICE Document Server:

  • Community Edition (onlyoffice-documentserver package)

  • Integration Edition (onlyoffice-documentserver-ie package)

The table below will help you to make the right choice.

Pricing and licensing Community Edition Integration Edition
Get it now Start Free Trial
Cost FREE Go to the pricing page
Simultaneous connections up to 20 maximum As in chosen pricing plan
Number of users up to 20 recommended As in chosen pricing plan
License GNU AGPL v.3 Proprietary
Support Community Edition Integration Edition
Documentation Help Center Help Center
Standard support GitHub or paid One year support included
Premium support Buy Now Buy Now
Services Community Edition Integration Edition
Conversion Service + +
Document Builder Service + +
Interface Community Edition Integration Edition
Tabbed interface + +
White Label - -
Integrated test example (node.js)* - +
Plugins & Macros Community Edition Integration Edition
Plugins + +
Macros + +
Collaborative capabilities Community Edition Integration Edition
Two co-editing modes + +
Comments + +
Built-in chat + +
Review and tracking changes + +
Display modes of tracking changes + +
Version history + +
Document Editor features Community Edition Integration Edition
Font and paragraph formatting + +
Object insertion + +
Content control + +
Layout tools + +
Table of contents + +
Navigation panel + +
Mail Merge + +
Spreadsheet Editor features Community Edition Integration Edition
Font and paragraph formatting + +
Object insertion + +
Functions, formulas, equations + +
Table templates + +
Pivot tables +** +**
Presentation Editor features Community Edition Integration Edition
Font and paragraph formatting + +
Object insertion + +
Animations + +
Presenter mode + +
Notes + +
Get it now Start Free Trial

* Note that by default DocumentServer Community Edition does not contain any document management system.
Integration Edition and Developer Edition versions include integrated test examples (simplest DMS to test the editors). For Community version, please use the ONLYOFFICE Community Server or check out integration with 3rd party platforms, e.g. ownCloud/Nextcloud

** Changing style and deleting (Full support coming soon)

Installing ownCloud ONLYOFFICE integration app

The ownCloud administrator can install the integration app from the in-built application market. For that click the upper-left hamburger menu and select Market. After that find ONLYOFFICE in the list of available applications and install it.

If the server with the ownCloud installed does not have an Internet access, or if you need it for some other reason, the administrator can install the application manually. To start using ONLYOFFICE Document Server with ownCloud, the following steps must be performed:

  1. Go to the ownCloud server apps/ directory (or some other directory used):

    cd apps/
  2. Get the ownCloud ONLYOFFICE integration app. There are several ways to do that:

    a. Download the latest signed version from the official store for ownCloud.

    b. Or you can download the latest signed version from the application release page on GitHub.

    c. Or you can clone the application source code and compile it yourself:

    git clone https://github.com/ONLYOFFICE/onlyoffice-owncloud.git onlyoffice

    ownCloud does not work with unsigned applications giving an alert, so you will need to use either option a or b to get the application.

  3. Change the owner to update the application right from ownCloud web interface:

    chown -R www-data:www-data onlyoffice
  4. In ownCloud open the ~/index.php/settings/apps?category=disabled page with Not enabled apps by administrator and click Enable for the ONLYOFFICE application.

Configuring ownCloud ONLYOFFICE integration app

In ownCloud open the ~/index.php/settings/admin#onlyoffice page with administrative settings for ONLYOFFICE section. Enter the following address to connect ONLYOFFICE Document Server:

https://<documentserver>/

Where the documentserver is the name of the server with the ONLYOFFICE Document Server installed. The address must be accessible for the user browser and from the ownCloud server. The ownCloud server address must also be accessible from ONLYOFFICE Document Server for correct work.

Sometimes your network configuration might not allow the requests between installed ownCloud and ONLYOFFICE Document Server using the public addresses. The Advanced server settings allows to set the ONLYOFFICE Document Server address for internal requests from ownCloud server and the returning ownCloud address for the internal requests from ONLYOFFICE Document Server. You need to enter them in the appropriate fields.

To restrict the access to ONLYOFFICE Document Server and for security reasons and data integrity the encrypted signature is used. Specify the Secret key in the ownCloud administrative configuration. In the ONLYOFFICE Document Server config file specify the same secret key and enable the validation.

Enable or disable the Open file in the same tab setting.

The Open in ONLYOFFICE action will be added to the file context menu. You can specify this action as default and it will be used when the file name is clicked for the selected file types.

How it works

The ONLYOFFICE integration follows the API documented here:

  • When creating a new file, the user navigates to a document folder within ownCloud and clicks the Document, Spreadsheet or Presentation item in the new (+) menu.

  • The browser invokes the create method in the /lib/Controller/EditorController.php controller. This method adds the copy of the file from the assets folder to the folder the user is currently in.

  • Or, when opening an existing file, the user navigates to it within ownCloud and selects the Open in ONLYOFFICE menu option.

  • A new browser tab is opened and the index method of the /lib/Controller/EditorController.php controller is invoked.

  • The app prepares a JSON object with the following properties:

    • url - the URL that ONLYOFFICE Document Server uses to download the document;
    • callback - the URL that ONLYOFFICE Document Server informs about status of the document editing;
    • documentServerUrl - the URL that the client needs to respond to ONLYOFFICE Document Server (can be set at the administrative settings page);
    • key - the UUID+Modified Timestamp to instruct ONLYOFFICE Document Server whether to download the document again or not;
    • fileName - the document Title (name);
    • userId - the identification of the user;
    • userName - the name of the user.
  • ownCloud takes this object and constructs a page from templates/editor.php template, filling in all of those values so that the client browser can load up the editor.

  • The client browser makes a request for the javascript library from ONLYOFFICE Document Server and sends ONLYOFFICE Document Server the DocEditor configuration with the above properties.

  • Then ONLYOFFICE Document Server downloads the document from ownCloud and the user begins editing.

  • ONLYOFFICE Document Server sends a POST request to the callback URL to inform ownCloud that a user is editing the document.

  • When all users and client browsers are done with editing, they close the editing window.

  • After 10 seconds of inactivity, ONLYOFFICE Document Server sends a POST to the callback URL letting ownCloud know that the clients have finished editing the document and closed it.

  • ownCloud downloads the new version of the document, replacing the old one.

Known issues

  • If the document is shared using the Federated Cloud Sharing app, the co-editing among the servers will not be avaialble. The users from one and the same server can edit the document in the co-editing mode, but the users from two (or more) different servers will not be able to collaborate on the same document in real time.

  • Adding the storage using the External storages app has issues with the co-editing in some cases. If the connection is made using the same authorization keys (the Username and password or Global credentials authentication type is selected), then the co-editing is available for the users. If different authorization keys are used (Log-in credentials, save in database or User entered, store in database authentication options), the co-editing is not available. When the Log-in credentials, save in session authentication type is used, the files cannot be opened in the editor.

  • ownCloud provides an option to encrypt the file storage. But if the encryption with the per-user encryption keys (used by default in ownCloud Default encryption module app) is enabled, ONLYOFFICE Document Server cannot open the encrypted files for editing and save them after the editing. The ONLYOFFICE section of the administrative settings page will display a notification about it. However if you set the encryption with the master key, ONLYOFFICE application will work as intended. The instruction on enabling master key based encryption is available in the official documentation on ownCloud websites.

  • If you are using a self-signed certificate for your Document Server, ownCloud will not validate such a certificate and will not allow connection to/from Document Server. This issue can be solved the following way: locate the ownCloud config file (/owncloud/config/config.php) and open it. Insert the following section to it:

    'onlyoffice' => array (
        'verify_peer_off' => true
    )

    This will disable the certificate verification and allow ownCloud to establish connection with Document Server, but you must remember that this is a temporary insecure solution and we strongly recommend that you replace the certificate with the one issued by some CA. Once you do that, do not forget to remove the above section from ownCloud config file.

onlyoffice-owncloud's People

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.