Built a simple tray app that effortlessly runs a Nostr Relay on your computer. 🚀 #nostr #relay #devstr
Discussion
Is this private for personal backup or just for anyone to access?
It depends on the network environment. It can operate as a private relay within a local network or be exposed to the internet for anyone to access.
An interesting scenario comes to mind: a cafe runs a relay on its LAN. I can read messages left by others on the cafe's relay while enjoying my coffee.
Nice!
Do you use a well know relay implementation?
It uses nostr-relay(https://github.com/CodyTseng/nostr-relay) underneath, which is the same implementation I use for my relay wss://nostr-relay.app
I'm sorry. It's not a well-known implementation 🤣
where dose it store the events? in the home directory?
Got this error when I tried to run it on Ubuntu 
Thank you for your feedback. I have fixed this bug and uploaded it to GitHub. It was caused by the absence of the dock on non-macOS systems. Since I am using macOS, I didn't notice this issue. If there are any other issues, I would appreciate your feedback. 💜
รีเลย์นี้น่าสนใจติดตั้งง่ายใครอยากรันใช้เองแจ๋วเลย
ไปลองกันได้ 🤩🤩
#Siamstr
วิธี run relay ตัวนี้ง่ายมากๆ (window Linux Mac)
ขั้นตอนแรกเปิด Command line ขึ้นมา
ขั้นตอนที่สองให้ใช้คำสั่ง git clone
git clone https://github.com/CodyTseng/nostr-relay-tray.git
ขั้นตอนที่สามเข้าไปในโฟลเดอร์ nostr-relay-tray
cd nostr-relay-tray
ขั้นตอนที่สี่ติดตั้ง package โดยใช้คำสั่ง
npm install
ขั้นตอนที่ห้าสั่งให้ relay ทำงาน
npm run make
ถ้าไม่มี Error อะไรก็ใช้งานได้ปกติใช้เป็น Private relay เอาไว้แบล็คอัพข้อมูลโดยเชื่อม localhost:4869 หรือจะใช้เลข IP ก็ได้ต่อในวงเลนด์เดียวกัน
ใครลองแล้วเจอปัญหาอะแจ้ง Dev ได้ จะได้มีการพัฒนาต่อไป
ชอบคำนี้มาก
double-click to run.
ไว้ผมมาเดโมให้ดูสดๆ ฝากไว้แค่นี้ถ้าหากมีอะไรน่าสนใจใหม่ๆจะเอามาบอก บ๊ะบาย
#Siamstr #Nostr #Relay #notoshi
You can also directly download and use it from https://github.com/CodyTseng/nostr-relay-tray/releases
Because the app is not signed, you may need to allow it to run in the system settings.
Thanks 🫂
Hey nostr:npub1syjmjy0dp62dhccq3g97fr87tngvpvzey08llyt6ul58m2zqpzps9wf6wl can you add the https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Origin header to the relay?
Id like to try and integrate this into noStrudel but I cant talk to the relay due to CORS errors in the browser
What I'm working on 😁

Of course, I will fix it!
I made some attempts, but couldn't solve the problem. I also found that the same project works fine when using a public IP, but encounters CORS errors when using an internal IP. I'll take another look tomorrow and do some more research. 😂
it "should" be enough to add the "Access-Control-Allow-Origin: *" to the response or server but I don't know what your using under the hood.
either way though I managed to make it works. turns out it was only throwing the CORS errors for http requests and it could connect over websockets fine.
Its here https://next.nostrudel.ninja/#/relays/cache if you want to test it. should be able to enable it then the app will start using ti to cache everything
Yes, when I tested last night, only the HTTP requests encountered CORS errors, and the WebSocket connection had no issues. I'll add "Access-Control-Allow-Origin: *" when I support NIP-11. I just tried the new noStrudel and it feels fantastic, the loading speed is incredibly fast! 🚀🚀🚀🚀🚀🚀 I need to change my web client.
would this only be a local,network relay or could i have other people use the relay too?
If you expose port 4869 of your device to the public network, it can be accessed and used by others as well.
cool, and is there functionality to only whitelist specific npubs for the relay?
This is an important feature, and I will add it as soon as possible.
My other relay implementation supports setting whitelist. https://github.com/CodyTseng/nostr-relay-nestjs
like a friends / family...or community / church relay . . kinda like an invite only relay
Sound great! Initially, this project was just intended to show how to use https://github.com/CodyTseng/nostr-relay to develop your own relay with just a few lines of code, so it was quite simple, lol. But now I feel like many people would need a relay that they can simply double-click to run on their computers, so I'll continue to develop more features for it.
which clients let you have a port in the relay address? i am not aware of any standard web or mobile clients that do
Most clients support it, you just need to add the port at the end of the address. Like this: ws://your-ip-address:4869
which, do you actually know? because i tried, i'm developing one and my only solution ended up being a VPS with wireguard and a reverse proxy and domain name... if you only run the relay on 443/80 and nothing else then you can skip the domain name and TLS, since after all it's going through a tunnel after that, and just use a firewall port forward on the VPS
Sorry, I don't really understand your question. Are you unable to connect to nostr-relay-tray over the public network? If you want to expose your service to the public network, you need to modify your firewall rules to expose port 4869, or forward the request to port 4869 through a proxy (nginx, etc). And it is advisable to use it only on the local network.
i don't have a firewall because i'm behind two layers of NAT router
i've seen that tray thing and for sure it doesn't work with coracle and i forget if i tried nostrudel, being that those are mandatory for me to use for my work it's not usable for me
Due to browser limitations, wss must be used, so web clients won't work properly. But nostrudel has a special treatment that allows it to be used as a cache relay.
yeah i have been facing this irritating "TLS only" hooey since i started working with gRPC... it basically coerces you to use a domain name and a reverse proxy, and the endless doom of running out of IPv4 addresses and the endless non-implementation of IPv6 on ISPs means that we can't host our own stuff without using the services of someone who is renting an IP address
and yeah, not surprised that nostrudel handles this but none other do
we are being held hostage to the IANA and IETF and all the rest of them for the pricks who use tax blood money to maintain their control over this network, so every bit of effort that goes towards blunting their attack is a great thing
things like letsencrypt and the endless expansion of the TLD namespace are olive leaves intended to keep us from going totally black pill on them so we keep thinking we have a way out of this
we do, but we are up against very very nasty enemies
just felt like i needed to point that out so that people realise this is the real front line of WW3 and all the stuff in the media is just buying submission from a population that is wildly enraged but has been confused about who is doing it to them
also just to point this out, this is why i absolutely HATE the web browser application environment
it's so coercive it feels like a straight jacket to me
if you had a wireguard VPN with a reverse proxy it could be reachable from the outside, i run mine like that most of the time while testing it, simplifies the use of clients because most of them don't comprehend port numbers
