this post was submitted on 29 Aug 2023
103 points (97.2% liked)

Selfhosted

40006 readers
893 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 1 year ago
MODERATORS
 

Hi all. Due to the news of the illegal images being hosted on lemmy, I shut down my instance. I read some comments from people stating that they were able to selfhost lemmy without pictrs, they just can't upload or cache photos. I think this is what I am interested in doing at this time.

I tried commenting out the pictrs section of my docker-compose.yml and removed the "depends on pictrs" sections. However, I get the error message in the attached screenshot when I go to my page.

Does anyone have any info on how to selfhost lemmy with image hosting completely disabled?

top 23 comments
sorted by: hot top controversial new old
[–] Die4Ever@programming.dev 41 points 1 year ago* (last edited 1 year ago) (2 children)
[–] dandroid@sh.itjust.works 11 points 1 year ago (1 children)

Awesome! Thank you for this link!

[–] nick@campfyre.nickwebster.dev 12 points 1 year ago (1 children)

Just a note that my PR there doesn't disable pictrs for your own instance's users. It just disables the caching of remote content.

[–] dandroid@sh.itjust.works 16 points 1 year ago (1 children)

That's fine with me, as I'm the only user in my instance.

Though I do still think this is a huge miss on pictrs to not allow the admin to browse the photos stored on their own server. I mean, someone could upload an illegal photo, not post it, then send the URL that only they could possibly know to whichever relevant government agency anonymously and potentially ruin the life of the admin.

Thank you so much for contributing and making this much needed fix.

[–] iamroot@discuss.tchncs.de 7 points 1 year ago (1 children)
[–] dandroid@dandroid.app 5 points 1 year ago

This is a good start, but I think there also needs to be a way to browse all the images stored and shred them.

[–] d_ohlin@lemmy.world 3 points 1 year ago

Great! This is awesome thank you so much!!

[–] redcalcium@lemmy.institute 26 points 1 year ago (1 children)

For now, you can just route /pictrs/ path to 404 so nginx won't serve any image from pictrs:

location ^~ /pictrs/ {
    return 404;
}
[–] dandroid@sh.itjust.works 3 points 1 year ago

Yes! This worked! Thank you!

[–] lung@lemmy.world 13 points 1 year ago (2 children)

Yeah it's been obvious and foreseeable that normal admins won't have the bandwidth to handle takedown requests and cp spam attacks. Sadly the only stable state I see for the fediverse is relying on centralized content hosts that can handle those problems. Well, maybe until AI can do it

[–] SmashingSquid@notyour.rodeo 3 points 1 year ago

It sucks there's no way to make use of the current csam blocklists except possibly if you're a big enough instance since you can't get access without approval. Instances going through cloudflare that use the cloudflare caching can use it through them but it only works on images it's serving so wouldn't block them being uploaded, just served to other instances.

[–] Kbin_space_program@kbin.social 3 points 1 year ago (1 children)

Wouldn't you only really need one(or a few) instance that could do the work and flag things for everyone?

[–] yoast@notdigg.com 1 points 1 year ago

Yeah I've envisioned sharable block lists that you can subscribe to similar to pihole. That'd be great

[–] Decronym@lemmy.decronym.xyz 7 points 1 year ago* (last edited 1 year ago) (1 children)

Acronyms, initialisms, abbreviations, contractions, and other phrases which expand to something larger, that I've seen in this thread:

Fewer Letters More Letters
DNS Domain Name Service/System
HTTP Hypertext Transfer Protocol, the Web
PiHole Network-wide ad-blocker (DNS sinkhole)
SSD Solid State Drive mass storage
nginx Popular HTTP server

3 acronyms in this thread; the most compressed thread commented on today has 5 acronyms.

[Thread #91 for this sub, first seen 29th Aug 2023, 23:55] [FAQ] [Full list] [Contact] [Source code]

[–] can@sh.itjust.works 2 points 1 year ago
[–] meldrik@lemmy.wtf 2 points 1 year ago (1 children)

You could just set the upload limit to 1kb?

[–] Dave@lemmy.nz 8 points 1 year ago (1 children)

The caching is probably the problem, not the uploads on a personal lemmy instance.

[–] nick@campfyre.nickwebster.dev 6 points 1 year ago (1 children)

I wrote a patch for Lemmy a week or so ago if you want to skip the caching: https://github.com/LemmyNet/lemmy/pull/3897

[–] hitagi@ani.social 4 points 1 year ago

I hope this gets merged soon. Saves us on storage space and makes monitoring media uploads easier.

[–] CrimeDad@lemmy.crimedad.work 2 points 1 year ago (1 children)

I wonder if you instead of disabling Pictrs you could just block image uploads to your Lemmy site, or maybe use a PiHole or Adguard on your network to block them.

[–] dandroid@sh.itjust.works 1 points 1 year ago (1 children)

But then I wouldn't be able to see photos on my instance. I want to see them, I just don't want the federated cache being saved on my SSD.

[–] CrimeDad@lemmy.crimedad.work 4 points 1 year ago

Hmmm... I do not have Pictrs because I am using the Yunohost Lemmy package, so there are no images on my instance, but I can still see images while logged into my instance.

[–] ksynwa@lemmygrad.ml 0 points 1 year ago* (last edited 1 year ago)

Have you tried checking the logs of the lemmy container?