I set it to debug at somepoint and forgot maybe? Idk, but why the heck does the default config of the official Docker is to keep all logs, forever, in a single file woth no rotation?

Feels like 101 of log files. Anyway, this explains why my storage recipt grew slowly but unexpectedly.

  • MonkeMischief@lemmy.today
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 hour ago

    Wow, thanks for the heads up! I use Nextcloud AIO and backups take VERY long. I need to check about those logs!

    Don’t know if I’m just lucky or what, but it’s been working really well for me and takes good care of itself for the most part. I’m a little shocked seeing so many complaints in this thread because elsewhere on the Internet that’s the go-to method.

  • Matt The Horwood@lemmy.horwood.cloud
    link
    fedilink
    English
    arrow-up
    2
    ·
    2 hours ago

    for some helpful config, the below is the logging config I have and logs have never been an issue.

    You can even add 'logfile' => '/some/location/nextcloud.log', to get the logs in a different place

      'logtimezone' => 'UTC',
      'logdateformat' => 'Y-m-d H:i:s',
      'loglevel' => 2,
      'log_rotate_size' => 52428800,
    
    • non_burglar@lemmy.world
      link
      fedilink
      English
      arrow-up
      15
      ·
      11 hours ago

      I don’t disagree that logrotate is a sensible answer here, but making that the responsibility of the user is silly.

      • Shimitar@downonthestreet.eu
        link
        fedilink
        English
        arrow-up
        1
        arrow-down
        4
        ·
        4 hours ago

        Are you crazy? I understand that we are used to dumbed down stuff, but come on…

        Rotating logs is in the ABC of any sysadmin, even before backups.

        First, secure your ssh logins, then secure your logs, then your fail2ban then your backups…

        To me, that’s in the basic stuff you must always ensure.

        • catloaf@lemm.ee
          link
          fedilink
          English
          arrow-up
          1
          ·
          3 hours ago

          Those should also all be secure by default. What is this, Windows?

          • Shimitar@downonthestreet.eu
            link
            fedilink
            English
            arrow-up
            2
            ·
            2 hours ago

            Just basic checks I prefer to ensure, not leave to distribution good faith. If all is set, good to go. Otherwise, fix and move on.

            Specially with self hosted stuff that is a bit more custom than the usual.

    • catloaf@lemm.ee
      link
      fedilink
      English
      arrow-up
      21
      ·
      13 hours ago

      We should each not have to configure log rotation for every individual service. That would require identify what and how it logs data in the first place, then implementing a logrotate config. Services should include a reasonable default in logrotate.d as part of their install package.

      • Shimitar@downonthestreet.eu
        link
        fedilink
        English
        arrow-up
        1
        ·
        4 hours ago

        Agreed, but going container route those nice basic practices are dead.

        And also, being mextcloud a php service, of can’t by definition ship with a logrotate config too, because its never packaged by your repo.

      • RubberElectrons@lemmy.world
        link
        fedilink
        English
        arrow-up
        2
        ·
        13 hours ago

        Ideally yes, but I’ve had to do this regularly for many services developed both in-house and out of house.

        Solve problems, and maybe share your work if you like, I think we all appreciate it.

  • Neo@lemmy.hacktheplanet.be
    link
    fedilink
    English
    arrow-up
    16
    arrow-down
    3
    ·
    14 hours ago

    Imho it’s because docker does away with (abstracts?) many years of sane system administration principles (like managing logfile rotations) that you are used to when you deploy bare metal on a Debian box. It’s a brave new world.

    • Scrubbles@poptalk.scrubbles.tech
      link
      fedilink
      English
      arrow-up
      32
      arrow-down
      1
      ·
      14 hours ago

      It’s because with docker you don’t need to do log files. Logging should be to stdout, and you let the host, orchestration framework, or whoever is running the container so logs however they want to. The container should not be writing log files in the first place, containers should be immutable except for core application logic.

    • poVoq@slrpnk.net
      link
      fedilink
      English
      arrow-up
      4
      ·
      edit-2
      12 hours ago

      Or you can use Podman, which integrates nicely with Systemd and also utilizes all the regular system means to deal with log files and so on.

      • Neo@lemmy.hacktheplanet.be
        link
        fedilink
        English
        arrow-up
        1
        ·
        29 minutes ago

        Good suggestion, although I do feel it always comes back to this “many ways to do kind of the same thing” that surrounds the Linux ecosystem. Docker, podman, … some claim it’s better, I hear others say it’s not 100% compatible all the time. My point being more fragmentation.

    • mapumbaa@lemmy.zip
      link
      fedilink
      English
      arrow-up
      1
      arrow-down
      1
      ·
      edit-2
      2 hours ago

      I stopped using Nextcloud a couple of years ago after it corrupted my encrypted storage. I’m giving it a try again because of political emergency. But we sure need a long term replacement. Written in Rust or some other sane language.

    • ikidd@lemmy.world
      link
      fedilink
      English
      arrow-up
      2
      ·
      8 hours ago

      Just use the official Docker AIO and it is very, very little trouble. It’s by far the easiest way to use Nextcloud and the related services like Collabora and Talk.

  • zoey@lemmy.librebun.com
    link
    fedilink
    English
    arrow-up
    1
    ·
    12 hours ago

    Reminds me of when my Jellyfin container kept growing its log because of something watchtower related. Think it ended up at 100GB before I noticed. Not even debug, just failed updates I think. It’s been a couple of months.