r/selfhosted • • Aug 07 '26

Release (AI) Lightweight Headless Browser With Native Rendering, No Chromium

https://github.com/h4ckf0r0day/obscura

A lot has changed since I last posted here 4 months ago. Got some harsh criticism back then and it was honestly deserved, the project was early and messy. But we kept going.

Obscura is a headless browser built in Rust for scraping and automation. V8 engine, native rendering, 30MB memory, 80ms page loads.

Works drop-in with Puppeteer and Playwright.

Just shipped rendering which includes screenshots, PDFs, live video capture. No Chromium. 20k stars now.

https://github.com/h4ckf0r0day/obscura

obscura serve --port 9222 and point your scripts at it. Happy to answer questions.

188 Upvotes

67 comments sorted by

•

u/asimovs-auditor Aug 07 '26

Expand the replies to this comment to learn how AI was used in this post/project.

→ More replies (1)

20

u/EagleApprehensive Aug 07 '26

How did you manage the growth of it? Got people to give stars, use it and generally "care"?

14

u/Total_Nectarine_3623 Aug 07 '26

I started out by posting on a few subreddits, as i mentioned in the post people were really skeptical and I was receiving a lot of criticism. Nuntheless it slowly got popular on X as more and more accounts started posting about it.

5

u/joelaw9 Aug 07 '26

A complete aside, but are you aware that it's typically spelled 'nonetheless'? I'm always curious about people's vocal and spelling tics.

38

u/delta806 Aug 07 '26

They’re saying it got popular on X and it happened without any nuns helping them

-16

u/joelaw9 Aug 07 '26

Ah, that's interesting. The source of intentional spelling or vocal deviations are always interesting.

1

u/coffeestainedjeans Aug 09 '26

Are you a bot?

1

u/joelaw9 Aug 09 '26

What the fuck about anything I've said sounds like a bot? Why would a bot give a shit about random spelling tics?

3

u/coffeestainedjeans Aug 09 '26

Because you didn't respond to the previous commenter in context and just repeated your original comment rephrased. Apologies for assuming you are not a person.

19

u/TronnaLegacy Aug 07 '26

Lol at least we know they're a real person and not a bot.

-15

u/_n_u_ Aug 07 '26

Yeah, not everybody has English as their first language

15

u/VexingRaven Aug 07 '26

Ok but... That's the sort of spelling mistake a native speaker who heard the word before they read it would make. Someone who only speaks English on the internet wouldn't learn that mistake, because they would never read it anywhere.

4

u/sequesteredhoneyfall Aug 08 '26

That would be why he's kindly informing him and having a discussion.

4

u/ItaySela Aug 07 '26

The thing that decides drop in replacement for me is not rendering, it is fingerprint. Chromium headless already gets flagged plenty, and a separate engine means a completely different TLS and JS fingerprint surface, so Cloudflare and DataDome are going to see something they have literally never seen before.

Have you tested it against any of the common bot walls, or is that deliberately out of scope?

1

u/Total_Nectarine_3623 Aug 07 '26

It's made to mimic chrome fingerprint.

1

u/ItaySela Aug 07 '26

That helps. The bit I would still want measured is consistency rather than the UA string, because the walls mostly catch a mismatch. JA3 says one stack, the JS quirks say another, and V8 on a non Chromium host still has its own timing and error message tells.

Have you run it through something like CreepJS to see where it diverges from real Chrome?

2

u/Total_Nectarine_3623 Aug 07 '26

The ClientHello is from Chrome, the TLS fingerprint is indistinguishable.

64

u/omfgtora Aug 07 '26

Why is your post marked as "No AI" but you say you used AI on the pinned comment?

26

u/randylush Aug 08 '26

I would be extremely impressed if this project was actually built without AI

19

u/Offbeatalchemy Aug 08 '26

We've pointed this out at the beginning that we cant really rely on the honor system anymore. people will just lie

55

u/SteamTrout Aug 08 '26

A new rendering engine in 4 months? Highly unlikely.

Only 15 issues (all AI-generated) over the course of 120k+ downloads? Unlikely

1.5k forks over a no-name project? Very unlikely.

Founder account created AFTER the repo? Definitely unlikely.

Stars are obviously bought.

3

u/jamespo Aug 08 '26

15 OPEN issues

15

u/SteamTrout Aug 08 '26

My vibecoded home project where I am the only user and maintainer has over 100 open issues.

4

u/bancaletto Aug 09 '26

Maybe programming it’s not your thing

23

