Easily Install Nextcloud Server on Ubuntu 16.04 via Snap

As you may already know, Nextcloud is a free and open source fork of the well-known ownCloud project. This tutorial shows how easy it is to set up your own Nextcloud personal cloud storage on Ubuntu 16.04 server. You can also set up Nextcloud on your local Ubuntu 16.04 desktop to sync your data in your local network.

Install Nextcloud Server on Ubuntu 16.04 via Snap

The Nextcloud snap package is already available from Ubuntu snap store.

First make sure snapd is installed on your Ubuntu 16.04 machine by running the following commands:

sudo apt update

sudo apt install snapd

Once snapd is installed on Ubuntu 16.04, we can install snap packages with snap.

sudo snap install nextcloud

install nextcloud 9 server on Ubuntu 16.04

Nextcloud will be installed in /snap/nextcloud directory. Once its installed, type the IP address of your Ubuntu 16.04 box in the browser address bar. You can get your Ubuntu server’s public IP using the following commands:

sudo apt install curl

curl http://icanhazip.com

If you are installing Nextcloud server on your local Ubuntu box, just type 127.0.0.1 or localhost.

You will be asked to create an admin account for your Nextcloud 9 server.

install nextcloud 9 server on Ubuntu 16.04 as a snap package

Now you are in the web administration interface of Nextcloud 9 server and can start uploading files to your personal cloud storage!

nextcloud 9 server

Pros and Cons of Installing Nextcloud 9 server as a Snap Package

Pros

  • easy, instant setup
  • Running in sandbox improves system security. Ubuntu server edition doesn’t have X11 display server installed, so snap apps can not steal data from other applications.

Cons

  • As a snap package, Nextcloud contains its own http server and MySQL server. So your server may have two http servers and MySQL servers running at the same time if you manually installed them before, thus it consumes more memory and disk space. They also may conflict with each other.
  • Difficult to customize. For example, if you want to install a TLS/SSL certificate to secure the Nextcloud web interface, you have to fiddle with the settings of its built-in http server.
  • You can’t install snap packages on OpenVZ virtual private servers. Installing snap packages requires a snap directory to be created under root partition. However, OpenVZ VPS is not allowed to modify the root file system.

If you are confident in your command line skills, you can manually set up a LAMP stack on Ubuntu and then install Nextcloud using the traditional way to circumvent the cons.

Questions or suggestions are always welcome. If you found this post useful, 🙂  please share it with your friends on social media! Stay tuned for more Linux tutorials.

Rate this tutorial
[Total: 33 Average: 3.9]

3 Responses to “Easily Install Nextcloud Server on Ubuntu 16.04 via Snap

  • Bhavamayananda Swami
    8 years ago

    Using this tutorial I could easily install Nextcloud.
    Now When I am trying to access it from other IP address in LAN I am getting this message: Trusted domain error. “192.168.10.156” tried to access using “192.168.10.146” as host.
    I tried to access config.php file using sudo but I am getting the error it is read only.
    can anybody help me out?

    • Xiao Guo-An (Admin)
      8 years ago

      Hi, the config.php file under /var/snap/nextcloud/current/nextcloud/config/ directory is writable.

Leave a Comment

  • Comments with links are moderated by admin before published.
  • Your email address will not be published.
  • Use <pre> ... </pre> HTML tag to quote the output from your terminal/console.
  • Please use the community (https://community.linuxbabe.com) for questions unrelated to this article.
  • I don't have time to answer every question. Making a donation would incentivize me to spend more time answering questions.

The maximum upload file size: 2 MB. You can upload: image. Links to YouTube, Facebook, Twitter and other services inserted in the comment text will be automatically embedded. Drop file here