Is it better to install Nextcloud via snap or setup a web server?

Iā€™ve never used docker before, is it easy to use as a newbie?

Itā€™s not bad and is worth taking a few minutes to learn. It is a little bit different. If you look at my guide, I have all the steps for Ubuntu if you want to give it a shot. Youā€™ll have to make an adjustment on the reverse proxy to run it in a subfolder of the web root, but that should be fine.

One really nice benefit to Docker is you donā€™t have compatibility issues because the image includes all the libraries it needs. If you look over the forum, thereā€™s always someone having a problem with PHP because their chosen OS has an old version, or an upgrade broke a dependency, or some package that particular OS needs to run MC wasnā€™t installed, etcā€¦ You donā€™t have any of that with Docker because it uses a tested working set thatā€™s in the image with it regardless of whatā€™s installed in your host OS.

Upgrades are also really easy because you just tell Docker to pull an updated image and everything in it is updated to a known working set of software. And you can it to use a specific version, for example if you want to hold off on the next major version until is has a couple updates out.

You sound like someone who likes tinkering with this stuff, so youā€™ll probably like it.

You still need a webbserver for the reverse proxy. What advantage is it to run NC in a container for average home setup? It only adds networking and storage access issues.

Iā€™d keep it as simple as possible and with as less external dependencies as possible:
No snap, no docker, no raid, no other fancy shit.

Small, energy-efficient hardware which fits my needs, bare-metal install of os and the required services. Running this kind of nc setup at home for quite some time now.

1 Like

Just never forget backups :slight_smile:

1 Like

I would recommend against Docker if you are new to Docker & Nextcloud. As soon as you run into issues you will be in nightmare land and have no idea how to troubleshoot things. You also may have no one to help you (unlike the snap package which is maintained by the NC folks and has GitHub repo). If youā€™re interested in learning Docker sure might be worth considering but maybe not now.

Iā€™d say either a) snap (being behind on versions is not necessarily a bad thing) or b) standard install without deviating from Nextcloud manualā€™s recommendations - Ubuntu LTS, Apache, MariaDB.

1 Like

Backups are mandatory no matter what kind of deployment youā€™ve chosen. no backup? no mercy!

I had a short look at NextcloudPi before iā€™ve decided to do a ā€œmanualā€ setup. It may be nice, but it adds additional layers of software which i need to understand if i want to be able to troubleshoot on my own when something goes wrong. Doing a manual install may take longer for the first steps, but there are plenty of howtos out there (i used this one for my latest setup) and you learn more about what and why are you doing things.

From my point of view KISS applies to backups as well. Itā€™s not only about having backups, itā€™s about knowing how they work and what you need to do to restore files. Thats why i use rather simple shell scripts and rsync. Having ā€œsome magicā€ doing things you donā€™t understand is essentially like having no backupā€¦like:

To be honest: iā€™ve been working as a ā€œDevOpsā€ for about 20 years, have plenty of experience with linux and system administration in general. This is for sure a better point to start from then for many other people.

1 Like

I think this is one of the most important point - thanks @anon99283430 for chiming in after my initial response. I started with manual install and that was useful for me from a learning and understanding perspective, even though I switched to a snap which Iā€™m now happy with. After more consideration, Iā€™d endorse this approach over snap for the typical first-timer Nextcloud admin.

Which is exactly the advantage of Docker. All dependencies are internal, tested, and stable, and with docker-compose, the setup is quite simple.

The Docker version is also maintained by Nextcloud (and tested by the Docker team ā€” itā€™s an official image) and has a GitHub repo.

Please donā€™t knock it if you arenā€™t familiar with it.

And it adds additional layers of software and configuration and thus complexity. It does not eliminate dependencies, it just moves them to another layer of the stack.

Itā€™s just a matter of ā€œtrade offā€ - for personal use iā€™d avoid such things. This may be another case in a business environment.

An oversight on my part. When I first played around with Docker as an option (v9?) there was an unsupported image. I didnā€™t recheck as part of this conversation.

I will give try it out of curiousity but not in production since as recommended on the repo This image is designed to be used in a micro-service environment.

