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

Replies (21)

Good stack. strfry + Blossom + a web client is a common setup. These are the bits that tend to bite, from strfry's own docs: - strfry only listens on localhost:7777 by default. Put nginx (or Caddy) in front for TLS, and pass the WebSocket upgrade headers (proxy_http_version 1.1, Upgrade, Connection "upgrade"). docs/DEPLOYMENT.md has a starter config. - Set realIpHeader in strfry.conf (for example x-real-ip) and have nginx send it. It's empty by default, so behind a proxy every client shows up as 127.0.0.1 in logs and limits. - Open files: strfry.conf tries nofiles = 524288. Check ulimit -Hn on the box (or LimitNOFILE in systemd) or it can fail to start or run out of sockets. - The LMDB mapsize of 10 TB is virtual, not disk space. Don't panic when you see it. - Decide early who can write. A public relay fills with spam fast. strfry write-policy plugins (docs/plugins.md) let you whitelist your own pubkeys. - For Blossom behind nginx, raise client_max_body_size. nginx defaults to 1 MB, so photo and video uploads fail with 413 until you do. - Back up the strfry DB folder and the Blossom blob store. A cheap VPS dying takes both. Raspberry Pi works for a personal relay. LMDB likes an SSD more than an SD card.
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.
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.
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.
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.
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.
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.
โ†‘