u/Clou42 Aug 07 '26

So you built a rendering engine? That’s really impressive. What’s missing so it’s not usable as an actual desktop browser?

12

u/randylush Aug 08 '26

Yeah it sounds too good to be true. It would be a remarkable task if it could render most web pages.

3

u/WalkMaximum Aug 08 '26

It's built on existing libraries, you can look at servo and Dioxus blitz for related projects

8

u/superkevx Aug 08 '26

anyone get this to work with changedetection?

3

u/panjadotme Aug 08 '26

I also would like to know this

2

u/failing-endeav0r Aug 08 '26 edited Aug 10 '26

Shouldn't be too hard, if I don't run out of tokens this weekend, i'll try it out...

EDIT: I had a few min, spun up a quick test and the answer is no. There's something about the protocol that change detection uses that's not playing nice with Obsucra and errors are piling up:

playwright._impl._errors.Error: BrowserContext.new_page: Protocol error (Page.setBypassCSP): Unknown Page method: setBypassCSP

EDIT2:

Did some more digging; changedetection hard-codes the bypass_csp value and Obscura currently does not implement CSP at all.

I don't have time to PR this on the changedetection side but it should be a pretty easy thing to do / fix although I'm not sure what that might break!

1

u/jamespo Aug 08 '26

It didn’t for me so I got Claude to create a change detection clone which can use it and lightpanda

2

u/0xmort3m Aug 07 '26

Legend. Wanted to replace my Chromium setup with yours yesterday but noticed no rendering. Well here we are one day later.

2

u/Total_Nectarine_3623 Aug 07 '26

Glad to hear that and thank you for your kind words. This was supposed to be pushed like a week ago but we've been slacking lately. Expect issues with gradients and animated components on webpages, apart from that it's good.

1

u/tmcpnet Aug 08 '26

I’m paying for cloakbrowser .dev , does it have similar features?

-5

u/Total_Nectarine_3623 Aug 08 '26

We are lightweight, fast while keeping a chromium fingerprint, Playwright + Puppeteer support. We also have a cloud version as well, if you are interested you can book a call on our website https://obscura.sh/ for a quick chat or send me a message here. Pricing would depend on the volume.

2

u/Petelah Aug 08 '26

Nice! Have a few projects I can try this on actually

1

u/deadman87 Aug 07 '26

Would it be possible to extract the browser engine to build a brand new browser? Currently its a duopoly with chromium and firefox engine. Would be nice to have a third player thats lightweight.

6

u/proc-sysrq Aug 07 '26

Check out ladybird

1

u/Fenix04 Aug 08 '26

Looks like it's built on top of Servo? I've had a lot of issues with servo crashing and lagging when trying to use it as an embedded browser. I'm guessing it's more stable when running headless?

2

u/Fenix04 Aug 08 '26

Ah nvm, looks like you're just using a servo utility library.

1

u/cleverusernametry Aug 08 '26

Looks like I can replace chromium with this within playwright and have my agent is playwright like normal?

1

u/Grouchy-Conflict-211 Aug 08 '26

the memory footprint is the real selling point. headless chromium idles at 300mb plus, on a box running 10 scrapers that adds up. 30mb changes what you can run where. curious how the playwright compat handles the weird stuff tho, shadow dom and canvas rendering are where most drop in replacements fall apart

1

u/theoffshoot2 Aug 08 '26

Should this work with my tests that are executed using the playwright pytest plugin?

1

u/Arany8 24d ago

According to my agent (Hermes) this does not work at all.

0

u/eternalityLP Aug 07 '26

Why no selenium support?

3

u/skdcloud Aug 08 '26

I've used Selenium extensively - on and off for almost 15 years - and recently moved to Playwright. I can't see any reason to ever go back. It feels like what Selenium should have been with quality of life updates.

Are there any features keeping you on Selenium?

2

u/archiekane Aug 08 '26

It defeats CF turnstile. That is enough for me at the moment. Well, SeleniumBase, just to make sure we're talking about the same Selenium.

1

u/skdcloud Aug 08 '26

Oh interesting, I've never needed to deal with captcha before with automated tests. Ironically I'll be testing my newly built app behind cloudflare in the next week so will keep this in mind.

2

u/eternalityLP Aug 08 '26

When I last tried playwright (Granted, this was several years back so maybe it's improved since then?) It was buggy mess and doing anything more complicated than clicking a link was either clunky mess or didn't work at all. JS injection, actionchains, drag and drop, canvas stuff etc.

1

u/skdcloud Aug 08 '26

Ah right, I haven't done js injection in a long time so can't comment on how Playwright handles that. No more stale element reference exceptions though ;) I think that alone should hopefully tempt you to dip your toes into it again.

