Oddbean new post about | logout
 I’m using Nostr as the communication mechanism for a special purpose site. Nostr is not the focus, just the user-generated-message sharing provider.

My app sends custom events (unclaimed kind number) with empty content. Tags contain all the relevant info.

Users’ nsecs are randomly generated. I may later allow profile features, but for now it’s irrelevant.

So I need a relay with the following features:

0. (Required) Installable on my lowish -powered Ubuntu VPS.

1. (Required) Allow public access over SSL.

2. (Required) Persist events.

3. (Nice to have) Basic throttling. E.g. limit to 1 published event per second per IP address.

4. (Nice to have) Event kind allow-list. Disallow events of all kinds other than a specific short list of kind numbers.

5. (Nice to have) NIP-13 Proof-of-Work enforcement. Alternative to basic throttling. 
 help a dev a day - work towards internet freedom
nostr:nevent1qvzqqqqqqypzqc2qg7xf4cf0r594grnu27qxvjfj02gmqs9s0aa68hkux472krd9qqsy363q8cw7axhnl6tq2lz72rwndqt4ag32jrvh8f966q3jupeelecmthjkd 
 docker pull scsibug/nostr-rs-relay
docker run -p 4445:8080 scsibug/nostr-rs-relay 
 yeah this is the rust relay 
 I think it is still the best, because it is simple.  Everything else is exploding in complexity. 
 Looks like this is going to have to be my next attempt. nostream’s dependency on Postgres failed to start. 
 Nostream is barely maintained.  I dont like postgres too much, but will use it when I have to. 
 OK, I am now running the podman command from the nostr-rs-relay README. Let’s see if my VPS can handle it. Compiling… https://image.nostr.build/de731a1305e90e1e44133daf297c1745ceed7ddb1c45641620ebef1725d270e2.jpg  
 OK, I seem to have it running.

How do I make it so it always runs at startup? Something about systemd? 
 it's gonna be a fun dumpster fire but ok... this is why i'm a nip-42 maxi... paid relays are the only way to protect DM privacy 
 interesting, and you've tried strfry and failed?  There was a rust relay that I saw a while back that seemed customizable, can't find it though.  

Not really sure what's entailed in building your own relay from scratch, but that might be a good place to start for custom use case? If the requirements are the same across relay functionality, then maybe you can build the foundation and then your "nice to haves" on to of that? Or maybe you've tried this already?

strfry was easy to use and install, but I never really tinkered with it more than was required. That rust one also looked good, but i don't know rust so I left it out.  The other relays were like personal relays and stuff. Someone who would know would be @verita84 but I think he's moved away from nostr to something else. 
 Sounds like he needs strfry or ditto.pub 
 Yeah, strfry was too beefy to compile on my VPS. Copying the laptop-compiled binaries failed (something about a missing lib*.so file).

Tried nostream, but its dependency on Postgres wouldn’t start. Probably to little memory in both cases.

I have gotten nostr-re-relay to work, so I’m going with that for now. 
 i'm not sure if you are even reading my notes but i literally just built and am running my realy relay on wss://nostr.realy.lol this evening and you already have access to read and write to it if your client auths to confirm you are one of my follows

it took a bit over a minute including download time to build it on a 1gb memory VPS

you should be able to get any Go based relay to build from source in even as small as 512Mb of memory 
 I am reading your notes, but they don’t apply to my use case I don’t think.

My users have randomly generated nsec that they don’t even see. No profile info. No standard event kinds (no 0, 1, 2, 7, etc., just custom events)

So there can be no “follows” or web of trust etc. For my use-case Nostr is just the messaging protocol between anonymous contributors who don’t interact directly and have no in-app means of doing so. 
 well, i'll leave off on commenting because i think you are doing something that will prove to be a waste of time 
 No problem, it might be! Here’s a brief description of what my site is about: nostr:note1wntnh2napy79s4yj7dc4uxh4hqxrzc0297yqcnqtnq3ry0rjjkpqn0ams3 
 I forgot my password  
 ditto uses your nsec 
 No I mean on pleroa 
 will dm you password reset link 
 Sent 
 thanks bro 
 
 they link may not work, if so, I will manually set a password 
 it said it changed it but when I put it in it said invalid password.

just reset it, give it to me and I'll reset it later 
 DM'd you new pass