#

relays

(50 articles)

Private Nostr Relay Suite

## **NostrGator v1.0.1 is here** - and we've just crossed into uncharted territory! This is the **FIRST complete Nostr infrastructure solution (That I know of) with built-in Lightning sovereignty**. No external wallet dependencies. No compromises. Just pure, unadulterated digital freedom. ## **⚡ What Makes This Historic?** **Lightning Wallet Integration**: We've integrated Alby Hub as our 20th service, giving you a self-hosted Lightning wallet with full Nostr Wallet Connect (NWC) support. Zap directly from your own infrastructure using your own relays for maximum privacy. **Complete Sovereignty Stack**:\ \ 🏗️ **11 Specialized Nostr Relays** (General, DM, Media, Social, Cache, Files, Long-form, Live Events, Marketplace, Games, Bridge)\ \ ⚡ **Lightning Wallet** with NWC (NEW!)\ \ 🔒 **NIP-05 Identity Verification**\ \ 📁 **Professional File Server** (NIP-96 + Blossom)\ \ 🌐 **Federation Engine** with Tor proxy\ \ 📊 **Enterprise Monitoring** with Prometheus\ \ 🛡️ **Security & Health Monitoring**\ \ 🔄 **Event Mirroring** for hybrid sovereignty ## **🎯 Why This Changes Everything** **Financial + Communication Sovereignty**: For the first time, you can run your entire Nostr AND Lightning infrastructure locally. Your zaps, your data, your relays, your rules. **Lightning Address Ready**: Configure your own Lightning address and receive payments directly to your self-hosted wallet. **Client Compatibility**: Works seamlessly with Damus, Amethyst, Primal, [iris.to](http://iris.to), and any NWC-compatible client. **Sub-5ms Performance**: Your local relays are 100x faster than public relays (which average 100-500ms). ## **🛠️ Technical Excellence** ✅ **Cross-Platform** (Windows, macOS, Linux)\ ✅ **One-Command Deploy** with Docker Compose ✅ **Professional Documentation** with setup guides ✅ **MIT Licensed** - free forever ## **🌟 Ready to Experience True Sovereignty?** git clone <<<https://github.com/Grumpified-OGGVCT/NostrGator.git>>> cd NostrGator cp .env.example .env docker compose up -d\ **Lightning Wallet**: [*http://localhost:7012*](http://localhost:7012)\ **File Server**: [*http://localhost:7006*](http://localhost:7006)\ **Metrics**: [*http://localhost:9090*](http://localhost:9090) ## **🙏 Built on Giants' Shoulders** Massive thanks to @getAlby for Alby Hub, @scsibug for nostr-rs-relay, @quentintaranpino for nostrcheck-server, @fiatjaf for Nostr, and the entire open source community. **This is what happens when we build together.** 🤝 *** **Ready to max out your sovereignty?** GitHub: [*https://github.com/Grumpified-OGGVCT/NostrGator*](https://github.com/Grumpified-OGGVCT/NostrGator) *Standing on the shoulders of giants, reaching for digital freedom.* 🗽 \#Nostr #Lightning #Bitcoin #Sovereignty #OpenSource #SelfHosted #NostrRelay #NWC #FOSS #DigitalFreedom #NostrGator

How I Learned to Stop Worrying and Love Docker Networking (Or: A Tale of Relay Woes)

