How to Install Nextcloud with OnlyOffice Integration in Ubuntu

While cloud storage options are numerous these days, most of them put your data in someone else’s hands. Dropbox, Google Drive and OneDrive all require you to trust the company that owns the service to do right by your data. Fortunately, thanks to software like Nextcloud, it doesn’t have to be that way.

Nextcloud, which has its roots in the OwnCloud project, goes above and beyond its original Dropbox-inspired roots. While it stores data, it can also work as a Google Docs-inspired office suite when you add OnlyOffice. With the two combined, you have many of the features of Google’s G Suite, but running on your own server.

There are various ways to install and configure Nextcloud, including manual installation, Ubuntu’s Snap system, and Docker. Here we’ll be using a Docker configuration provided by OnlyOffice, since it allows you to install both Nextcloud and OnlyOffice in a few short steps.

Before you get started

Nextcloud requires a Unix-like operating system to run, but it says on its website that you can also use the Windows Subsystem for Linux. Here we’ll be focusing on Ubuntu, but the instructions should be similar for other operating systems.

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.

Leave a Comment

Yeah! You've decided to leave a comment. That's fantastic! Check out our comment policy here. Let's have a personal and meaningful conversation.

Sponsored Stories