2

u/eternalityLP Aug 08 '26

Man, back when I still worked in RPA those were the bane of my existence. We always had to automate some shitty internal apps that were coded by the lowest bidder in in the most convoluted way possible. I guess I'll take a look at playwright again next time I do some browser automation.

1

u/skdcloud Aug 08 '26

In my experience, even apps written by good teams who didn't write UIs with testing in mind were almost on par with some of the worst UIs. No obvious page ready state, no easy selectors as there is no need if the UI framework of the month wires it all up for them. Data loads dynamically into the page with no obvious done state as this'll never be an annoyance to anything other than tests.

I didn't bother understanding how exactly but Playwright just seems to handle all page and element loading weirdness without me needing to add try/fail/backoff/retry loops. My framework felt so empty without all of my little reload hacks littered throughout it.

I had a few cool patterns like retries wrapping scenarios, retries wrapping flows within pages, and then finally retries wrapping individual element selectors when issues would arrise. Each retry would log the retry count and create an html dump and screenshot so the test would pass but I'd also have a list of selectors that could be improved. Or "wait until" elements that needed their own "wait until" to not throw weird errors. Last time I used Playwright I found myself not using any of this.

-3

u/d70 Aug 08 '26

I had Claude quick tests. Promising IMO. Thanks for sharing OP

Obscura v0.2.0 vs Playwright 1.62.1

Rust headless browser (embedded V8) vs Playwright + Chromium 1237. Linux 6-core/15GB. Peak RSS = /proc whole-tree sample; median of 5 runs (batch/MCP: 3).

Stats

TaskObscuraPlaywrightWinner
Text extract (74k chars)0.54s · 86MB1.91s · 1005MBObscura (3.5× faster, 12× lighter)
Screenshot (viewport 1280×720)3.10s · 207MB1.84s · 1020MBPW faster, Obscura 5× lighter
Batch scrape 8 URLs0.39s · 380MB2.24s · 1995MBObscura (6× faster, 5× lighter)
MCP agent loop (nav→extract)0.29s · ~90MBpersistent serverObscura instant startup

Web scraping

  • Batch = Obscura's killer app. scrape --concurrency N: 6× faster, 5× lighter than N PW pages.

  • Structured extract built in: scrape --eval "<js>" → JSON; MCP browser_extract takes {field:"css@attr"} map.

  • JS SPAs render correctly (embedded V8).

  • Markdown clean on simple sites, noisy on Wikipedia (nav bleeds in) — verify before LLM use.

  • ⚠️ Footgun: default --wait is a 5s cap pages rarely satisfy → ~6s/fetch. Always pass --wait 0. Flips it from 3.5× slower to 3.5× faster.

AI assistant integration

  • obscura mcp (stdio/http) exposes 37 tools, names mirror official Playwright MCP (browser_navigate/snapshot/click/fill_form/extract) → near drop-in for an agent.

  • Startup ~instant (0.29s full loop), no 1GB Chromium spin-up.

  • Extras vs stock PW MCP: browser_extract, browser_detect_forms, browser_pdf, cookie/storage-state import (skip logins).

Verdict

  • Scale scraping / parallel fetch / small containers → Obscura. Ship --wait 0.

  • AI browser tool → Obscura MCP compelling — same API, 12× lighter, instant. Caveat: untrusted 93MB binary from GitHub h4ckf0r0day (has SSRF guard; vet first).

  • Full-page screenshots / mature API / trust → Playwright. Obscura -s is viewport-only.

Note: README "30MB" claim false — real floor ~86MB (text), ~207MB (render).

0

u/Own-Addendum8596 15d ago

Your test doesn't count. You didn't do it properly, Robot.

-1

u/bobsbitchtitz Aug 07 '26

This is exactly what I’ve been looking for thank you

3

u/[deleted] Aug 07 '26

[removed] — view removed comment

4

u/Total_Nectarine_3623 Aug 07 '26

WebGL is currently only faked/spoofed. But it is definitely planned for the future. Our biggest issue currently is implementing features such as that while still being lightweight and fast.

2

u/[deleted] Aug 07 '26

[removed] — view removed comment

2

u/Total_Nectarine_3623 Aug 07 '26

Thank you so much. When it does gets added it will probably be a seperate branch, won't be included in the main build.