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.
Just never forget backups
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.
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.
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:
- More complicated network setup, especially if routing, firewalling and other http servers are on use on the same machine.
- Does not support unified cgroups (a.k.a cgroups v2).
- 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.
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 ).
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.