36
submitted 5 months ago by MTK@lemmy.world to c/selfhosted@lemmy.world

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 50 comments
sorted by: hot top controversial new old
[-] Shimitar@downonthestreet.eu 12 points 5 months ago

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

[-] catloaf@lemm.ee 24 points 5 months 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.

[-] sugar_in_your_tea@sh.itjust.works 4 points 5 months ago

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.

[-] Shimitar@downonthestreet.eu 0 points 5 months 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.

[-] peregus@lemmy.world 5 points 5 months ago

The fact (IMHO) is that the logs shouldn't be there, in a persistent volume.

[-] Shimitar@downonthestreet.eu -1 points 5 months ago

Probably, but still, if they are, just rotate them.

[-] non_burglar@lemmy.world 23 points 5 months ago

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

load more comments (14 replies)
[-] mhzawadi@lemmy.horwood.cloud 7 points 5 months 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,
[-] AMillionMonkeys@lemmy.world 6 points 5 months ago

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

[-] ikidd@lemmy.world 2 points 5 months 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.

[-] peregus@lemmy.world 1 points 5 months ago* (last edited 5 months ago)

The ~~price rboem~~ problem is that the log file is inside the container in the www folder.

Edit: typo

[-] sugar_in_your_tea@sh.itjust.works 3 points 5 months ago
[-] peregus@lemmy.world 1 points 5 months ago

Right, I should probably map the file directly to the system log folder. I'll try that.

[-] sugar_in_your_tea@sh.itjust.works 1 points 5 months ago

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.

[-] sith@lemmy.zip 0 points 5 months ago* (last edited 5 months 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.

[-] MTK@lemmy.world 2 points 5 months ago

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.

[-] sugar_in_your_tea@sh.itjust.works 1 points 5 months ago* (last edited 5 months ago)

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.

Edit: looks like Seafile may do the trick.

[-] sailorzoop@lemmy.librebun.com 2 points 5 months 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.

[-] Appoxo@lemmy.dbzer0.com 3 points 5 months ago

Well that's not jellyfins faults but rather watchtower...

[-] ChaoticNeutralCzech@feddit.org 1 points 3 months ago

Is there a tool to automatically check partitions for excessive log files, caches or other junk? The root partition of a Linux box I have is 60 GiB and almost full, and XFCE will fail to start when there's no space. I would use WinDirStat on Windows but the Linux alternatives can't do the job properly because they scan by file tree and some subdirectories of / are on other partitions because of symlinks... I guess I could boot a live USB and mount my ext4 root partition but not the NTFS storage one but I'd rather avoid that.

[-] MonkeMischief@lemmy.today 2 points 5 months 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.

[-] MTK@lemmy.world 2 points 5 months ago

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.

[-] MonkeMischief@lemmy.today 1 points 5 months ago

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

[-] breadsmasher@lemmy.world -3 points 5 months ago

101 of log files

is to configure it yourself

[-] MTK@lemmy.world 4 points 5 months ago

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.

[-] sugar_in_your_tea@sh.itjust.works 2 points 5 months ago

Exactly. It should just write to stdout and let whatever is running it manage it.

load more comments
view more: next ›
this post was submitted on 23 Feb 2025
36 points (92.9% liked)

Selfhosted

50093 readers
169 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