Show HN: Pbnj – A minimal, self-hosted pastebin you can deploy in 60 seconds (pbnj.sh)

69 points by bhavnicksm ↗ HN
I'm sure folks here have seen pastebins a thousand times. There's no innovation left in this space – and that's kind of the point.

When I wanted to self-host a pastebin, every option I found was too much. Git-based version control, OAuth, elaborate admin panels. I just wanted something I could deploy in under a minute with a CLI that actually works.

So I built pbnj (yes, like the sandwich).

What it is:

- A minimal, beautiful pastebin with syntax highlighting for 100+ languages

- One-click deploy to Cloudflare (free tier gives you ~100,000 pastes)

- CLI-first: pbnj file.py → get a URL, copied to clipboard

- Memorable URLs: crunchy-peanut-butter-sandwich instead of x7f9a2

- Private pastes with optional secret keys

- Web UI for when you're not in a terminal

What it isn't:

- No accounts, no OAuth, no git integration

- No multi-user support (fork it and run your own)

- No expiring pastes, no folders, no comments

- Not trying to replace Gist or be a "platform"

Why not just use Gist? Maybe you want to own your data. Maybe you enjoy self-hosting things. Or maybe you're a little autistic like me and just like having your own stuff.

Live demo: https://pbnj.sh GitHub: https://github.com/bhavnicksm/pbnj CLI: npm install -g @pbnjs/cli

If this scratches an itch for you, I'd appreciate a star on GitHub. Happy to answer any questions!

6 comments

[ 3.1 ms ] story [ 20.6 ms ] thread
This is really well done, but the problem I have with (most) selfhosted bins is that anyone can use it, and I don’t want to be responsible for the content that might show up.

This is super neat though, and could almost be used as a blog replacement (if of course I could prevent others from using it/posting to it :) )

People don't usually expose self-hosted services directly to the internet, even if they have a login page. You use a reverse proxy, that way they can be HTTPS, share port 443, and use subdomains (Caddy makes this really easy). And then adding auth becomes trivial, and you can even put your services behind some SSO sign-in if you want to.

If possible though it's best to use a VPN so that nothing needs to be accessible from the internet at all (not to mention then you can access your NAS shares w/o needing a web UI). That's why I actually prefer when self-hosted apps don't have their own auth system, or at least let me disable it. If everything's internal only, I don't need it anyway.

Hey there, first of all congratulations, it's really nice and minimal and Illove it!

But Cloudflare is not self hosting!

This is cool. I'm actually working on a trivial web-app that will be similar. I'm just doing it as an exercise before I undertake something a bit more ambitious, but I'll be drawing inspiration from yours.
Each note could have a configuration to display the text as typed (Markdown) or as formatted Markdown.