Installing Nextcloud can be a snap

I've been an ownCloud user for years, and I recently moved to using Nextcloud, which is based upon ownCloud. Both my wife and I use it to sync our calendars and contacts across all our devices, and also use it to sync our documents, music, pictures, and videos. It caters to my paranoid nature-- the idea that all that information is being saved on my own in-house server instead of someone else's greatly pleases me.

I've been on the snappy team for a little while now, and I still find one of the best ways to gain understanding about the system as well as prove out new functionality and find bugs is to simply create snaps. Snaps provide a particularly easy way to install software, and Nextcloud is a particularly complex system that requires a bit of work and knowledge to setup. Wouldn't it be cool if you could install Nextcloud and it came all pre-configured and ready to go? Check this out:

$ sudo snap install nextcloud
120.87 MB / 120.87 MB [==================] 100.00 % 2.78 MB/s
Name Version Rev Developer Notes
nextcloud 9.0.50snap2 5 canonical -

Visit localhost (or the device's external IP) in your browser and you'll see:

Create an admin account by entering a desired username and password there, and you have a working Nextcloud installation. It's using Apache, PHP 7, MySQL for the database, and redis for the cache, all installed and setup with a few keystrokes. It even includes mDNS for network discovery in case you installed it on a headless box. It's also completely confined, so if (heaven forbid) Nextcloud was compromised, the attacker wouldn't be able to walk all over your system.

There are, of course, limitations.

  • The target audience: this snap is really for those users who just want to get Nextcloud up and running with recommended settings. The side effect of getting all this preconfiguration and easy upgrades is that it's not very customizable. If you're wanting to run Nextcloud behind a load balancer connected to a MySQL cluster, you're probably better off setting it up yourself.
  • HTTPS is not yet supported. I don't recommend the use of this snap on production systems until it is. I'm working on on integrating Let's Encrypt into the snap, but I want to make it as user-friendly as possible, which will take a little time. (Update: HTTPS support was added in 9.0.53snap2, released on 08/22/16.)
  • Overall still a work in progress, and probably has unknown rough edges.

I'm pleased with how far it's come, but getting there wasn't easy. In the following series of blog posts, I'd like to share some of the stumbling blocks I hit along the way (as well as how I solved them). I hope that doing so will help you snap up your complex system.

The next post in this series will discuss the web server.

Comments

Hi!

Thanks for this Snap - it downloaded beautifully simply.

However, I'm having trouble finding the URL I need to sync with a mobile app. Any ideas?

By mark

Reply

Thanks Mark!

Which mobile app are we talking about? The Nextcloud app itself just requires your normal login information. If we're talking about caldav or carddav clients the URLs are in the calendar or contacts app respectively. Please give me a little more info and I'd be happy to help further.

By Kyle

Reply

:$ Sorry! I should have been more specific!

I downloaded the OwnCloud-Sync app by Daniel Wood from the OpenStore, because I'd understood that it was compatible with NextCloud. The initial page requires login, password and a "Server URL". Incidentally, the Scope in the AppStore does too.

I've tried just putting my login and password, but it won't let it go without the URL.

By mark

Reply

Oops, thanks for pinging me again!

How do you visit Nextcloud in your browser? That's the URL you'd also use in the mobile apps. However, the snap doesn't do anything magical: if you keep it on your LAN, you'll only be able to access it on your LAN. If you want to register a domain name you can, make sure you point it to your external IP (the one you get from your ISP) and setup your router to forward ports 80 and 443 to the computer running the snap.

By Kyle

Reply

Hey! Thanks for your help.

I get access to the files on the browser via <http://localhost/index.php/apps/files/?dir=/> I would have assumed that, if I'm using the same wifi on my phone, that ought to be the address to use, but sadly the ownCloud app doesn't seem to work with it. Am I using the wrong address, or does the ownCloud app for UT not work?

:) Thanks too for the idea of getting a domain name: that's an excellent idea.

By mark

Reply

Hi!
I'm still tutuing around trying to find my instance... any guidance would be appreciated.

By mark

Reply