*A cautionary tale about deploying a Nostr relay, featuring duplicate routes, DNS shenanigans, and the eternal struggle between "it works on my machine" and "why is everything on fire?"* ## The Setup: What Could Possibly Go Wrong? It all started innocently enough. I had a simple goal: deploy a personal Nostr relay with a nice web interface. You know, the kind of project that should take "an afternoon" and definitely won't spiral into a weekend-consuming debugging marathon involving container networking, nginx configurations, and questioning my life choices. Spoiler alert: It took considerably longer than the afternoon. ## Chapter 1: The Great Scheduler Addition Things were working beautifully. The relay was humming along, clients were connecting, and I was feeling pretty good about myself. Then I had what seemed like a perfectly reasonable idea: "You know what this needs? A background scheduler to update content automatically!" Because apparently I subscribe to the philosophy of "if it's not broken, add more moving parts until it is." I implemented a lovely little scheduler using Python's `threading` module. Clean code, proper separation of concerns, the works. What could go wrong? ## Chapter 2: The 502 Bad Gateway Blues After deploying the scheduler, suddenly everything was returning `502 Bad Gateway` errors. Classic. The kind of error message that's about as helpful as a chocolate teapot. The logs were helpfully reporting: `AssertionError: View function mapping is overwriting an existing endpoint function: update_cache` Ah yes, the dreaded duplicate route. Turns out, in my enthusiasm to add scheduler functionality, I had somehow managed to define the same Flask route twice. Because apparently, like a bad pop song, once just wasn't enough. ### The Detective Work This is where things got interesting. The web interface was down, but the containers were running. The relay process was starting, then immediately dying with the grace of a swan having an existential crisis. ```bash [ERROR] Worker (pid:205) exited with code 3 [ERROR] Shutting down: Master [ERROR] Reason: Worker failed to boot. ``` Worker failed to boot? More like "developer failed to not duplicate code," but who's keeping track? ## Chapter 3: The Great Container Rebuild The fix was simple enough once I found it: delete the duplicate route definition. But here's where Docker's "helpful" caching behavior comes into play. You see, the app code wasn't mounted as a volume—it was baked into the container image during build. So my local fix was sitting there, mocking me, while the container cheerfully continued using the broken version like nothing happened. *Queue the Docker rebuild process*, which in 2025 still feels like watching paint dry, but with more anxiety about whether it will actually work this time. ## Chapter 4: The DNS Comedy Hour With the duplicate routes fixed, the web app was working again. Victory! Time to check if the relay was accessible to Nostr clients. "The relay is showing as disconnected on clients again." *Record scratch. Freeze frame.* This is where our story takes a delightful detour into the wonderful world of Docker networking and nginx configuration. ### The Investigation WebSocket connections were failing with—you guessed it—another `502 Bad Gateway`. But this time, it wasn't the app. It was nginx. The configuration looked perfectly reasonable: ```nginx proxy_pass http://nostr-relay:8080$1; ``` Except for one tiny detail: **that hostname didn't exist.** ### The Plot Twist Docker Compose had named the container `nostr-home_rnostr-relay_1`, not `nostr-relay`. So nginx was essentially trying to phone a number that was disconnected. ```bash $ docker exec nginx_container nslookup nostr-relay ** server can't find nostr-relay: SERVFAIL ``` The actual working hostname? `rnostr-relay`. Because of course it was. ## Chapter 5: The Victory Lap One simple find-and-replace later: ```bash sed -i 's/nostr-relay:8080/rnostr-relay:8080/g' nginx.conf ``` And suddenly everything worked again. WebSocket connections returned HTTP 101 (the good kind of switching protocols), relay info was being served properly, and Nostr clients could connect without throwing tantrums. ## Lessons Learned (The Hard Way) 1. **Docker networking is like a box of chocolates** — you never know what hostname you're gonna get, and it's probably not the one you expected. 2. **Always check your container names** — `docker-compose ps` is your friend, even when it tells you things you don't want to hear. 3. **Volume mounts are your friend** — If you want to edit code and have it actually take effect, mount it as a volume. Revolutionary concept, I know. 4. **Duplicate code is the enemy** — Flask will absolutely refuse to start if you define the same route twice, and it will do so with all the grace of a toddler having a meltdown in a grocery store. 5. **DNS resolution works until it doesn't** — And when it doesn't, everything fails in the most spectacular way possible. ## The Epilogue After all the debugging, container rebuilding, and nginx configuration wrestling, I now have: - ✅ A working Nostr relay - ✅ WebSocket connections that actually connect - ✅ A background scheduler that doesn't crash everything - ✅ A web interface with real-time statistics - ✅ Several new gray hairs The relay is now happily serving connections at `wss://nostr.pleb.one`, the web interface shows live statistics, and the scheduler updates content every 30 minutes without setting anything on fire. Was it worth the several hours of debugging? Ask me after I've had more coffee. ## Final Thoughts Deploying software is like trying to assemble IKEA furniture while blindfolded, using instructions written in a language you don't speak, with tools that may or may not be the right ones. But when everything finally clicks into place, and you see that beautiful `HTTP/1.1 101 Switching Protocols` response, all the pain seems worth it. Until the next deployment, anyway. --- *The relay is live at `wss://nostr.pleb.one` if you want to test your own Nostr client's patience with my networking skills. You can also visit the web interface to watch real-time statistics and marvel at how something so simple can be so complicated to deploy.* *No containers were permanently harmed in the making of this deployment. Several developer sanity points may have been lost in the process.*

relay.tools quarterly report Q3-2024

