Snap

From: william (WILLIAMA) 8 Nov 2022 16:19
To: ALL1 of 3
Anybody know anything about Snap installs, specifically on Linux. 

Wheels were starting to fall off my Owncloud server, mainly because of a very old release of Raspbian, but also because Letsencrypt fannied about with ssl certs in the middle of last year, and I didn't spot that I'd stopped getting server update notices, so I was two versions behind. There's a long story about this and that, but basically, a rebuild up to date on a new Raspberry Pi (new to me, that is) stopped being fun.

So, I started with a fresh Raspberry Pi OS, (64 bit!) and dived into the world of Snap. Very curious that one single command,
Quote: 
snap install nextcloud 
does everything: apache, php, MySQL etc etc. You hit enter and watch the text scroll by. A couple of minutes later you can slap your server's IP address into a browser and there's a working Nextcloud instance. A bit more faff in my router to adjust the port forwarding and I can get in using my NoIP domain.

Well, it does almost everything.

What it doesn't do is set up SSL, or even point you in the right direction. Basically, even though I was well aware that a Snap install is totally different, e.g. almost everything is loaded at start-up or on demand from compressed Snap files, I was too blasé. The weary traveller looking for familiar config files, logs, and so on, will be disappointed. So it looks as though I made a balls up of installing Certbot/Letsencrypt, possibly more than once. There is even a Snap install for Certbot (I think they're moving to that being preferred) but that doesn't seem to be compatible with a Snap-installed-Apache, but rather for a trad install. Somewhere along the line, I got my certs issued. SSL now works. Certbot is there, probably more than once and probably spaffed into all kinds of places it shouldn't be. Tests such as Certbot renew --dry-run fail to dry run "No simulated renewals were attempted". Certbot certificates informs me "No certificates found". My browser tells me that Letsencrypt issued my certificate on 6 November at 9:16 pm, but there is nothing in the Certbot log (the one I can find) to suggest how it got there, or where it is for that matter. I have no idea whether the certificate will renew in 3 months. I'll just have to wait and see.

Edit: just 20 minutes later, I found a blog which tells me that, in effect, Certbot is available in the stack of bits with the Snap Nextcloud install. Tracking my way laboriously through Putty and my SSH commands, I find that I did indeed issue a command to the Snap service to start HTTPS with Certbot and set renewals going. There's a thing and a half.
EDITED: 8 Nov 2022 16:48 by WILLIAMA
From: CHYRON (DSMITHHFX) 8 Nov 2022 17:13
To: william (WILLIAMA) 2 of 3
Snap has been way more trouble than it's worth, IM (limited) E.
From: william (WILLIAMA) 8 Nov 2022 18:04
To: CHYRON (DSMITHHFX) 3 of 3
I can imagine it could be a nightmare in a business environment. It looks as though you have precious few levers to pull if anything needs to be tweaked or repaired. With my present setup, which doesn't matter in the slightest because I have plenty plenty of backups of what's important, I'm still aware that I can't, for example, take the latest patch set for Nextcloud. I have to wait and see when, and if, the Snap gurus get an update ready.