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.
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.
Docker services should let docker handle it, and the user could then manage it through Docker or forward to some other logging service (syslog, systemd, etc). Processes in containers shouldn't touch rotation or anything, just log levels and maybe which types of logs go to stdout vs stderr.
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.
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.
I disagree with this, container runtimes are a software like all others where logging needs to be configured. You can do so in the config of the container runtime environment.
Containers actually make this significantly easier because you only need to configure it once and it will be applied to all containers.
You are right and as others have pointed out correctly it’s Nextcloud not handling logging correctly in a containerized environment. I was ranting more about my dislike of containers in general, even though I use the technology (correctly) myself. It’s because I am already old on the scale of technology timelines.
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.
Does podman do the Docker networking thing where I can link containers together without exposing ports to the rest of the system? I like my docker compose setup where I only expose caddy (TLS trunking) and Jellyfin (because my TV fails connecting w/ TLS).
I'm considering switching to Seafile. I just need documents to sync and Collabora integration, and it seems to do both without dealing with PHP nonsense.
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.
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.
Nc is great, it really is amazing that it is foss.
Sure it isn't the slickest or fastest, and it does need more maintenance than most foss services, but it is also more complex and has so many great features.
I really recommend nc, 99% of the time it just works for me. It just seems that their docker was done pretty poorly imo, but still it just works most of the time.
I've considered writing my own, but it's a ton of work. Even for my very basic use case of a file browser that offloads all edits to Collabora CODE. I had a basic system started in Go some years back, but bailed when I got a basic setup working (just file ops).
Maybe I'll give it a shot again. I mostly use Rust now, and I'm kind of stalling on my P2P Lemmy idea anyway. I really don't like PHP and I don't use many of the Nextcloud features anyway. I just want Google Drive w/ LibreOffice or OnlyOffice.
My NC setup "just works" though. So I'm not super motivated to replace it.
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.
It can be fidgety, especially if you stray from the main instructions, generally I do think it's okay, but also updates break it a bit every now and again.
Yeah, anything that involves a bunch of complicated relationship interaction between PHP scripts I just don't mess with too much.
Right now I'm hosting it through Docker on top of OpenMediaVault which is hosted on Proxmox.
If an update absolutely borks NextCloud and for some reason its BorgBackup function doesn't work, I can at least hope to count on the ProxMox snapshot of the whole volume!
And besides that, I don't actually store anything essential in NextCloud's volume itself. It's all an external mount that I could browse with any file explorer, so worst case, I'd just lose a lot of convenience. :p
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.
Look, defaults are a thing and if your defaults suck then you've made a mistake and if your default is to save a 100GB of log file in one file then something is wrong. The default in Dockers should just be not to save any log files on the persistent volumes.
Persistent storage should never be used for logging in docker. Nextcloud is one of the worst offenders of breaking docker conventions I've found, this is just one of the many ways they prove they don't understand docker.
Logs should simply be logged to stdout, which will be read by docker or by a logging framework. There should never be "log files" for a container, as it should be immutable, with persistent volumes only being used for configuration or application state.
The AIO container is so terrible, like, that's not how you're supposed to use Docker.
It's unclear whether OP was using that or saner community containers, might just be the AIO one.