How to Install Nextcloud with OnlyOffice Integration in Ubuntu

Install docker and docker-compose

install-nextcloud-onlyoffice-ubuntu-docker-install

Install Docker with the following command:

Next, install Docker Compose:

Installing and configuring Nextcloud

Now that we’ve got Docker and Docker Compose installed, we’re ready to move on to Nextcloud itself. We’ll start by cloning the repository:

Now we’ll move into the newly cloned directory and fire up the Docker app with the following commands:

The second step has a lot to do in order to get Nextcloud running, so be prepared to wait a little bit.

install-nextcloud-onlyoffice-ubuntu-installation

Once the process is finished, launch your browser and navigate to your IP address or hostname to finish configuring Nextcloud. If you’re not sure what your IP address is, you can find it with the ifconfig command.

Enter the username and password you want to use for your admin account. The Nextcloud server will take a while to get everything up and running.

install-nextcloud-onlyoffice-ubuntu-username-password

Installing and configuring OnlyOffice

Now we’re most of the way there. Nextcloud is installed and configured, and you’ve had a chance to see the control panel. The final step is to enable OnlyOffice.

Back in the terminal, make sure you’re in the same directory from earlier. Run the following command:

This will take a while, installing OnlyOffice. Once the command has finished running, log out of and back into the server. OnlyOffice should now be fully configured.

install-nextcloud-onlyoffice-ubuntu-interface

Test your new installation by creating a new file. Whereas earlier you had the option to create a simple text file, you should have new options now. Create a new Document, Spreadsheet, or Presentation, and you should see it open in OnlyOffice.

install-nextcloud-onlyoffice-ubuntu-onlyoffice

Next steps

The major caveat of setting up Nextcloud this way is that you can’t connect over HTTPS with SSL encryption. You can turn on end-to-end encryption in the Nextcloud settings, but you’re still susceptible to man-in-the-middle attacks.

The next step would be to set up a reverse proxy, and this can be done with Nginx. The ideal configuration would provide a proxy, not just for Nextcloud, but for any other Docker apps you have running. That’s beyond the scope of this article but should be on your list of things to tackle once you have your Nextcloud server set up.