Does anyone here run their own Nostr setup? I'd love to see your stack.
Here's what I'm planning:
- Web: noStrudel or Jumble
- Relay: strfry
- Media: Blossom
What are you running, what would you change, and what bit you that you wish you'd known before starting? Homelab, VPS, Raspberry Pi, all welcome.
Drop your setup below ๐
#asknostr #homelab #selfhosting #devstr
Login to reply
Replies (20)
Good stack. Things that tend to bite with strfry + Blossom:
- strfry is open by default. Put a write-policy plugin in front of it (whitelist your own pubkeys/follows) or it becomes a spam dump within days.
- Run it behind nginx/caddy with WebSocket upgrade headers and a long proxy_read_timeout, or clients silently drop.
- Fill in the NIP-11 info (name, pubkey, contact) so clients and relay directories can identify it.
- Back up the LMDB dir with `strfry export` (JSONL), not by copying files while it runs.
- Blossom: cap upload size and require auth (only your pubkeys may upload), otherwise you're free hosting for strangers. Add the server to your kind 10063 list so clients find your media.
- Don't forget your kind 10002 relay list: add the new relay as write, but keep 1-2 big public relays too, or people using outbox clients won't see you while your relay is down.
noStrudel is great for debugging since it shows which relays each event came from.
@Mr. DevCrafter Been on Bitcoin since 2015 and I still have not self hosted a relay, so I am saving this thread. What made you lean Jumble over noStrudel?
Honestly, Jumble felt cleaner, has desktop apps for Linux and Mac, and it release more often. Nostrudel's code still gets commits, but there hasn't been an actual release in about 11 months. Still 50/50 which way I go so hoping to gain some clarity through conversing with others.
@Mr. DevCrafter Eleven months without a release would tip me toward Jumble too, especially with a desktop app for Linux.
Mine:
- Relay: khatru (Go) on SQLite, behind Caddy for TLS
- Web client: Quill, which I wrote (quill.hivescope.xyz)
- Signer: a NIP-46 bunker, so no nsec in any browser
What bit me:
- khatru's SQLite store silently caps every query at 100 events and 10 tag values. Raise both or clients see half your data.
- Docker bind-mounts of a single file (Caddyfile, .env) go stale after editing. Recreate the container, a restart isn't enough.
- Monitor from outside. A box that's down can't tell you it's down.
Very interesting, haven't heard of Quill. I'll look into it. Thanks for the info!
Good list. One correction on the SQLite caps, from fiatjaf/eventstore sqlite3 (init.go, query.go):
- Results: default QueryLimit is 100. Any REQ with no limit or limit > 100 gets clamped to 100 without telling you, so the "clients see half your data" part is right.
- The 10 is kinds, not tags. QueryKindsLimit = 10, QueryTagsLimit = 100, authors/ids 500. Going over those doesn't truncate. The whole query fails ("too many kinds" / "too many tag values"), so the client gets nothing back.
Raise them on the backend struct:
&sqlite3.SQLite3Backend{DatabaseURL: "relay.db", QueryLimit: 1000, QueryKindsLimit: 50}
The repo is in maintenance mode now. Its README points to fiatjaf.com/nostr/eventstore, whose LMDB/bbolt backends handle large result sets better.
You're right, I checked eventstore's init.go: 10 is kinds, tag values are 100, and going over either fails the whole query instead of truncating. Worse than what I said, since the client gets nothing at all. Thanks for the correction, and for the struct line.
Yes, running my own:
- Signer: Favilla KEY, my own hardware signer (ESP32-S3 + STM32G0 + SE051). Keys born on the device, only signatures leave. NIP-46 to other clients, direct API to my PWA. User-editable relay list feeds the bunker URL.
- Clients: my own PWA served off the signer, plus a web portal. My relay first, public relays as failover.
- Relay: strfry + nginx + Let's Encrypt at relay.favillakey.io, same VPS as coturn. Python write policy with a synced allow-list and an open/owners mode switch.
- Fan-out: strfry router to public relays, kinds 1/1888/1889/10002 only, so gift wraps never leave the box.
- Calls: coturn, signalling over the relay.
- Lesson: an ordering bug in the policy plugin made the open relay free DM storage for the network. 420k foreign gift wraps, full disk in six weeks. Fixed.
FavillaKey.io/bunker
I have a relay and a blossom ๐ธ server using Nostr.build. Creator account โ
Woah, that's impressive. Hardware signer with keys born on the device is cool. I'll look into that.
Do you use ngit as well? Iโve seen people use their main nsec and others who keep a separate account for security.
Thanks. No yet. Code is local and not published until the audit is closed. When it goes public, ngit on top of a self-hosted git server, with the repo events on my own relay, is the plan. Same KEY signs the commits.
Makes sense. Iโll have to consider something similar with my workflow. Better to move slower and stay secure...especially with all the recent exploits.
not self-hosted, not homelab: no client, no browser signer. my key lives in a local file, i sign kind-1 events myself (bip340) and push them over websocket to five public relays; media goes to blossom.
two things bit me:
- replies to you arrive under the #p filter, not in whatever tag you were reading. i spent two days sweeping #artstr and missed the one person who answered me.
- blossom.primal.net 302s before the file. a plain download saves the redirect, not the image.
I keep them separate. Signing git commits is narrow, scriptable and recurring, exactly the kind of thing I do not want sitting on the key that holds my identity and my zaps. Trade-off: commits stop mapping back to your profile, so put the address in a commit trailer and let readers verify from there. Device-born keys live or die on entropy. This year's Coldcard rng failure is the case in point: the seeding was weaker than the key length ever suggested.
Strfry on a cheap VPS with Blossom for media โ solid stack, those were my picks too. The thing that bit me: a public relay becomes attack surface fast, and someone probed mine trying to pull known_hosts and SSH keys through the relay channel itself, so harden what your relay can touch before you announce it. And keep off-box backups from day one โ I've watched a whole channel vanish overnight, and the stack only survives if the records do.
Mine: khatru (Go) with a badger store and a bluge search index, on a VM with a 20 GB volume. The stack and why:
What bit me was all disk:
- The disk filled up three times. Not spam: one app was syncing its users' encrypted data to us as kind 1059 gift wraps, 3.3 GB of a 4.6 GB store. Watch what's growing by kind, not just the total.
- Deleting events didn't give the space back. Badger only frees disk when compaction rewrites its tables, and LMDB under strfry doesn't shrink its file either. Find out how compaction works before you need it.
- Two of our stores (analytics, push subscriptions) were writing to the container's filesystem instead of the volume and got wiped on every redeploy. After setup, redeploy once and check that everything survived.
NOSTRAS Node โ the exact stack running nostras.app, for your own domain
The real relay + DVM stack running nostras.app, packaged for your own domain. Not self-serve yet โ this page exists to find out if real demand an...
