Just had NextCloud denying my credentials (not for the first time). I know they weren’t wrong because I’m using a password manager. Logs didn’t say much. Was about to reinstall (again, not the first time nextcloud went bonkers on me) before I tried a docker compose down && docker compose up. Lo and behold after a restart the credentials worked again.

This stuff is just way too flaky for something so important.

Is OwnCloud good again? My main usecase is saving photos but I don’t want them locked away in a database so SeaFile is out.

Edit: I’m going to take the time to reply to you all, bit busy with work and family suddenly. But a little update - I’ve quickly setup Immich and fired up the CLI to import my library. AFAIK the files are still stored on disk somewhere but metadata is in a database. I didn’t realize this before, knowing that I think my mind is made up and Immich is the best solution. Thanks everyone!

  • @wolre@lemmy.world
    link
    fedilink
    English
    102 years ago

    Would be interesting to hear a little more about your setup. I had some issues when I had Nextcloud installed directly on Debian (though nothing this major), have since switched to running it on Docker and it’s been very solid.

    • MidasOP
      link
      fedilink
      English
      12 years ago

      It’s the LSIO image hooked up to seperate (but also docker) postgres db that’s also used for other apps. The data and config directories are bind mounts to the local filesystem. It connects to a samba share via the external storage plugin. It is exposed to the internet through a caddy reverse proxy though (the database isn’t)

  • @notfromhere@lemmy.one
    link
    fedilink
    English
    -32 years ago

    Are you exposing it to the Internet? Weirdness like that might be from someone exploiting your instance.

    • MidasOP
      link
      fedilink
      English
      12 years ago

      Yeah - don’t see any evidence of that in the logs + why would it work again after a restart?

      • @notfromhere@lemmy.one
        link
        fedilink
        English
        12 years ago

        How do you have your auth working? Is it basic user/password managed on Nextcloud (external database connected?), is it external auth against something like Okta, or is it user/pass that you define from docker-compose?

        If via docker-compose then a restart would clear anything an attacker would have done and it would reload from the docker-compose process I think? I’m not too familiar with the specifics on that as I’m not a security researcher, but generally some attacks are resident in memory only and a restart can clear them only for it to crop up again later either due to a running process that was set to rerun an exploit or someone monitoring your system externally and retrying the exploit remotely again.

        Or it could just be some bug in Nextcloud or unique to your environment. Personally I’m only hosting things that are internally accessible via VPN anymore. Tailscale makes that super easy these days.

  • conrad82
    link
    fedilink
    English
    32 years ago

    I also stopped using Nextcloud after it broke a couple of times. As a consequence I also never use :latest tag on any docker container anymore - manual updates only

    When I switched to Android phone, I also switched to syncthing. If you have enough storage on your phone, it is amazing! Never looked back

    • MidasOP
      link
      fedilink
      English
      12 years ago

      When I first started selfhosting I put latest on everything AND used watchtower. Quickly learned my lesson.

  • @Nsh@lemmy.ca
    link
    fedilink
    English
    162 years ago

    I haven’t got this kind of issue with nextcloud, I’m pretty sure you can reset your password using occ via cli

    • MidasOP
      link
      fedilink
      English
      32 years ago

      I’m using the LSIO docker image and I could not locate the occ file to fire off the reset - but even then - I didn’t need to reset my password anyway…

      • @u_tamtam@programming.dev
        link
        fedilink
        English
        -22 years ago

        That’s your problem, just there: you deployed a one size fits all blackbox of a container that, by definition, on top of pulling all the inefficiencies and redundancies of docker, isn’t tuned for your specific hardware and operational needs. I get the appeal of containers, but if you want to self-host responsibly, you’ve got to be in control of what’s running and how.

        Sorry if this sounds harsh.

        • MidasOP
          link
          fedilink
          English
          12 years ago

          I honestly don’t see how my issues are related to docker. Sure the occ app was missing (or I just couldn’t find it, but the conclusion was that I didn’t even need it)

          I’m running Linux so there’s not really any inefficiencies in regards to resources AFAIK - it’s just namespaces and cgroups.

          • @u_tamtam@programming.dev
            link
            fedilink
            English
            12 years ago

            I could give you plenty of reasons why you would be worse-off deploying from docker without deep understanding of what’s going on, but to only list a few out of the obvious pile:

            • your container ships a bunch of things that you do not need and that take-up significant server resources. Not just nextcloud apps that you will never need but get loaded nonetheless, but also things like redis and a full-fledged collabora server that only make sense in a large-scale instances.

            • your container isn’t tuned for your server because whoever made the container had no way to know that in advance. For instance, It might be that your php-fpm forks beyond your multithreading or IO capabilities, that your application cache isn’t adequate wrt. your system’s RAM memory, etc

            • your containers duplicate functionalities from each other and from the operating system. You don’t need more than one http server, database, application process manager, interpreter, … but they add-up nonetheless and reduce the pool of available resources from the rest of the system and containers.

  • Archy
    link
    fedilink
    English
    22 years ago

    Do you have 2 redis containers by any chance? I’m asking because you mentioned Immich, and that one has redis as part of its stack

  • @festus@lemmy.ca
    link
    fedilink
    English
    19
    edit-2
    2 years ago

    What name do you assign the DB for PostgreSQL in Docker and does it by chance happen to match the name of any other containers, possibly in other docker compose files?

    I’m only mentioning it because I experienced weird inconsistent issues with a service I was running where it was sometimes having trouble connecting to its DB companion and I eventually realized that it was sometimes connecting to the other container. I was also finding that turning it off and on again was often ‘fixing’ the issue, at least for a while. Might be worth checking out. I’d also consider viewing the logs for Nextcloud (docker logs -f ) when you’re unable to login and see if there are any errors. Frankly I’ve never had these specific issues with Nextcloud, and given that it’s based on PHP (it only ‘executes’ on an HTTP request), it seems like restarting shouldn’t help unless it’s something else.

    • MidasOP
      link
      fedilink
      English
      12 years ago

      I run a separate instance of postgres since I also use it for a lot of other stuff.

      it seems like restarting shouldn’t help unless it’s something else.

      I’m honestly also baffled

      • @festus@lemmy.ca
        link
        fedilink
        English
        12 years ago

        And none the container names or link aliases conflict? Like you don’t have multiple db containers? Perhaps try renaming the Nextcloud db to something like nextcloud_db if you aren’t already.

  • ᓰᕵᕵᓍ
    link
    fedilink
    English
    82 years ago

    Nextcloud is an overkill. Its just too much. I’d say better split down the needed services. Baikal/radicale etc for contacts/calendar. Photoprism/librephotos etc for photos. A webdav server for storage. And so on.

  • @psilocybin@discuss.tchncs.de
    link
    fedilink
    English
    3
    edit-2
    2 years ago

    Thats frustrating

    I second the notion that your ip was banned by nc’s brute force detection

    The silent reconnects of a DAVx client on a phone could easily trigger this

    You can whitelist your home routers ip in the config IIRC Maybe not on the LISO container though, IIRC it is less configurable, but doesn’t “just work”, I’d ditch that not nextcloud

    Quick fix could be to “DELETE FROM” (or “TRUNCATE” if you are certain nobody is blocked correctly) the table bruteforce_attempts (or smth similar). Although that “dc up && dc down” worked could indicate another issue, as you do seem to have persistence with your db in a docker volume (cred are still there) which would mean the time penalty ran out during restart or oits somethimg else

    • MidasOP
      link
      fedilink
      English
      22 years ago

      I’m giving this a try now - it’s true it still saves the files on disk somewhere right? AFAIK at least so, this fits my requirements.

      • @BCsven@lemmy.ca
        link
        fedilink
        English
        22 years ago

        The installation instructions talk about the yaml amd env file to dowmload and edit, in one of those you specify explicit path of where your files go

  • @vividspecter@lemm.ee
    link
    fedilink
    English
    212 years ago

    My problem with nextcloud is more the performance of the web interface rather than it’s reliability (and that’s even with mariadb + redis setup and a decently fast minipc). It’s fine if you avoid the web interface, but that’s part of the draw of the thing.

    • @pim@feddit.nl
      link
      fedilink
      English
      52 years ago

      The performance is indeed pretty terrible. Most stuff runs fine on my NUCs except nextcloud. Maybe throwing more hardware at it solves it though.

      • Neshura
        link
        fedilink
        English
        1
        edit-2
        1 year ago

        As someone with a beef server: Nope, performance stays unsatisfactory. Redis helps a lot but only if the page is cached which tbh just makes the experience worse if the page isn’t cached

        Edit: I’m using the AIO installer though, as discussed elsewhere in this post that might be the root cause of the poor performance, will check on the weekend by installing nextcloud manually in a fresh vm

      • CypherPsycho
        link
        fedilink
        English
        52 years ago

        Nope lol I have a pretty godly server and nextcloud is slow as a mf

    • @MangoPenguin@lemmy.blahaj.zone
      link
      fedilink
      English
      82 years ago

      The poor performance carries over to the sync clients too because they’re just using webdav http requests. Nextcloud will take like 10+ hours to sync my folders, vs about 10 minutes with Syncthing or something else.

    • @slippery_salmons@lemmy.today
      link
      fedilink
      English
      12 years ago

      I’ve never really needed the web interface once everything was setup. Mobile app syncs my images and then I browse files through synced desktop clients. Never had any issues this way. I guess I’m not using the extra features some may be after in the webui.

    • @NicestDicerest@lemmy.world
      link
      fedilink
      English
      32 years ago

      There are more twerks to it than "just’ using mariadb and redis. Maybe look into Apache/nginx cacheing,tune your mariadb settings and stuff like that. Had performance-problems with my owncloud-instance, now it runs like a champ

      • @jcg@halubilo.social
        link
        fedilink
        English
        5
        edit-2
        2 years ago

        Honestly the official docker images are hot garbage. I used them when I first tried NextCloud and they load incredibly slow. Shelved it for a while, realized there was a bunch of shit they already have that I was looking for, and gave it a go with my own Dockerfile starting from the PHP alpine image. That one runs waaaayyy better.

        • @NicestDicerest@lemmy.world
          link
          fedilink
          English
          42 years ago

          I have no experience with the docker container, but optimization for the database and nginx/apache cacheing must be made individually depending on number of cpu cores, ram-size, etc etc etc. When overtuning for example your database it can happen that you run out of RAM, which means your system will crash or freeze. Happened to me. I run it “Baremetal” and configured it “the classic way”. Tbh, after those optimizations it runs really, really fast and response times are really quick.

          • @u_tamtam@programming.dev
            link
            fedilink
            English
            12 years ago

            I second that. I can’t say mine runs fast because my hardware is very modest, but it runs very decently considering it’s sharing resources with many other services.

            In general, it wouldn’t come to my mind to expect good performance by default out of anything pulled from docker. As soon as one starts hosting multiple services and apps simultaneously, containers get in the way or even make impossible proper resource allocation and tuning.

      • @vividspecter@lemm.ee
        link
        fedilink
        English
        22 years ago

        Fair, although I feel like performance should be better OOTB, particularly when I’m just using it as a single user. It is an old and complex application that does a lot, so it is understandable.

    • Clegko
      link
      fedilink
      English
      42 years ago

      MariaDB runs like hot garbage with Nextcloud imo. I’ve gotten to the point where I use legit MySQL or PostgreSQL and performance is night and day. I have no idea why Maria acts out with Nextcloud for me, but I’ve gotten tired of troubleshooting it.

      • @vividspecter@lemm.ee
        link
        fedilink
        English
        32 years ago

        Interesting. MariaDB was the path of least resistance for me but I normally prefer PostgreSQL. I’ll put it on the list.