# relay.tools quarterly report October, 2024 # Project Updates Milestone: Relay.tools is celebrating 1 year of OpenSats! Cheers to everyone that made this possible. Relays were very popular this quarter. Scaling efforts were prioritized! This is a good indicator for relay.tools as it means that it's healthily growing. Development was executed well, completing one project at a time across the whole stack. # Relay Discovery I've been working with @sandwich from nostr.watch on NIP66. NIP66 will be an ABSOLUTE GAMECHANGER for clients in finding of their relays. This was always a vision for relay.tools and I am honored to be working with @sandwich on what is a pretty amazing solution. We are now in a phase of client outreach, to gather client feedback and help them implement/understand the overall goal of the NIP. TLDR: the goal is to create a distributed version of the nostr.watch data, using nostr events. - [x] implemented NIP66 draft7 (the 'final' design) in monitorlizard - [x] started shipping events to the monitor relay(s) in collab with nostr.watch backends and relay.tools backends. - [x] fixed bugs and released new binaries for monitorlizard (a NIP66 data reporting tool) # Auth Proxy Rollout The NIP42 Auth Proxy project went really well this quarter. It's now serving tons of traffic and most bugs with clients have been squashed and the proxy hardened. This has become a very popular feature on the relays, as AUTH has many benefits beyond protecting of DMs. - [x] testing vs. NIP17 and bugs fixed - [x] cluster operations (multiple proxies) # UI/UX A huge milestone this quarter was the release of the settings wizard. This is a walkthrough for new (and current) users of all the available settings for different 'relay types'. A lot of work over the last year has gone into the culmination of these settings and the wizard was a major step forward to help users understand what their options are when running a relay. Another major UI change was the introduction of a relay feed to the landing page for a relay. This is called the relay explorer. The idea was to move to a single page app, and re-do navigation for easy relay browsing and discovery. - [x] settings wizard released - [x] relay explorer v2 # Installer The installer had lots of good effort put in by me and some nice contributors. We did a couple iterations on documentation and facilitated in the creation of 2-3 new relay hubs that are using this installer infrastructure. Some additions to the installer were: - [x] docs for building self-hosted machine images and installing on a VPS - [x] FULLY AUTOMATIC SSL certificate handling for multiple domains with certbot - [x] self-hosted influxDB (for relay metrics) - [x] fix bugs with auto-deploy upgrade # Billing/Invoicing/Support The billing system had some improvements this quarter and many invoices were sent. :) It now has better super-admin tools to notify users of past-due balances via nostr (With NDK). This took a few iterations of deciding the best way to contact users of nostr and figuring out why they don't respond to messages. It's a learning experience all the way around and the billing system will evolve over time in ways that are conducive to remaining 100% nostr for user communication and support. The support system also showed signs of life, and people were able to use it to contact me with their questions via the various help-desk methods that I've been rolling out. (A relay, a support npub, DMs, NIP17 DMs, simplex) # Scaling! Relay.tools successfully completed the first scale-out event. This is HUGE. Relays take more and more bandwidth and resources as they establish themselves, while at the same time needing a reasonable low-cost environment to grow in. To meet their demands the horizontal scaling is important. This will scale on commodity hardware or VPSs with ZERO vendor lock-in. ![invoices page](https://d.nostr.build/jp2oyiTBA38QFarD.svg) - [x] multi-server clustering with ZERO cloud vendor lock-in - [x] deployment pipeline and capacity planning - [x] HAproxy and additional AUTH proxies fronting all services - [x] internal/external network support

relay.tools quarterly report Q2-2024

# relay.tools quarterly report July, 2024 ## Project updates The major focus this quarter was building a NIP-42 AUTH proxy for strfry relays. Codename: interceptor. ## NIP-42 AUTH proxy for strfry I see this as a major innovation in nostr relaying and there was no other open source option in the ecosystem so I decided it was extremely important to investigate and get done. I was not completely sure that it would work, but after much building and testing I now think this is production ready. Currently very few relays support NIP-42 AUTH. The ones that do, keep their software closed source as a value-add. This validates that it is a wanted, and valued feature. I went live with an initial relay for testing wss://auth.nostr1.com. I coordinated the launch of this along with Amethyst re-doing their relay settings to have options for "Private Inbox Relays". I also tested all major clients repeatedly and found and fixed bugs both client side and relay side. I asked nostr for members to join this relay and help test, which they did and after multiple rounds of testing I believe the AUTH proxy is now ready for a major release. This will continue to be a focus for next quarter. https://github.com/relaytools/interceptor-proxy https://github.com/relaytools/interceptor ## NIP-17 testing and collaboration NIP-17 private DM features had a big push from clients this quarter so I helped them by coordinating multiple rounds of inter-client testing and using the new auth.nostr1.com relay. Clients included: coracle, amethyst, 0xChat and gossip. These features are working well, although some of the issues filed and am tracking are still underway being fixed. Some are UX experience and some are simply interoperability issues or bugs that need more work. Specifically for 0xChat and Coracle. Gossip and Amethyst are fully functioning with no known bugs. https://github.com/0xchat-app/0xchat-core/issues/12 https://github.com/coracle-social/coracle/issues/378 ## UI/UX improvements + NDK Spent some time improving the UI/UX and this is still in-progress. The main page has been updated to be more of an exact match from nostr designer @daniele I also created a new relay explorer using NDK and worked with upstream to fix bugs related to NIP-42 AUTH in the library. My PRs are still outstanding but I am hopeful this will pave the way for NDK supporting NIP-42 auth in any clients that use it. I am also writing docs for NDK since this was un-charted territory and required a lot of digging through the code to figure out how to fix and use these features. https://github.com/nostr-dev-kit/ndk/issues/246 https://github.com/nostr-dev-kit/ndk/pull/251 https://github.com/nostr-dev-kit/ndk/pull/248 I also started work on a complete re-write of the relay settings page. The settings page has too many options and is confusing to users so I am combining all the options into a 'setup wizard' that walks the user through the various types of relays and helps them pick options that they will want. ## Relay Metadata, Monitoring and Discovery One part of the vision for relay.tools has been to make it easier to discover new relays. Not only for relays running on the platform but for ALL relays. Therefor I spent some time this quarter working toward that goal. I discovered that @sandwich has been working a long time on NIP-66 and it is exactly what we need for relay discovery. It has many additional features as well such as monitoring, and geographic filtering. https://github.com/nostr-protocol/nips/pull/230 I will be adding support for this into relay.tools on the main directory listing, so I currently am working with him to finalize the NIP and get it merged. It will be able to poll these events and show/search through relays that are discovered on the wider nostr network. I also created a new tool to publish these events so that I can start down this path. The tool is called monitorlizard. What it does is it monitors relays, and publishes them according to the NIP-66 spec. I also launched a new relay that anyone can push these events to called monitorlizard.nostr1.com https://github.com/relaytools/monitorlizard I hope that we can get this NIP finalized and merged this quarter although it is not a rush. Fiatjaf has already given the go-ahead and we just need to make sure to tidy up and include all the things we need in there before merge and it is 'set in stone' so to speak.

