Skip to main content

How to set up your own Google Docs alternative

If you’re seeking a secure and effective way of editing documents within your Nextcloud instance, Kseniya Fedoruk has the solution for you.

collaboration
(Image: © Shutterstock / Visual Generation)

We’re sure that your day-to-day activities include file exchange and content management. And we wouldn’t be surprised if you’re using Nextcloud for these purposes. 

This popular open-source sync and share platform offers plenty of functionality and can be installed on your private server.

Nextcloud’s flexible applications ecosystem also enables you to add various tools. Online processing and the ability to co-author documents are key factors when creating a fully featured working environment. 

About this article

This article first appeared in Linux Format Magazine, Issue #269, published in November 2020.

And you can easily do this with OnlyOffice – an open-source web-based office suite that provides you with advanced online editors for text documents, spreadsheets and presentations, which are compatible with Microsoft’s Office Open XML’s formats (.docx, .xlsx and .pptx).

Document Server

To set up this working environment you’ll need an instance of OnlyOffice Document Server (online editors) that’s resolvable and can be connected to Nextcloud and any end clients. OnlyOffice must also be able to POST to Nextcloud directly.

screenshot of OnlyOffice

Setting up OnlyOffice within the NextCloud server configuration. (Image credit: OnlyOffice)

OnlyOffice Document Server and Nextcloud can run on different systems as well as on the same machine. For the latter option you’ll need to set up a custom port for Document Server, because by default both OnlyOffice Document Server and Nextcloud work on port 80. Using Document Server behind a proxy is also possible.

The easiest way to start an instance of OnlyOffice Document Server is to use Docker. You can install the latest Docker version and OnlyOffice Document Server with all the needed dependencies by running the following commands:

$ sudo apt-get install docker-ce
$ sudo docker run -i -t -d -p 80:80 onlyoffice/documentserver

Connector for Nextcloud

The next step is to obtain the OnlyOffice connector (in other words, the integration tool) for Nextcloud. This functions as a bridge between the two services.

Go to the Nextcloud server apps/ directory (or another directory that’s used to connect applications). Next, obtain the OnlyOffice connector for Nextcloud. You can download the latest version from the official Nextcloud App Store, or clone the application source code and compile it yourself:

$ git clone https://github.com/ONLYOFFICE/onlyoffice-nextcloud.git onlyoffice

Once you’ve done this , change the owner to update the application from Nextcloud’s web interface:

$ chown -R www-data:www-data onlyoffice

Then access your Nextcloud, open the page with Not enabled apps and click the Enable button to launch the OnlyOffice application.