this post was submitted on 23 Feb 2025
22 points (86.7% liked)

Selfhosted

42779 readers
1358 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 2 years ago
MODERATORS
 

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.

top 15 comments
sorted by: hot top controversial new old
[–] Shimitar@downonthestreet.eu 9 points 3 hours ago (2 children)

You should always setup logrotate. Yes the good old Linux logrotate...

[–] non_burglar@lemmy.world 2 points 45 minutes ago

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

[–] catloaf@lemm.ee 8 points 2 hours ago (1 children)

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.

[–] RubberElectrons@lemmy.world 2 points 2 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.

[–] sailorzoop@lemmy.librebun.com 1 points 1 hour 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.

[–] neo@lemmy.hacktheplanet.be 12 points 4 hours ago (2 children)

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.

[–] poVoq@slrpnk.net 3 points 1 hour ago* (last edited 1 hour 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.

[–] scrubbles@poptalk.scrubbles.tech 24 points 3 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.

[–] AMillionMonkeys@lemmy.world 4 points 3 hours ago (1 children)

Everything I hear about Nextcloud scares me away from messing with it.

[–] ocean@lemmy.selfhostcat.com 2 points 3 hours ago

If you only use it for files, the only thing it's good for imho. it's awesome! :)

[–] JASN_DE@feddit.org 3 points 4 hours ago (1 children)

Feels like blaming others for not paying attention.

[–] scrubbles@poptalk.scrubbles.tech 7 points 3 hours ago (1 children)

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.

[–] exu@feditown.com 2 points 1 hour ago (1 children)

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.

[–] scrubbles@poptalk.scrubbles.tech 1 points 1 minute ago

I have lost now not hours, but days debugging their terrible AIO container. Live production code stored in persistent volumes. Scattered files around the main drive in seemingly arbitrary locations. Environment variables that are consistently ignored/overrided. It's probably my number one example of worst docker containers and what not to do when designing your container.

[–] breadsmasher@lemmy.world 2 points 3 hours ago

101 of log files

is to configure it yourself