Hi, I’m using Snap(s) on the Nextcloud Box: following the guide here, I managed to set it up with HTTPS and dynamic IP, and I must say it’s working quite good. The only issue I’m facing is the impossibility (well, at least I couldn’t find a way, except for recompiling the whole Snap package) to modify configuration files, so, at this time It’s not possible to use any video chat app (Spreed.me requires to modify ssl.conf, while Rocket.chat seems to be configured to only work trough HTTP).
Thanks for your feedback @wu_ming. I’m also of the opinion that we should let users configure their Nextcloud the way they want to, but it complicates things when upgrading or making config changes.
Since the main maintainer of the snap wants to focus on the part of the user base who has no technological knowledge and can’t use SSH to make changes, you currently have the following options:
Wait for config hooks to be available, which should make it possible to make modifications from Nextcloud itself
Build your own snaps
Put together a team to maintain an advanced version of the snap
I cannot find the Apache configuration to install my https certificate so that I can use Federation with my primary Nextcloud instance. The two options I’ve seen so far are to either use Let’sEncrypt (which I do elsewhere, but this box is on an internal only domain), or nextcloud.occ which might work if I knew what format the certificate should be in, my pem/crt isn’t recognised.
Am I missing a better way to configure the hostname / IP, etc. of the box? I’ve dug into the snap directory tree and edited the Nextcloud configuration, switching the IP address for the hostname, which seems too advanced for the target audience. I’m hoping to get a better handle on it because this Nextcloud Box will be travelling between networks so easy configuration changes would help! It will use a static DHCP lease in each location, but the configuration rewrites full URLs rather than using relative links (which would help no end!).
The Nextcloud version in the Snap seems to be higher than the main Nextcloud, or at least my main instance is claiming to be at the latest. Both are on the stable channel, but the Box is on 10.0.1 and the main on 9.0.51 with both claiming to be the latest version.
I suspect the first may be down to my lack of experience with Snaps, I don’t feel in complete control which isn’t a nice feeling!
Since Ubuntu Core is in beta, I wouldn’t be surprised if there were parts which aren’t fully functional. That’s the main reason we’ve decided not to include it in the initial image for the Box.
See if you can bring the network one way or another and connect to other services.
Apache is included in the snap, so you won’t find an apache2 service per example-
I’m afraid that cross compiling Snap packages for arm is beyond my reach, for now (any link is welcome, b.t.w. , I guess I’ll just wait for the next update of Nextcloud (any ETA?). I hope however that Canonical will come out with an easy way to modify config files of Snaps (I think it’s not really feasible to rebuild a whole program, just for, let’s say, uncomment a line…).
I’ll take another look through. I had decided from the logs that it was down to the fact that it was making the connection over https, which neither system was configured for. The main one is now, although I’ve done this the way I normally do using the Apache configuration so the Nextcloud command line doesn’t recognise it - not having investigated that yet I’m assuming that if I use the Nextcloud commands it doesn’t touch the Apache config (it wouldn’t have access) and uses the .htaccess file.
Looking forward to that one, I’m experimenting with the concept of a Pi based Federated box that can take ISO images, etc. to LUG meets, amongst other things. Managing a changing IP/hostname might be interesting!
I thought I had only recently install the main box, but it was back in June. I’ve not had any updates provided by it yet, so as you say a manual update looks on the cards.
I’ve not used Snaps before, but had read about them possibly replacing .deb in Ubuntu. Clearly that is a misunderstanding of their concept. I’ll play a bit longer, and will be getting another case to setup another box with my existing PiDrive, so that may become my main one with a full install on. There’s a reason I don’t use iOS devices, and lack of control is one!
Edit <- That’s the hard part as it requires to known about the snap variables and how the update process works
Create account on Launchpad
Push your branch to Launchpad
Request snap build for the architectures you need
This will take a while to land and there will be new versions of Nextcloud before that.
Nothing to do with Canonical. It’s the choice the maintainer has made. You can today put the whole of Nextcloud on the writable partition and do what you want with it, but your instance is less protected, especially since the user with access is root.
The problems arrive when we need to push changes to the file you’ve been editing. That requires publishing changelogs and instructions and making sure we don’t break 1001 customised configs
Yes, both systems need https.
The problem, I think, is unrelated to Apache, you need curl to be able to recognise your certificate and you need to save your certificates in Nextcloud so that it can use it when making connections to the other system.
I think that if things don’t work as expected, you should open another thread just for that.
I was pleasantly surprised how easy it was to get nextcloud running with snaps.
However it quickly became obvious it’s not very configurable. I’d like to:
have sql data stored on a seperate database server
store all user data on a seperate nfs partition(s)
work with multiple network interfaces
and still have nextcloud updated automatically.
I may have a meltdown, but I’m really struggling to find a way to integrate this into existing
infrastructure and configure with a deplopyment managment system.
Being very new to snap packages, I’m wondering if this is the way snap packages are designed work,
and if it’s even possible to make a packages that are configurable to this extent? Maybe separating
everything to smaller packages and connecting them with interfaces. Who knows?
That’s correct. It depends on the maintainer’s vision for the snap. The current version is for beginners, so you won’t be able to tailor the configuration to meet all of your needs. This is not for Enterprise customers.
However, you can use your own certificates. Replace the ones which have been generated with your own. You should use the self-cert option to avoid them being overwritten by Let’s Encrypt.
You can use another database server, simply modify your config.
Same for data, just point to a folder in /media (requires the beta snap for now)
Regarding the network interfaces, I don’t see how it’s related to the snap if you install it on something like Ubuntu server.
Hmm… snap starts to look like a bad idea from a DevOps viewpoint.
Might be wrong tough, as it’s largely uncharted territory for me.
Surely running different services on the same server but on different network interfaces is not a novel idea.
Quite a common practice and trivial to set up usually. Or am I missing something on how this is supposed to be set up?