relay.tools quarterly report Q1-2024

# relay.tools quarterly report April, 2024 ## Project updates The main initiatives for [Relay.tools](https://relay.tools) this quarter were the installer, re-occuring billing support, customer support, and moderation capability. Towards the end of the quarter I was able to start work on supporting nostr groups and a NIP42 auth proxy. ## Installer I made lots of progress on the installer this quarter. It's now at a point where it is fully functional. - [x] Whitelabel support for custom domains - [x] Automatic SSL certificate deployment via. certbot container - [x] Many bugfixes, improvements, and end to end testing - [x] Publish pre-built images - [ ] Use pre-built images in the installer (alternative to building from scratch). The installer was used to deploy a POC for [vote.gold](https://vote.gold). A side project by @manime that is a relay hub for independent voters. ## Re-Occuring Billing I created a new system for billing / invoicing that tracks user balances and allows them to "top-up" their balance. ![invoices page](https://image.nostr.build/d4a4807b62dbd652eb0a033c19b5d997683f2669ce4ce753a0389caa8fc1de95.jpg) The billing system accounts for users of a paid relay (paid relay bonus), these payments go toward the owners balance. This system is now live and there has been decent response by relay owners that reached out to pay their bills. The cost of relays was adjusted to 12,000 sats / month. (from 21,000 sats/month). Upgrades to lightning node and channels were performed to support these payments. ## Customer support Relay.tools rolled out a new customer support portal to support users that have questions about billing and so that relay.tools can contact relay owners via nostr with announcements / notifications. My goal here is to use nostr itself to support the relays. I also did not want to use DMs because they are not private, they're flakey and simply not a good practice given the state of clients implementations. I think using nostr native methods for support is very important, but is also very difficult given some limitations that currently exist with nostr. Regardless, I pushed ahead. - [x] Created a nostr pubkey for fielding questions and supporting users. - [x] Used the outbox model from gossip to setup a streamlined customer support focused dashboard. - [x] Created an additional [relay](https://support.nostr1.com) for support and linked to the relay from the relay.tools landing page. - [x] The first support notification blast went out to all owners advising them to pay balances in the coming month or to contact support for free 'credits' in exchange for feedback. Based on the feedback I've gotten so far, it's clear there is still much work to do implementing a nostr native support system: * Gossip outbox was buggy, and my client database pushed the limits of gossip and corrupted the database. I filed bug(s) upstream and am working with upstream to make this better. * Some users preferred to use DMs vs. open communication on nostr (even though DMs are not advisable for private communication on nostr). * Added SimpleX to the support pubkey's bio as an alternate contact method. * The process for balance notification was very manual and once further research is done on the path forward, it needs to be automated. ## Moderation and house-keeping - [x] I've begun reaching out to nostriches for help with moderation. - [x] Implemented some additional super-admin capability for the relay.tools admin user(s) in preparation for multiple super-moderators. This includes a global view of all relays and the ability to quickly explore flag mis-behaving relays. - [x] I've started deleting some relays that were abandoned after using the new customer support portal to reach out to them. Some were simply test relays, some operators expressed that they've graduated to running their own relay, and some I simply could not get in contact with. This is a good milestone for relay.tools and was much needed, leveraging the re-occuring billing and support tasks. ## AUTH proxy for strfry I've started work this quarter on creating a mechanism to bring [NIP42](https://github.com/nostr-protocol/nips/blob/master/42.md) AUTH to the strfry ecosystem. The gist of it is, strfry has been unable to implement NIP42 due to the complexity of needs that various authentication schemes require. There are many considerations and what seems simple at first glance quickly becomes mired in confusion and C++ makes it hard for anyone to collaborate or implement. To work around this, I've created a proxy written in golang that can sit outside strfry and intercept/handle AUTH requests, leveraging the robustness and performance of strfry while allowing us to customize the authentication flow in a separate process. So far I have an initial POC working and in the coming quarter I hope to ship an initial version of this which will be used by relay.tools and be the first open source auth proxy for strfry relays. I am very excited about this. NIP42 in my opinion will enable multiple new paradigms for interacting with relays as it will be able to implement ACLs for reading from a relay vs. the current methods of write ACLs. It also will have the potential to support the new group clients that I mention in the next section. ## Outreach / Collaboration / Nostr Groups I've been spending more time on getting some collaboration going with fellow nostriches where our vision for nostr aligns. I am very interested in groups for nostr. (Functional replacements for discord/telegram/slack/reddit). This has been a long-term goal of relay.tools to support these types of clients and I'm excited that clients are starting to kick off a second wave of nostr functionality and I will do everything I can to support them. - [x] I made an appearance on the Thank God For Nostr podcast talking with @hodlbod about relays, group-chats, and the viability of relays being profitable/sustainable. - [x] Various nostriches have contacted me about running their own relay.tools and I'm working with them to educate and help them bring new 'relay hubs' online! - [x] I've been working with @hodlbod on some extensive testing of the new Coracle groups implementation, private groups or closed communities: [NIP87](https://github.com/nostr-protocol/nips/pull/875). I have been expoloring the possibilities of using Coracle's private community/group and whitelabel support for an integration with relay.tools. I have also been exploring what modifications a strfry relay may require to support advanced groups such as this based off the [triflector](https://github.com/coracle-social/triflector) relay proof of concept. - [x] Investigated the use and requirements for 'simple groups' by @fiatjaf [NIP29](https://github.com/nostr-protocol/nips/pull/566). This is another group implementation which may require customized relays and I wanted to understand the possibilities and requirements. - [x] Integration with [blowater.app](blowater.app) - I've been working with @blowater on his new client/relay initiative that involves groups for nostr. ## Next Quarter plans - [ ] Release initial version of the AUTH proxy for strfry. - [ ] Collaboration/Outreach - Coracle, blowater, other groups efforts. - [ ] Submit a Relay Discovery NIP for review. - [ ] Relay Support channel improvements.

