ONLYOFFICE Docserver snap with Nextcloud on the same server

Nextcloud is a popular free and open source alternative cloud service application. By hosting it on ones own server, it gives the user the opportunity to save and share files in a safe, easily available place without having to deal with large corporations who are actively out for our data. Unfortunately, for collaborative document editing, it only offers simple text files with minimal formatting possibilities. To edit documents, spreadsheets or presentations together with your family or coworkers, you will need a third party tool, ONLYOFFICE.

ONLYOFFICE by Ascensio System SIA offers a powerful office suite that comprises online editors for text documents, spreadsheets and presentations highly compatible with Microsoft Office and OpenDocument file formats. ONLYOFFICE provides users with multiple editing tools and collaborative features ensuring greater team workflow, and seamless work with complex formatting and objects within your web solution.

As in our tutorial on installing Nextcloud, we are going to be using the package available from Canonical's Snap store, and set up a reverse proxy, so you don't need to rent a separate server to run the document server. In this document, we assume, that Nextcloud is already installed and set up using an Nginx reverse proxy.

In this tutorial, we take a look at the use case, when we have one computer running with a single public IP address, which has multiple domain name (DNS) entries assigned, using a reverse proxy. As the ONLYOFFICE document server is available through a Snap package, it is suggested that Nextcloud is similarly installed from the Snap store.

Important note: I show the terminal commands in the black boxes following the $ character. Do NOT type that character, only what follows. Lines that don't start with $, are either files that should be created, or, if appearing after a command, the expected output that you should see returned on your terminal. This tutorial does not include all the expected outputs. If you get an error message, check your spelling and try again. If you are not sure what the problem is, consult the manual of the commands used. When you see italicized words in a black box like this: $ command parameter, that means that you should change the italicized part to a value relevant to your case.

This tutorial is not yet available in video form. The video version will be included here once it exists.

Contents

Get ready

In this tutorial, it is assumed that the user has a running server with a user that can use sudo. If you log in / ssh in to your server using the root user, you don't need to preface the commands with sudo. This tutorial was tested on Debian 10, but should work with Debian 9 and also Ubuntu. For other distributions, you will have to check how to install packages using your package manager, and find the proper equivalent packages.

In this tutorial, the ufw firewall is used.

For the initial setup, you can check out the following tutorials:

It is assumed that have already registered the domain names for the Nextcloud server and the regular webserver. Additionally you will need a domain name for the document server. In this tutorial, I am using the docserver.example.com.

Install and configure the ONLYOFFICE document server

Thanks to Canonical's Snap packages, it is very convenient to install the documentserver without conflicting with other services present on the same server. Just use the following command:

$ sudo snap install onlyoffice-ds

You can check the status of the snap package manager with the snap changes command, and you can get version information on the package using the snap info onlyoffice-ds command. Furthermore, network interfaces can be checked using the snap connections onlyoffice-ds command.

The ONLYOFFICE snap package contains the required webserver and database programs, so if it is the only service running on the system, it is very simple to set up. However, we would like multiple applications running in parallel, so we won't need the webserver inside the snap to listen to the HTTP and HTTPS requests on the regular ports 80 and 443, as those ports will be handled by our reverse proxy.

$ sudo snap set onlyoffice-ds onlyoffice.ds-port=82

This will change the port the ONLYOFFICE package is listening on.