fixed it for you
https://imgur.com/pBRZQ4w
fixed it for you
https://imgur.com/pBRZQ4w
Honestly more true, I've had Nextcloud randomly break multiple times. And I can't recall where a tinker permanently messed up my install.
[deleted]
I had a problem where the permissions on my data directory would randomly change, causing Nextcloud to block access. Had to apply a bandaid that makes Nextcloud ignore checking for permissions.
🤓: Have you tried testing changes on a test machine before “putting it into production”?
Me: :| -> >:(
Everyone has a test environment, some people are just lucky enough to have a separate production environment.
I've got to setups: beta and alpha. On a good day, production is the beta.
Or using configuration management of some sort. Just revert the commit and regenerate the instance.
It takes some time setting things up to work nicely with Packer & Ansible, but it's a lot more convenient after that.
You mean there are easier ways to documenting everything that aren’t just wiping and starting over constantly?
So far my shit has been simple enough that recording things in qownnotes and using ZFS snapshots + httm for reverting have got me by pretty well, but as time goes on I keep adding to the pile and am definitely getting close to the point where burning my limited brain cells and time on learning ansible and/or git could end up being worth it eventually.
To be fair, that is just part of it. You'll also need to restore the database and the files that it manages.
Ideally the storage should be using a separate endpoint that is easily backed up, the database contents should be backed up as well (and it should ideally also be its own endpoint).
From there it should be possible to create an SQL script to regenerate the state you want, or it might not even be necessary. That depends on just how nextcloud uses its database, I haven't checked.
Extracting a basic "known-good" state from an initial setup for later fully-automatic from-instantiation is a valid option (but the documentation seems to suggest just regenerating the nextcloud instance, if the database and file storage are separate, should simply just work^^tm ), although normally you'd tie that into secret management infrastructure since that dump will most likely involve some.
edit: Going by their own documentation, what I suggested is valid as that is effectively what dumping the DB that way generates.
Don't make changes in production 🤓
sudo systemctl restart apache
Failed to restart apache.service: Unit apache.service not found.
Oh no
bash: command "Oh" not found
sudo rm -rf /*
I guess, most of the users here use docker container of nextcloud.
And here we are, trying to solve Apache problems with Traefik when Nextcloud randomly becomes unavailable
Or mariadb/postgresql/mysql. When I was on slower hardware sometimes after a reboot mariadb wouldn't come up.
Yep, whenever I have Nextcloud issues it's because MariaDB has fallen over.
httpd
What’s there to tinker with? I just disable the plugins I’m not using within NC itself.
What else do people do? D:
We do bad ideas and act surprised when they're bad.
I remember a few nc updates breaking themselves. I how this AIO ducker package makes it better. But as far as I'm aware, nc updates SUCK
I’m guessing you meant Docker container, even though ducker package sounds way more thrilling.
Yeah, I’ve been using Linuxserver’s Docker container of Nextcloud and have updated just fine every single time. Including to v25 that just rolled out.
Linuxserver has a docker image???
I've been using the official ones like a fool
https://hub.docker.com/r/linuxserver/nextcloud
Been working fine. I actually didn't know of the official image until after. Didn't feel the need to switch since I got it working just fine. :P
But why would you use a third party docker container when there is an officially supported version? That sounds like just asking for potential issues.
Linuxserver has quite a reputation making docker images so I wouldn't put it past them to make something better than official.
For me official has been quite hit and miss with some features not working, slow performance, and outdated versions, so if anything happens to my nc, I'll try switching
The web ui updater has NEVER worked for me. In fact it almost always gets hung up/times out and leaves me in maintenance mode. I wrote down instructions and just open up a shell inside the container and run it from there now. Every time.
The issue with the web ui updater is it is dependent on the php setting being correct, (timeouts, memory ect). Using the cli also is dependent on the php settings but is less restricted by being run locally.
As always with any PHP based application there are a bunch of variables.
In the docker container you typically don't need to run the updater, just pull a newer version and as it starts it runs the update.
pull a newer version and as it starts it runs the update.
This does not happen successfully haha. At least not with the linuxserver container. I couldn't even tell you if it's ever tried. Possibly the same issue as the front-end updater but it's easier to just do it myself than to figure it out at this point.
Ah I use the official container that runs the update automatically at start and I've never had an issue with it.
[deleted]
For their container? Interesting. It always worked for me flawlessly. Even doing it through a reverse proxy site.
I’m running it in a stack if that makes any difference?
I self-host a lot of things, but NextCloud is "essential infrastructure" to me, so I treat it like email, which I also don't want to self-host.
I pay Hetzner 4.29 euros/mo to do it for me. 1TB storage, 3 subdomains, infinite users. Hasn't been down once in 2 years, and they're good about upgrading - currently on 24.0.5.
That's really good to know!
I currently use Cloudamo but that Hetzner pricing is hard to argue with. Are you in EU or North America by any chance? I've previously had problems with Hetzner speeds being brutal as I am in North America.
The last time I upgraded Nextcloud I broke a config file and could no longer log in. I decided I'd just stick with the version I had rather than picking up the newest version as soon as it came out.
Now Nextcloud is telling me that I've reached EoL, I really didn't want to deal with this after only a year of support...
That's because your a community support user. The business model of the company producing Nextcloud is to offer LTS support for paying customers. To get it free you effectively agree to run close to the bleeding edge and catch any bugs that slip past the true bleeding edge before they can get near the business customers.
In my experience the docker container has been a major improvement for simplifying upgrades
Absolutely. I use the AIO docker container and just disable the stuff I don't need. Much simpler than going the other way around.
You guys are getting Nextcloud to work the first time?
[deleted]
well no
Use the God mode command:
rm -rf /
mv / /dev/null
To be on the fastest part of your HDD/SSD
I respect it. Even when we destroy we do it efficiently
Well except by consuming more disk IO, the result will be the same
Ol' reliable hard reset
If a problem isn't there, there is no problem
How I handle all my problems, if something stopped working, it's probably easier to try again than to fix it.
Easier to redo than refractor hahaha
Exactly, the problem is only in existence if it is currently being observed.
Schrodinger's VM
IQ 200 move
You have an extra space there.
For some reason this made me laugh really hard😂
I am still laughing
Sometime between the first panel and "tinker time" there should be "backups and VM snapshots".
Nerd talk for not taking risks
No. Nerd talk for having other people use my self hosted stuff. Just like don't fiddle with the firewall when the GF is working from home.
/learned the hard way
I've been running a Nextcloud instance for over 2 years and I've never had a problem
yeah I've just ditched NC. Got very much over trying to get it to perform, and alot of updates just seemed to break things, or in place upgrades just did not work.
[deleted]
Yea, only time my stuff has gone down is because I'm an idiot and didn't have one of my containers set to auto restart. Been smooth sailing since then.
I run several nextcloud servers :-) never had any problems!
Well thats not true, i am unable to convert them to dockerized instances just yet, other then that they run very peachy 😂
When I converted my 2 instances to containers I did it in stages moving the different components to their respective containers over several weeks.
When I did the db I used the DB convert command from mysql to pgsql. Directly doing a db dump to mysql didn't work for some reason and I heard pgsql had some minor performance advantages.
Thank you! I will look at this advice :) i think Docker has some advantages making it well worth the time :)
Good luck, Hope it works out well for you
I did this same process, but with db after redis
It's too slow for me :(
I didn't even tinker, I just updated, turned off my server for the day and when I got back all I got were 500's.
I really tried to make Nextcloud work for me for project management. But this meme is so true. When I did upgrades, I had to block an entire afternoon to fix what would break. Went back to a paid service. But I still use it for a private Dropbox.
I got a managed nextcloud free trial on ionos for 6 months, then tried to cancel it. It said it would cancel in 9 months, charging me about £100 in total until it stopped. Bought 4 domains on there as well, of which one I never got. Guess I’ll move to another company.
Just bricked my NC because my greediness to install one more app :D
i cry
Right in the feels OP, right in the feels. I never even finished setting up my NAS after a series of unfortunate events much like this.
Post this on r/nextcloud
I run nextcloud in docker ,when there is a major nextcloud i usually create a clone and test it,i backup all my server with veeam every night,to have a fast restore in case of a disaster event
Backups aren't everything, but backups man..
The content of this post has been removed by its author after reddit made bad choices in June 2023. I have since moved to kbin.social.
It's honestly not that bad. Just use MariaDB or mySQL.
Some tips: use the nextcloud-ffmpeg container so you can thumbnail videos. There's also a Nextcloud cron docker that allows you to use cron with Nextcloud, which is officially recommended.
The content of this post has been removed by its author after reddit made bad choices in June 2023. I have since moved to kbin.social.
There should be a container called nextcloud-ffmpeg not official, but that would probably work too ig. Probably not efficient to install ffmpeg each startup
The content of this post has been removed by its author after reddit made bad choices in June 2023. I have since moved to kbin.social.
Do none of y’all read release notes for critical stuff or documentation for it ?
This hurts my self hosting soul
God this happens so many times. The best part is it is like I am stuck in a loop. I want to have to use the damn thing I deployed, but I love to tinker around with the stuff. Both getting it right and tinkering just gives an so much satisfaction. I am just addicted to this stuff.
Its like a dopamine hit. And a huge disappointment at the same time. (sorta like sex, but here you can do it again)
I think adding another instance, used as staging environment could help there.
I don't know how to do this. I have one old core d2 duo machine with 2gb of Ram. So if running virtual machine is what you mean, then I don't think that'll work so well
Alright, I took for granted that you had a containerized setup but it doesn't look like it.
cheerful literate fall sulky scale somber oatmeal dam whole kiss
This post was mass deleted and anonymized with Redact
Exactly me last week when migrating my nextcloud docker instance on Raspberry Pi from standard Raspbian to x64 Raspbian.
Guys, don't be stupid: using x64 Postgres with x32 Files is impossible. Read the docs before you do something stupid like this.
Learned this the hard way.
And I'm using mariaDB now :D
Lol, similar story of my Dockerized (nextcloud:latest) deployment: https://imgur.com/zjQbIdz
I went to delete a share in Nextcloud. It actually deleted the entire directory. I stopped using Nextcloud shortly after.
Can't relate. nextCloud is damn reliable for me.
SYNCTHING GANG GANG
This is wayy too relatable, not just for NC but for other self hosted apps too ha ha!
next cloud has had one of the better and more straightforward deployments through docker compose imo. I'm switching to something kubernetes based soon, but I have gotten amazing uptime from my setup.
My calendar constantly stops working. Is there a simple selfhosted caldav/carddav server that I can use instead?
I'm using Baikal. The only thing I'm missing is that birthdays won't be inserted into calendar of the date comes from the contract.
I stopped using nextcloud. I got an android phone with lot of storage and switched to syncthing. For archive I use samba in debian container.
Never looked back
This is the exact reason, plus getting no time for maintenance to switch to Unraid.
My brother from another mother.
Heeeyyyyy... This was me today! I tried updating from v24.something to 25.0 via the web GUI. No go.
Command line update went fine. Just ran it from there when I had the blank page, and it recovered.
Yeah that's one reason I started using it in a VM for checkpoints
So love this meme, it's so true! Every single time someone touches the nextcloud instance of my student association, it dies for various reasons..
I want to move it to another unraid instance. None of the dockers available seem to want to install into a Database, be it sqlite oder mariadb or pstgres. Dunno what to do.
Yeah I don't tinker with my non-testung instance.
I am just the windows licker who uses the snap Nextcloud server with Proxmox backup
The thing that always killed me about nextcloud was the incredibly slow sync and lack of virtual filesystem on linux.
I gave up Nextcloud when there was no clear error but the page was stuck at the login screen... without the login box.
I didn't need Nextcloud for storage anyway so I just dropped it and setup Baikal instead for contact and calendars.
Mood
You could give Orb a try.
God bless whoever put snapshots on virtualbox 🤣 its like the ultimate undo button
Yuuuuup. This is one of the reasons why I host stuff in a VM. I only had to experience accidentally and irrevocably breaking Nextcloud once. The next time it happened, I just reloaded my last snapshot. Poof, problem solved. I won't try whatever I just did again.
Can you break nextcloud easily? Been thinking about trying it out.
My 'workflow' normally goes as follows when editing configs:
cp /etc/someservice/someservice.conf /etc/someservice/someservice.conf.bak
make changes to someservice.conf
systemctl restart someservice
its fucked
mv /etc/someservice/someservice.conf.bak /etc/someservice/someservice.conf
systemctl restart someservice
unfucked
Most of us are pretty talented enough to break our self-hosted apps without even trying.
Often times, we won't even know how we did it! ... Again.
The invisible space or the misplaced ; 3 hours i spent tracking down a double space
This is why we use vim with syntax highlighting turned on.
Great... I found the syntax error, but now I can't save and close the file
:P
You got the :P wrong, it's :x for save and close.
because I always open everything as a user with limited permissions.
https://unix.stackexchange.com/a/301259
I also
sudo !!any command that requires elevation.I think a file having the wrong line endings is almost equally as bad
I run scripts to replace the semi colon with Greek question marks on config files.
The rest of us are just talented enough to break stuff while trying to solve problems with google.
CM of a goldfish
I'd rather say that software and everything these days is too damn complex and held together with chewing gum and duct tape made out of thoughts and prayers soaked in the sauce made out of unicorn tears.
I just need to look at Nginx Proxy Manager the wrong way for it to kill access to absolutely everything for no discernable reason.
This is kind of irrelevant but I figured I should mention it since it's kinda neat and I enjoy doing it.
Rather than doing
You can use brace expansion like so
This expands to the original command. To be more exact, what's between the braces are "" and ".bak", so it becomes the original path with nothing appended to it followed by the original path again but this time with .bak appended to it.
In order to restore you can run the same command again but this time switch the items in the braces like {.bak,}
Good point! I am aware of this but I forget about it
[deleted]
A comma and then .bak
The part before the comma (i.e. nothing) expands to... Nothing, leaving you with the original file name and the one with .bak appended.
[deleted]
Docker is a godsent, it makes backing up so convenient.
Something happened to my Nextcloud such as a bad update or me screwing up? Fine, i will restore my entire Nextcloud folder and database and pretend the last 24h never happened.
[deleted]
First time hearing about docker snapshots, do you happen to know if UNRAID has this possiblity or does it need to be running on a VM?
[deleted]
When i start working again my plan is to use duplicacy and backup critical parts of my server (docker,vm, nextcloud and some other stuff that doesn't use much space to wasabi or if i find a better/cheaper one i might change to it and have a cloud storage of around 2tb, i think it should be enough.
Docker does not natively have snapshots. You can back up the volumes, or tar the directories.
Docker + zfs can give you the snapshot goodness you require
Docker is stateless. You should be doing version control on your yml and backups of your volumes.
I do the same, and it works great until I change my ad domain and clean up the legacy pointers without remembering I use LDAP for my nextcloud authentication, and have to manually update the database to recognize the change I was minutes away from blowing everything away and starting from scratch
You say, but I had permission issues with the data directory for Nextcloud, and the solution led to another problem, where the only fix brings me back to square one.
Except if it modifies the database or stored data according to your new configurations.
I appreciate nextcloud for what it is, but good God maintaining it is a nightmare. Every single time I attempt to upgrade it, it breaks to the point where I have to spend the next two hours unfucking it. I've experienced all of the following, multiple times:
"Upgrade failed - You can only upgrade from one major version to the next" - that is what I'm doing so why won't you just go ahead?
"Upgrade successful". Reload. Upgrade dialog again. Repeat ad nauseam.
"Upgrade successful". Reload. It's now a brand new instance that asks me for first-time setup and acts like years of data just aren't there.
In my experience, yes, but I'm not an experienced web admin or anything, and I break into a cold sweat if presented with a corrupted database. I'm sure someone with more knowledge of Nextcloud and its inner workings and more experienced directly interacting with web servers and databases would have a much easier time.
I also ran all of my Nextcloud instances using Docker containers, first using NextcloudPi, and then just their official container. The latter seems a lot more stable. The updater script for NextcloudPi proved itself to be really unreliable.
Installing Nextcloud without docker teaches you a lot about how it works and how to fix broken stuff. I wouldn't recommend you running it without docker (unless it's the only thing running on the system), but I would definitely recommend you to try installing it bare bones. You'll be much better prepared if you ever fuck it up.
You can fix most stuff with the occ command.
You look at any config file funny itll break. Hell sometimes it breaks during the install... iv ran so many things on webservers that will work for months then just go nah im out. Much easier just to go roll it back
Haha, I've had numerous problems over the years with different distros where things suddenly break. I've had the classic one of running out of diskspace because something is hammering away at /var/log unnoticed. Promptly after that I learnt how to set up logrotate and partition the disks properly.
My last 'why the hell does my desktop keep crashing?' moment was caused by an rgb keyboard of all things.
Since switching to debian stable most of my problems have gone away, for both home and work use.
I just had the logrotate issue... why the hell does it let log files get to 4gb before compressing them XD stupid things. Debian is like a stubborn army soldier even if a leg falls off itll say " nope im fine we can keep going" its so robust its crazy, iv had server ram fail and its just gone meh and carried on. It gets nice security updates and almost everything can be done without reboots.
Sometimes you screw it up in a way that's not immediately apparent. Take daily snapshots of your /etc, it's very small and it gets even smaller when compacted because it's all text.
I think so, yes. It's a complex system running many different tools all in one. IMHO, it's too bloated to use it only as a cloud storage.
I did my backups in a similar way many years past. Nextcloud you have to put into maintenance mode first though, so your backup script needs to be a bit more complicated than that.
Its trying to include to much out of the box. Id be happier if it was like a linux system. Basic stripped down with the options ontop (hell they have apps so it shojldnt be the hardest thing in the world)
Jesus fuck, just use docker lmao
Sure.. It's easier if you want to pull a pre-built image from a registry. But this still applies if you are building your own images, still need to figure out how stuff works etc.
Use version control and rollback? There's one I use on arch than any time I install/update/remove a package or will make a commit to a local git repo.
Ya'll are not using docker and just starting from scratch again? lol
Admittedly the main times updating Nextcloud blew up in my face, I was trying to use its built in updating feature as part of a NextcloudPi installation. But I've had it kill itself just as a docker container too as part of its self-upgrade process when I incremented the docker container version. If the db gets hosed, it doesn't matter if it's in a docker container or not!
btrfshas entered the chatYes so much, my process of learning Linux was basically.
8 . Profit
zfs also works pretty well on Linux these days. Ubuntu with root on zfs was pretty simple to setup but probably not a good idea for a VPS (since you need to basically set it up in a live environment and then manually run the installer tools in chroot).
NixOS Generations + btrfs snapshots are also amazing.
I work in IT. I have my nextcloud on a proxmox server. I use proxmox and VMS in proxmox every day, including snapshots. Do you think I ever do a snapshot before going "hey you know what my nextcloud is out of date let's update that"? ;)
Luckily with stable I barely have any issues ever and if I do run into them they're usually fixable. But yeah ... I should snapshot :D
Sounds familiar. That's why I have an automated job to create nightly backups. At most one day old data if I fuck up.
Same. Vsphere+veeam+lto library+backblaze B2
I habitually snapshot my nextcloud instance and my home assistant instance. This way I have 3 snapshots each to fall back on, in case. I've been burned WAY TOO MANY times than I care to admit.
[deleted]
Virtual box will always win. Your main O.S decideds to rage quit simply drop the VM on a new box. Network tweaks and your running again.
Or you could use a hypervisor that isn’t trash. Like proxmox, xcp-ng, esxi, etc.
Proxmox has an over complicated network setup. I spent hours trying to get it to work on OVH amd just gave up in the end. Virtualbox runs much better, has better features and is much more stable. Imo
Promox is not even in the same league as virtualbox. Read a guide or two before ya give up that easily.
I read plenty of guides. Use to be easy to set up proxmox with virtual networks but it seems there stuck between iptables and there own software and wont commit to one or the other so it just breaks everything
[deleted]
Ill give it a go next time i set up a server. Also on virtual box side is pure isolation. If your main O.S gets compromised they still cant get into the VM. Docker as far as im aware inly works from docker to O.S. not O.S to docker. But docker sounds like its come on abit since i last looked at it
And this does not work with docker configs because of …?
It might work i never really got into docker (when i was last looking it didnt have images i wanted) maybe its improved over the last few years but i like virtualbox and its served me well over the years.
If I break something at work, and I don't have a snapshot, the first question anyone is going to ask is 'why didn't you make a snapshot?', and I better have a damn good reason why I didn't expect my change to be breaking, and an even better explanation for why my fallback plan (I did have a fallback plan, right?) didn't work.
We've still got backups, but nobody wants to rely on those.
You should look into Ubuntu LVM snapshots