relay.tools quarterly report Q4-2023

# relay.tools quarterly report January, 2024 ## Project updates ## UI design [Relay.tools](https://relay.tools) spent quite a bit of time working on UI design this quarter. Since UI is time intensive and there are many other aspects of the project that need work, I time-boxed this work to 3-4 weeks total. I engaged with @Daniel from #nostrdesign and a freelance UI developer @freecritter. We setup a penpot instance for relay.tools and practiced using that instead of closed-source figma. We learned that penpot is not as friendly as figma from a designers point of view, but is workable. From the perspective of a frontend engineer it is no different than figma and using penpot is a big opensource win. The following designs were implemented this quarter. There is still much to do in this area and some aspects have been brainstormed but put on hold due to other priorities. ### Relay branding and directory I wanted to give the relays personality and branding, here is a list of improvements in this area: - [x] The home page now prominently displays the public relays that have chosen to advertise. - [x] Relay 'Badges' were re-designed to have better contrast and fit. ![explore relays](https://i.nostr.build/KDq3.png) - [x] Relays have a custom direct landing page at their domain. eg. [frogathon.nostr1.com](https://frogathon.nostr1.com) ### 'Paid relay' support Relays now support lightning payments to the relay.tools operator. This helps with combating spam and allowing the relay owners to subsidize their monthly cost. ![landing page](https://i.nostr.build/5PMK.png) ### Layout / theme The frontend code has been modified so that it is responsive on mobile/desktop using columns. The menu was re-designed to be responsive on mobile and shows user hints for login as well as additional links (explore, FAQ). Theme switcher bugs for light/dark modes have been fixed. (Nextjs bleeding edge workaround was required). ### Relay Explorer Alpha The Relay Explorer Alpha is a mini-client for interacting with a single relay. The following improvements were made: - [x] Moderation capabilities added: Mods can delete messages, block pubkeys, and delete+block directly from the explorer. - [x] Image and Link parsing / optional loading. - [x] Replies implemented. Example screenshot showing these features: ![mod capabilities](https://i.nostr.build/gVrG.png) ## Installer Another main focus this quarter was to implement an installer for the relay.tools software so that anyone can easily self-host this on a generic VPS. The installer will be a simple shell script that asks the user a few questions (like their domain name) and then automatically installs the entire stack. A new code repository was created for this called [relay-tools-images](https://github.com/relaytools/relay-tools-images) - [x] Main architecture to match production (systemd and nspawn). - [x] Common Base OS image builds (Debian). - [x] Haproxy, Strfry, Relaycreator and Mysql image builds. - [x] Auto-updating of application code (including database migrations). This is still in-progress and will be part of next quarter's priorities to finish the first stage. (described in plans for next quarter) ## Lightning Node A decent amount of time was spent managing a Bitcoin+Lightning+LnBits node and building a second node for testing and standby purposes. I had some node issues this quarter and have been learning, re-building the node, upgrading, and aquiring more inbound liquidity to support relay operations. ## Relay Management / daily operations Relay.tools growth last quarter exceeded expectations and lots of work in the ladder part of this quarter went into daily operations. It grew so fast that I have paused any advertising so that I have time to implement some important growth related features (as described in the plans for next quarter). * number of relays currently running: 63 * number of unique admins/mods: 207 * events processed in last 30d: 5,091,724 * gigabytes sent/received in last 30d: 1,651GB / 175GB ### Monitoring Daily operations include checking in on the relay activity to get a feel for what's going on. I've implemented an InfluxDB integration for the strfry plugin, which helps with daily operations and in the future will provide owners, mods, and users with stats showing relay performance and event counts. This greatly improves visibility into the relays and is the backbone of data analysis for the platform. #### Events by Kind (7d) ![Events by Kind (7d)](https://i.nostr.build/6WgO.png) #### Events by Relay (7d) ![Events by Relay (7d)](https://i.nostr.build/B46w.png) #### Data Explorer View (single relay, kind 3) ![Data Explorer view](https://i.nostr.build/zWx0.png) ### Moderation Daily operations time is also spent ensuring relays meet our TOS. That includes browsing the relays content for anything that does not meet the TOS and performing mitigation when necessary. This can be time consuming. I will be adding super-moderator capability so that others can assist as we grow (as described in the plans for next quarter). ### Training / Feedback / Community I promoted the use of event specific relays for nostr community events. Feedback was very positive and showed that people enjoy having event specific relays even if client support is minimal. * Nostrasia * Frogathon ![nostrasia feedback](https://i.nostr.build/YQX7.png) ## Plans for next Quarter Finish the installer - [ ] SSL certificate management with certbot. - [ ] Nostr key generation for API credentials. - [ ] install.sh script for interactive -and- config file based one-shot installation. - [ ] Publish pre-built images and integrate their use with the installer. Re-Occuring Billing (+ tools for interacting with community of relay runners) - [ ] Implement re-occuring billing using a credits system and lightning payments. - [ ] Implement user notification(s) for billing cycle notifications. - [ ] Implement user feedback / support channel. Additional visibility and moderation tools - [ ] Implement super-moderator capability for TOS violations. - [ ] Engage with community to help support moderation