Not my environment and certainly not the OPā€™s. Docker isnā€™t mentioned as an option in the admin manual at all so if she wants get help in the future itā€™s best to go down a more appropriate route.

True of every method other than manual installation.

Thatā€™s just mincing words. The dependencies are automatically and permanently satisfied inside the image such that you donā€™t have to install them or ever have any conflicts or broken packages.

Docker-compose is a micro-service environment, so thatā€™s kind of a meaningless phrase.

Where are you getting that use of Docker is inappropriate? They wrote official documentation for the Docker installation. Itā€™s right here:

https://hub.docker.com/_/nextcloud

And itā€™s listed as an installation method at nextcloud.com.

Anyway, itā€™s a supported and well-maintained method of running Nextcloud, and it just so happens I had already written a guide for doing this setup on the OPā€™s OS, which is also how I run it personally at home and in my clientsā€™ networks.

Inappropriate for the OPā€™s scenario and stated level of Docker knowledge (ā€œnoneā€). I can accept that itā€™s a totally valid option for production, but for the OP as an admin I canā€™t accept it as a recommendation here. That guide must be beyond daunting for someone whoā€™s never done anything with Docker.

As an aside, that is exactly where I started running this at home. At the time, I had zero Nextcloud experience, and zero Docker experience. And it turned out to be a great thing and well worth a few minutes to figure out the Docker basics.

Thatā€™s fine. Youā€™re entitled to your opinion, but your approval is not needed for my recommendation. You donā€™t have to go trying to shoot down other peopleā€™s recommendations and cause a mess for the OP for your own recommendation to be valid.

Knocking the Docker installation without knowing much about it, and now my guide too without looking at it? Nice.

FYI I spent hours writing it and did a test installation side by side to make sure everything was right and produced a working system. I can follow my own guide and set a system up from bare metal in about an hour. My guide is actually very easy to follow, in my opinion, and was written for the OPā€™s exact scenario.

Itā€™s also worth noting, the Docker part is short and easy, and the rest is a lot of the same steps that are in other guides involving a reverse proxy.

Anyway, Iā€™ve made my contribution to the OPā€™s question and am satisfied that itā€™s a good one, and Iā€™m content to leave it at that.

Regarding docker:

  1. More complicated network setup, especially if routing, firewalling and other http servers are on use on the same machine.
  2. Does not support unified cgroups (a.k.a cgroups v2).
  3. local storage set up, including backup might be more difficult.

I was thinking of the dependencies docker and toolings pull in - not the ones that are moved into the container.

and after that you can apply one of the scripts around.

examples:

same nightmare without docker. but yes. knowledge is an advandage if thinks go wrong. or ask here in the forum. :wink:

We can agree to disagree. You are obviously passionate about your approach and put a lot of work into the guide and I do appreciate the defenses against the criticisms.

Havenā€™t changed my mind, that given the information the OP has provided, on average guzzistiā€™s followed by own are better paths to start with. But hey maybe youā€™ve pushed me to try it for myself (even in prod :wink:).

I tried the snap install myself at first and was almost immediately put off that there was no way to add SMB support, so I tried a manual installation. I donā€™t use SMB at home but I was also trying out Nextcloud potentially for my clients at the time and lack of SMB support was a non-starter for snap. The Docker version doesnā€™t include SMB support either but they have a Dockerfile you can download that adds it to the image automatically.

My next hurdle was no matter what I did I could not get Collabora to work. At the time I could only find documentation for running it in Docker, so I was already having to figure Docker out at this point even before putting NC in it.

After messing with it for maybe a couple days I decided to try putting the whole setup in Docker to see if that would help. Still took a while to get the kinks worked out of Collabora but I got everything working. The compose file makes the setup very easy to reproduce. You can literally copy and paste it, change names and passwords, and flip the on switch, and the whole thing comes up (minus the reverse proxy and LE). That makes it really easy to reproduce on other networks which Iā€™ve done several times now.

Been running like a champ ever since and havenā€™t looked back. I even have Kodi stream movies over WebDAV from it in the house.