this post was submitted on 04 Jul 2025
104 points (96.4% liked)

Selfhosted

46671 readers
704 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
 

everytime i check nginx logs its more scrapers then i can count and i could not find any good open source solutions

top 46 comments
sorted by: hot top controversial new old
[–] savvywolf@pawb.social 64 points 2 days ago (6 children)

I've seen people suggesting and using Anubis, haven't used it myself though.

[–] Mordikan@kbin.earth 11 points 2 days ago

I especially love the irony of Anubis using yesterday's hype thing to combat today's.

[–] DrunkAnRoot@sh.itjust.works 8 points 2 days ago

i tried Anubis and it works great the only issue is it wont support multiple subdomains

[–] RedBauble@sh.itjust.works 4 points 2 days ago* (last edited 2 days ago) (1 children)

Second Anubis, just finished by setup yesterday i have it of a oracle cloud frre tier vps, which depending on the domain routes the traffic to services hosted on the vps itself or to my server ar home. Relatively easy to setup, blocks most requests with very few false positives (one of which for example it would aggressively challenge by thunderbird trying to reach my baikal instance). I set a bit more aggresive rules than default (i also block googlebot and bingbot, since i received a bit more requests than I'd like). In like 10 hours it straight up denied about 5000 requests from the ai-catchall ruleset (mostly amazonbot) and challenged about 10000, mostly from a block of IPs in singapore, some of the hosts having the user agent of a Macintosh with PowerPC. They all sure love to explore the public repos on my git server.

I'm in the process of changing servers for an upgrade, the old one still hosting more services while I setup the new one. The old one now does run audibly quiter. I don't even want to think how much electricity went wasted because of those bots

[–] VeganCheesecake@lemmy.blahaj.zone 5 points 1 day ago (2 children)

You probably don't need me to tell you, but keep good backups. Friend of mine recently had his account nuked without any reason given, and without the possibility of recourse.

collapsed inline mediaa mail from Oracle, informing about the immediate termination of service, and deletion of all data

[–] WhyJiffie@sh.itjust.works 2 points 1 day ago

as I heard that's pretty common at oracle, but it's good to spread the word

[–] RedBauble@sh.itjust.works 1 points 1 day ago* (last edited 1 day ago)

That's too bad. Luckily i keep just a couple of docker compose stacks there. But I should start backing them up, that vps is the only thing I don't backup

I’ve had trouble with it using a vpn and privacy browsers. It often blocks me until I use a default browser.

[–] Typewar@infosec.pub 2 points 10 hours ago* (last edited 10 hours ago) (1 children)

I have a dumb question.. what is preventing the crawlers from just eating the shit and just burn though the energy to get through the computational task?

[–] savvywolf@pawb.social 1 points 2 hours ago

It'll still slow them down and reduce load on your server. I also think many of these crawlers focus on volume; time spent computing the hash is time not spent crawling someone else's site.

[–] Courantdair@jlai.lu 1 points 2 days ago

I was going to recommend that, very easy to setup

[–] db0@lemmy.dbzer0.com 18 points 2 days ago

You need yo block the alibaba subnets primarily. In my experience this is where most of them originate

[–] Fedditor385@lemmy.world 14 points 2 days ago (1 children)

Anubis is the name of the tool. Also, Cloudflare just announced they have something against AI scrapers.

[–] DrunkAnRoot@sh.itjust.works 2 points 1 day ago

ive been using Anubis my only issue is i would have to run more then one instance and i dont like cloudflare personaly

[–] Bahnd@lemmy.world 13 points 2 days ago (1 children)

Wern't there a few AI maze projects in the works? I wonder if running one of those for a bit will cause you to be added to an ignore list, clearly they dont respect your robots file.

[–] slazer2au@lemmy.world 16 points 2 days ago

Tar pits I think is the term they use to pollute AI data.

[–] kcweller@feddit.nl 11 points 1 day ago (1 children)

Nephentes that shit. Poison every scraper until they start respecting robot.txt. Purposefully use llm.txt to trap the fuckers.

[–] DrunkAnRoot@sh.itjust.works 3 points 1 day ago (1 children)

this is really awesome but i use a vps so i dont know how they would feel about this being deployed

[–] groet@feddit.org 2 points 18 hours ago

You most likely pay for a maximum CPU capacity and your Server cant go above that no matter what you run. Your vps provider doesn't care what that CPU power is used for.

However with limited resources, the tarpit might use up all CPU power and the rest of the webserver will crawl to a halt.

[–] fubarx@lemmy.world 11 points 1 day ago (2 children)

If nginx, here's an open-source blocker/honeypot: https://github.com/raminf/RoboNope-nginx

If you have it set up to be proxied or hosted by Cloudflare, they have their own solution: https://blog.cloudflare.com/declaring-your-aindependence-block-ai-bots-scrapers-and-crawlers-with-a-single-click/

[–] ikidd@lemmy.world 3 points 1 day ago* (last edited 1 day ago)

I wonder why that RoboNope doesn't just make a fail2ban entry for anything that accesses a disallowed url and drop them entirely.

Actually this look like it would do something similiar, then dumps them to fail2ban after the re-access the honeypot page too many times: https://petermolnar.net/article/anti-ai-nepenthes-fail2ban/

[–] DrunkAnRoot@sh.itjust.works 2 points 1 day ago

ill check robonope out seems promising

[–] pewgar_seemsimandroid@lemmy.blahaj.zone 9 points 1 day ago (1 children)
[–] DrunkAnRoot@sh.itjust.works 3 points 1 day ago

i can only get it to protect one container. i have 3 that i need protected and i cant figure out how to run more then one instance of it.

[–] madiator2011@px.madiator.com 6 points 1 day ago (1 children)

In my case I use https://www.bunkerweb.io/ as my proxy for that, but there are other tools like for example https://github.com/TecharoHQ/anubis

[–] DrunkAnRoot@sh.itjust.works 2 points 1 day ago

bunkerweb looks intresting

[–] Cyber@feddit.uk 5 points 2 days ago

If you're able to, use GeoIP ranges to only allow access from the countries you want.

That immediately limits a lot of everything

Then - again if you're able to - use a block list that covers known scrapers in case they're in your country.

I use pfBlockerNG on my pfSense firewall for exactly this.

[–] Fedditor385@lemmy.world 5 points 1 day ago (3 children)

I just realized an interesting thing - if I use Gemini, and tell it to do deep research, it actually goes to the websites it knows/finds, and looks up the content to provide up-to-date answers. So, some of those AI crawlers are actually not crawlers, but actual users who just use AI instead of coming directly to the site.

Soo... blocking AI completely could also potentially reduce exposure, especially as more and more people use AI to basically do searches instead of browsing themselves. That would also explain the amount of requests daily - could be simply different users using AI to research for some topic.

Point is, you should evaluate if the AI requests are just proxies of real users, and blocking AI blocks real users from knowing your site exists.

[–] daddycool@lemmy.world 10 points 1 day ago (2 children)

some of those AI crawlers are actually not crawlers, but actual users who just use AI instead of coming directly to the site. Soo.. blocking AI completely could also potentially reduce exposure.

Normally, websites want users to come to their site, instead of an AI search engine "stealing" the content and presenting it as it's own. Yes, AI search engines are more convenient for the user, but in the end it will discourage website creators and thereby cut of it's own "food supply".

[–] Zexks@lemmy.world 1 points 19 hours ago

We all understand that. But if those users keep insisting on giving everyone their life story and current option in world politics before giving us the bread recipe we came for, they can fade away.

[–] Fedditor385@lemmy.world 1 points 1 day ago (2 children)

I understand, but the shift in user behaviour is significant and I think websites are not taking it into account. If the users move more and more to AI, and since Google introduced AI mode it's only a question of time until it becomes the default, we will see more and more of what we thing are AI crawlers and less and less organic users.

AI seems to be the new middleman between you and the user, and if you block the middleman, you block the user. For people with hobby websites or established sites it may make sense because people either know of them, or getting more exposure is not a wish or requirement, but for everyone else, it will be painful.

[–] Noja@sopuli.xyz 2 points 1 day ago

I honestly don't think most people replace search with AI, it will also slowly solve itself when google injects ads into the output.

[–] lambalicious@lemmy.sdf.org 2 points 1 day ago

So, what I'm reading is, if your "users" are bad (or bots), just get better users.

Sounds like a net win.

[–] rumba@lemmy.zip 4 points 1 day ago

Porque no los dos?

There is no functional difference between them scraping you systematically and them coming to you on behalf of user. They're coming to scrape you either way, being asked by someone is just going to make them do it in a smarter fashion.

Also, if you're not using Gemini, damned if Google.com doesn't search you with it anyway. They want these AIs trained bad, sooner or later almost all searching will be done through AI. There will eventually be no option.

You are correct that blocking all AI calls well eventually make your search results not work.

So if you want organic traffic, you have to allow ai scraping eventually. You're just going to get diminishing returns until a point.

[–] DrunkAnRoot@sh.itjust.works 1 points 1 day ago

this does not really apply because i run some frontends so there is not really any information that ai needs

[–] daniskarma@lemmy.dbzer0.com 4 points 21 hours ago* (last edited 21 hours ago) (2 children)

How do you know it's "AI" scrappers?

I've have my server up before AI was a thing.

It's totally normal to get thousands of bot hits and to get scraped.

I use crowdsec to mitigate it. But you will always get bot hits.

[–] Sheldan@lemmy.world 2 points 20 hours ago (1 children)

Some of them are at least honest and have it as a user agent.

[–] krakenfury@lemmy.sdf.org 1 points 19 hours ago (1 children)

Is ignoring robots.txt considered "honest"?

[–] Sheldan@lemmy.world 1 points 16 hours ago

That's not what I was talking about

[–] DrunkAnRoot@sh.itjust.works 1 points 16 hours ago (1 children)

bot hits i dont care my issue is when i see the same ip querying every file on 3 resource intensive sites millions of times

[–] daniskarma@lemmy.dbzer0.com 2 points 14 hours ago* (last edited 14 hours ago) (1 children)

Do you have a proper robots.txt file?

Do they do weird things like invalid url, invalid post tries? Weird user agents?

Millions of times by the same ip sound much more like vulnerability proving than crawler.

If that's the case fail to ban or crowdsec. Should be easy to set up a rule to ban an inhumane number of hits per second on certain resources.

[–] DrunkAnRoot@sh.itjust.works 1 points 14 hours ago

since its the frontends i run getting scraped its the robots.txt included there

[–] HelloRoot@lemy.lol 4 points 2 days ago

crowdsec is arguably not completely open source, but I'm very satisfied with it.

[–] Igilq@szmer.info 3 points 1 day ago (1 children)

Well, someone had great idea to use zipbombs. I saw it somewhere but I don’t remember where.

[–] DrunkAnRoot@sh.itjust.works 2 points 1 day ago

Anubis has this built in if it detects bots it turns the diffuclty to impossible

[–] some_guy@lemmy.sdf.org 1 points 19 hours ago

I don't have opensource solutions, but CloudFlare had some news about a system that I didn't read about (saw two headlines) last week. Dunno if it works or not.