986
submitted 10 months ago by atmur@lemmy.world to c/selfhosted@lemmy.world
you are viewing a single comment's thread
view the rest of the comments
[-] MentallyExhausted@reddthat.com 20 points 10 months ago

I run it and mariaDB in docker and they run perfectly when left alone, but everything breaks horribly if I try to do an update. I recently figured out that you need to do updates for NC in steps, and docker (unRAID’s, specifically) defaults to jumping to the latest version. I think I figured out how to specify version now so fingers crossed I won’t destroy it the next time I do updates.

[-] atmur@lemmy.world 12 points 10 months ago

This is probably what I'm doing wrong. I'm using linuxserver's docker which should be okay to auto update, but it just continuously degrades over time with updates until it becomes non-functional. Random login failures, logs failing to load, file thumbnails disappearing, the goddamn Collabora office docker that absolutely refuses to work for more than one week, etc.

I just nuke the NC docker and database and start from scratch every year or so.

[-] thisisawayoflife@lemmy.world 6 points 10 months ago

You absolutely need to move from patch to patch and cannot just do a multiple version jump safely. You also need to validate the configs between versions, especially major release updates or you risk breaking. New features and optimizations happen and you also may need to change our update your reverse proxy configuration on update, or modify db table configuration (just puking this from memory as I've had to do it before). I don't know that there's automation for each one of those steps.

Because of that, I run nextcloud in a VM and install it from the binary package. I wrote a shell script that handles downloading, moving the files, updating permissions and copying the old config forward, symlinking and doing the upgrade. Then all I have to do is log in as administrator, check out the admin dashboard and make sure there aren't new things I have to address in the status page. It's a pain, but my nextcloud uses external db and redis and PHP caching so it's not an easy out of the box setup. But it's been solid for a long time once I adopted using this script.

[-] eos300v@lemmy.world 1 points 10 months ago

Would love to take a look at that bash script (or at least a template of it) if you wouldn't mind

[-] thisisawayoflife@lemmy.world 2 points 10 months ago* (last edited 10 months ago)

Here you go:

https://pastebin.com/f5tL7xwx

There could probably be some additional refactoring here, but it works for my setup. I'm using default nginx paths, so they probably look different than other installs that use custom stuff like /var/www, etc.

Use it by putting it in a shell script, make it executable, then call it:

sudo scriptName.sh 28.0.1

Replace the version with whatever version you're upgrading to. I would highly recommend never upgrading to a .0, always wait for at least a .1 patch. I left some sleeps in the when I was debugging a while back, those are safe to remove assuming it works in your setup. I also noticed some variables weren't quoted, I'm not a bash programmer so there's probably some consistency issues that could be addressed if someone is OCD.

[-] eos300v@lemmy.world 1 points 10 months ago

Thank you for taking the time ! This is a great resource

[-] thisisawayoflife@lemmy.world 1 points 10 months ago

Sure! I'll respond with a link in a bit.

[-] thisfro@slrpnk.net 3 points 10 months ago

For me everything works fine since years, EXCEPT collabora. I use onlyoffice now, it's much faster and very stable

[-] fine_sandy_bottom@lemmy.dbzer0.com 2 points 10 months ago

Yeah I don't like auto upgrades. Everyone says it's fine but that's not my experience.

My stuff isn't public facing so I'm not worried about 0-days

this post was submitted on 01 Jan 2024
986 points (97.3% liked)

Selfhosted

40134 readers
291 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

  1. Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don't duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 1 year ago
MODERATORS