Nostr:一种点对点的加密中继传播协议

教程版本v1.2 作者: [@玛雅idgui 🐰ᥬ[🐶]᭄🌿 cndx@btcdv.com]( https://nostrurl.com/?q=npub16dq3qps8sgehezrylamryx5zrukmhnashvecvjcucjr3927cf2qqd8evcw ) > 作为第一个长博客文,v1.2更新加上链接,之前4月17日v1版本先简单介绍下纯文字版复制过来,后面v2,v3等会补充详细内容和图片链接等优化,敬请关注和期待,谢谢。 ## 0~简介 本文从入门到精通,通俗易懂地系统介绍Nostr的原理及使用技巧,希望能帮你少走很多弯路和加深对Nostr的理解。章节安排顺序如下,文会较长请耐心看或跳到自己想看的位置。 1. ~加密账户私钥签名,这是Nostr的 #BTC 起源和底层逻辑。 2. ~协议各实现端入门,快速地进入到 #Nostr 的世界。 3. ~中继的选择配置,影响Nostr使用效果的关键配置 #Relay 列表维护。 4. ~如何证明你是你,介绍设置 #NIP5 和徽章 #NIP58 的方法与意义。 5. ~闪电ZAP打赏,⚡闪电网络 #Lighting 钱包打赏 #ZAP 和投票调查 #NIP69 。 6. ~图床及看图应用介绍,可以发带图的文和看被墙的图。 7. ~社区共识底线呼吁,为了社区更好不能做或呼吁少做的事儿。 8. ~感谢及进一步本文更新完善计划。 ## 1~加密账户私钥签名 大家都已知Nostr协议是主要由BTC生态开发者们开源维护。可知其思想最早可追溯到中本聪时期。在最早期的QT核心钱包中,就在**文件**菜单中醒目位置设有**消息签名**和**验证消息**功能,这也被后来各Core版本和甚至竞争币版本继承,其实那就可视为Nostr的最早萌芽。即可以有大量的信息由私钥签名发出来,而别人可验证确实是此币地址拥有私钥者发的,别人无法伪造。将这些签名信息按一定格式规则来细化定义,以及加个收集整理记录转发这些签名信息的中继服务器,中继们平等因此像全节点样点对点,但不主动相互传播需用户广播才传播而已,那么就基本发展成Nostr协议了。 ![Doge]( https://nostrurl.com/badge/qianming.png ) 底层的加密账户,Nostr与比特币以及狗狗币等各种各样的竞争币都是互通的,均是**椭圆曲线非对称加密账户**。具体使用来说,脑口令工具 [ahr999.com](https://ahr999.com) 和助记词工具 [vbtcv.com](https://vbtcv.com) 等,都是可以快速生成用于Nostr的nsec私钥和npub公钥。各种私钥数据相同仅仅只是不同编码,另外公钥npub可转化为两个可能比特币地址,比特币地址若公开过公钥能转化编码到npub,用这条甚至从创世区块地址,找到了[中本聪的npub](https://nostrurl.com/?q=npub1v790mv8724yzwxt87xn8zv9hzpwdd2pguqusnfnevtsw58mpm6mqjkttvz)即其Nostr账户,已经有人去关注了。 通过脑口令,或者助记词词组来生成个自己的npub,而不是靠实现端随机生成会较好。一方面是容易记忆尤其通过脑口令,可避免遗忘丢失私钥,另一方面是避免实现端伪随机私钥,而实际使用的其能控制的账户,虽然这种情况极少发生。用法很简单打开上面两工具页面,随便输入脑口令,或者助记词中点随机,下方种类下拉选择Nostr。从生成中选择自己喜欢的npub最好筛选前后含义较好(如有个AI的以[npub1sat](https://nostrurl.com/?q=npub1satgtcftm6420gs8mrf9c075x2527vrmsru22gn8w76skz4zlprqdezplw)开头),多些数字6和8,不要出现数字4或不好含义的字串词。npub可能要跟随一生,不要轻易选定,当然若只是给小号用那可随意。 ## 2~协议各实现端入门 通过聚合导航网址 [8Nostr.com](https://8nostr.com/) 或者 [NostrURL.com](https://nostrurl.com/) 可以超链接到各Clinet实现端,进而快速进入Nostr的世界。 ### 2.1 ~网页实现端 这个最快且跨端,各手机或电脑等只要有浏览器即可访问。缺点是因没有缓存每次都加载头像,可能较慢。一些较复杂的NIP也较难在网页端实现支持。目前较好用的是 [iris.to](https://iris.to/) 或者 [app.coracle.social](https://app.coracle.social/) ,还有[flycat.club](https://flycat.club/) 主打博客。搭建相对较简单,未来可以会有更多。点击进入后输入上面脑口令或助记词生成的nsec私钥登录即可,如不太放心也可输入公钥npub只读模式,或者通过Alby浏览器插件登录,在需签名时会有交互。 ### 2.2 ~手机APP实现端 大陆用户访问苹果APP商店和较正规的安卓应用商店或平台,都是找不到的。苹果用户点击链接,安装测试版[Plebstr](https://testflight.apple.com/join/WVoBPXE6)或[Nostrmo](https://testflight.apple.com/join/kvGz47De)等。而安卓用户,建议到Github,从源头上下载,开源代码的安卓应用最新的发布,开源而更加安全可靠,[**紫水晶**Amethyst](https://github.com/vitorpamplona/amethyst/releases/) 或者 [Nostros](https://github.com/KoalaSat/nostros/releases) 较推荐前者,功能最全实现了大多数[NIP](https://github.com/cndx/nostr/),且可各Note自动翻译为自己母语。若不能访问Github有个链接[YUN](https://pan.baidu.com/s/1V-TA-o4230Ypt8xqgxjqOw?pwd=doge)到百度云盘,也可下载。 ### 2.3 ~电脑实现端 也有很多,但一般用电脑浏览器网页端即可。而iris推出了个电脑端,点链接去其Github选择 [`iris_0.1.0_x64_en-US.msi`](https://github.com/irislib/iris-messenger/releases)下载即可在Windows电脑上安装,比直接访问网页要快些。各端的处理方式不同,因此大家最好用些通用的,如直接写npub或note引用,目前好像只Amethyst支持`Markdown`格式,因此考虑支不支持都格式较好的,如前面加井号空格标题变大,就算不变格式也影响不大。 ## 3~中继的选择配置 说是抗审查不会封号而有些人却抱怨被墙了直接上不去,有些人抱怨信息内容太少而有些人却又抱怨垃圾信息太多,有些人抱怨加载太慢太卡。而种种这些类似负面现象,可能别人却没有这些问题,关键在于您的Relays中继列表的设置情况。设好Relays是决定Nostr使用效果的关键。另外要隔段时间就维护列表,删除不能连接和增加些新的中继Relays。 【**中继设置数量个数**】一般刚进入各实现端,会默认连接几个或十几个较大较常用的Relays,而墙精准墙住,因此默认状态的各实现端一般是不能用的。需要添加一些好Relays后,才开始能用。全球Relays有几百个且不断增多,加上未公开而被收录的估计有千多个,添加过多会较耗网络而较卡,因此建议添加几十个,可能最好50个左右会较好。另外千万注意,不要加上了高频大量发广告的坏Relays,会卡到几乎不能操作。有人担心中继设置太多,会影响隐私,其实个Note本来就是公开,各Relays本来就是可以去主动获取聚合的。动态IP和VPN等也能较好保护自己的位置信息。 【**怎么判断中继好坏?**】首先知名的可放心加上如: ``` wss://universe.nostrich.land wss://offchain.pub wss://relay.plebstr.com wss://relay.nostrich.de wss://nostr.beta3.dev ``` 当然他们未来也可能变坏,并不绝对好。最好访问:[8nostr.com/relays](https://8nostr.com/relays/?Events=1000&ms=6000&wss=cn) 在右上角输入找到的Relay地址,观察一会儿看看。若很久都没信息或信息是很久前的,可能被墙或很少人用,若信息很多是刷屏广告,那么直接别用。 最后注意,在添加或删除完后,要记得点击一下公开保存或发布按钮,这样Relays列表信息就跟随自己账户,在所有实现端同步了。注意出意外列表少时别保存发布防止之前写的被覆盖。可以看别人的中继列表参考,可点击加入自己列表,有时有的显示为空即其用各实现端默认Relays列表从未编辑保存过。在Amethyst上可看到某Note的头像下方,一般有自己与发布者共同的维系可见的Relays的灰色小图标们,从哪里获取当前此Note,遇到好内容也可点击Note右上角菜单,点再次发送给中继的广播,帮其传播到自己的Relays列表。只要大家都积极广播好文,就算是作者设的Relays少也可很快点对点传播到大多数公开Relays上,让更多人看到。 ## 4~如何证明你是你 [NIP05认证](https://github.com/cndx/nostr/blob/main/nip05.md),有些人觉得没用,那是因未到需要用时。不仅仅只是防止别人模仿你的号。另外例如若自己私钥不小心丢失或被盗公开了,那么怎么证明你是你引导用户到你的新号呢,只要NIP05认证修改到新号即可。因此不要图省事随便注册个免费的NIP05,最好用自己或朋友的域名来认证。各设置NIP05认证,是确定你是你的关键。徽章NIP58也可辅助,尤其作为名人,可收到很多徽章,从而别人较难冒充你而设这么多徽章,来证明你的号才是真的。徽章NIP58只是增加仿号难度,注意不能杜绝。 要通过网页 [badges.page](https://badges.page/p/d34110060782337c8864ff76321a821f2dbbcfb0bb33864b1cc48712abd84a80) 来操作徽章展示和创建和颁发徽章,有点风险可用浏览器插件签名操作。目前暂时还没有实现端能全整合进去,未来应该会有。Amethyst目前版本还只是展示徽章和展示创建和颁发过程。 ## 5~闪电ZAP打赏 区别于其它社交平台的很重要的一点是:深度整合使用几乎零手续费且秒速确认的闪电网络⚡️LN来对用户和其Note打赏。这种打赏称为ZAP。因为其是基本有打赏记录的,可以看到某用户共收了多少聪,即给其打赏的个用户的单次打赏ZAP排行榜。但具体因哪个Note获得的打赏要去查较麻烦。 闪电钱包选择是关键,推荐:[getalby.com](https://getalby.com) 几乎零门槛免费注册即可用,可自定义用户名,其还有浏览器插件。手机端建议配合[BlueWallet](https://github.com/BlueWallet/BlueWallet/releases)或[Zeus](https://github.com/ZeusLN/zeus/releases)使用,以便手机端打赏。若较大额为安全,建议[Phoenix](https://github.com/ACINQ/phoenix/releases)可备份,但有门槛,创建通道要花费一笔。不少人推荐[WoS](https://walletofsatoshi.com/)可惜苹果较难安装,安卓也没在Github上找到。注册后编辑资料将像邮箱格式的 [`cndx@getalby.com`](lightning:cndx@getalby.com) 填写到闪电lud16那里,便可接收别人的Zap打赏了。而点击会调用闪电钱包也可去给别人打赏。 选项投票调查NIP69,采用ZAP的方式来给各选项投票。目前好像只Amethyst支持。投票贴其kind是6969故其它大多实现端不能识别,目前看都看不到。因此目前投票一般要截图下再发一次。参与只能来紫水晶ZAP实现。 ## 6~图床及看图应用 Nostr只是文字和Emoji表情之类,并不存储图或视频。带图视频的Note,多是通过URL加载,即各图和视频的网址。而自己的图,网上并没有,那么就需要找个地方上传图,且上传后这地方还可提供图的网址,这个叫**图床**。有的图床集成到实现端了直接使用,可惜大多被墙了,因此需要自己找,目前找到个较好的是 [void.cat](https://void.cat) 当然还有很多其它优秀图床可选。 因图床被墙,Nostr上不少图片,只看到图片链接而看不到内容。方法一是去[iris](https://iris.to/)网页端可以看,另一个方法是 [btc.pics/img](https://btc.pics/img) 复制Note内容放入输入框,等会儿,就有可能就能看到图了。其使用了iris的图片中转功能,大家若找到其它的实现同样功能,也可在第一行换成其它的。 ## 7~社区共识底线呼吁 为了社区更好不能做或呼吁少做的事儿。绝对没任何底线的社交平台,难走入大众和难长久发展,因此呼吁几点: 1. ~对事不对人,文明交流讨论,不要说脏话进行人身攻击。 2. ~半透明勉强可以,但尺度太大的情色图或视频不要传播。 3. ~违法的不能做,偏激政治言论也不要讲,遇到了也不要转发和评论,无视即可。 4. ~不要挂机器人大量刷无意义内容或广告,虽然免费但不要滥用滥发,每条都尽量有意义些。 ## 8~感谢及进一步更新完善计划 虽然很多天前就在构思篇这样较全面介绍Nostr的文章。但一方面时间不够,另外一方面也不段有新知识出来有些还没理解透希望延后些,其实还有很多如基于Nostr的小应用或小游戏等还没了解。但看到有些文章有部分误导内容,因此就花数小时时间先写了本文,将来再完善。[V1版本 note1eksqxtnk263ggrrh9k3hngkht3xeulvd8zp6e359mffcn2tyex4skk0xlv](https://iris.to/note1eksqxtnk263ggrrh9k3hngkht3xeulvd8zp6e359mffcn2tyex4skk0xlv) V1.2更新,修正了些文字错误,加入了一张图,和优化补充了一些细节说法。发布到[flycat.club](https://flycat.club/)博客。 将来v2版本计划加入详细各资源链接,图片及详细分析,尤其是我之前增加有介绍相关知识的Note资源的链接。 再将来v3版本计划,加入更多技术细节,整合为一片更全面的文章,甚至电子书,尝试找找出版社看看能否出版发行,不行直接全公开随便看。谢谢大家支持和提供思路或建议。大家可一起完善。 [⚡ Pay with lightning (cndx@getalby.com)](lightning:cndx@nostrurl.com)🐇ᥬ[🐕]᭄🌿