Live data from Hacker News

Show HN: Pbnj – A minimal, self-hosted pastebin you can deploy in 60 seconds

pbnj.sh

1–10 of 21 posts

Show HN: Pbnj – A minimal, self-hosted pastebin you can deploy in 60 seconds

#1
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!

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

Re: Show HN: Pbnj – A minimal, self-hosted pastebin you can deploy in 60 seconds

#2
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 :) )

Re: Show HN: Pbnj – A minimal, self-hosted pastebin you can deploy in 60 seconds

#3

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 :) )

[dead]

Re: Show HN: Pbnj – A minimal, self-hosted pastebin you can deploy in 60 seconds

#4

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 :) )

I'm planning to set up a VPN into my home network for stuff like this. Services, NAS, etc. that I want remote access to but don't want exposed to the deep dark ocean of the internet.

Re: Show HN: Pbnj – A minimal, self-hosted pastebin you can deploy in 60 seconds

#5

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 :) )

Usually, for these kind of programs, I put them behind a proxy with basic auth.

Also, when I tried to add something on the demo site, it asked me for an auth key.

Looking at the code, the package.json file has an entry for AUTH_KEY (in the Cloudflare config) to prevent random people from pasting stuff.

Re: Show HN: Pbnj – A minimal, self-hosted pastebin you can deploy in 60 seconds

#9

HOWTO without CloudFlare, is it possible?

pnpm run build should do it

That creates `dist` with:

404.png .assetsignore _astro/ bread.png favicon.png favicon.svg jelly.png lock.png logo.png og-image.png pbnj.png peanut.png _routes.json styles/ _worker.js/

In it. What comes next?

Re: Show HN: Pbnj – A minimal, self-hosted pastebin you can deploy in 60 seconds

#10

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 :) )

Usually, for these kind of programs, I put them behind a proxy with basic auth. Also, when I tried to add something on the demo site, it asked me for an auth key. Looking at the code, the package.json file has an entry for AUTH_KEY (in the Cloudflare config) to prevent random people from pasting stuff.

Ah, well that's kinda perfect actually
Post reply on HN