MCPcopy Index your code
hub / github.com/CodyTseng/nostr-relay-tray

github.com/CodyTseng/nostr-relay-tray @v2.0.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v2.0.0 ↗ · + Follow
210 symbols 620 edges 78 files 0 documented · 0% updated 5mo agov2.0.0 · 2025-03-23★ 10611 open issues

Browse by type

Functions 177 Types & classes 33
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

nostr-relay-tray nostr-relay-tray

A nostr relay for desktop, available on macOS, Windows, and Linux.

powered by nostr-relay

Features

  • Fully Featured – A complete Nostr relay with all essential functionalities.
  • Zero-Config Start – Instantly launch your own relay.
  • Granular Control – Precisely manage which events to accept or reject.
  • Instant Public Access – Open your relay to the world with a single click.
  • Full-Text Search – Quickly find events with powerful search capabilities.
  • Cross-Platform – Available on macOS, Windows, and Linux.

Download

Download the latest release from the Releases page.

Note: Since the app is unsigned, you may need to manually allow it to run in your system settings.

Running on Apple Silicon

If you encounter the error: "nostr-relay-tray is damaged and can't be opened. You should move it to the Bin.", run the following command in your terminal:

sudo xattr -rd com.apple.quarantine /Applications/nostr-relay-tray.app

Then, try launching the app again.

Build from source

You can also compile the app from source.

Note: Node.js >= 20 is required.

# Clone this repository
git clone https://github.com/CodyTseng/nostr-relay-tray.git

# Go into the repository
cd nostr-relay-tray

# Install dependencies
npm install

# Build the app
npm run build:mac
# or npm run build:win
# or npm run build:linux

The executable file will be in the dist folder.

Flexible event filtering

nostr-relay-tray provides a flexible event filtering mechanism, allowing you to precisely control which events are accepted. The mechanism works in two layers:

                  Incoming Event
                        │
                        ▼
                ┌───────────────┐
                │  Block Rules  │  ❌ If blocked, event is rejected.
                └───────────────┘
                        │ (not blocked)
                        ▼
   ┌─────────────────────────────────────────┐
   │         Only one needs to pass          │
   ├─────────────┬─────────────┬─────────────┤
   │ Allow Rules │     WoT     │     PoW     │
   └─────────────┴─────────────┴─────────────┘
                        │
                        ▼
                  Event Accepted ✅

Layer 1

  • If block rules exist, any matching event is immediately rejected.
  • If no block rules are defined, this layer is skipped, and the event proceeds to the second layer.

Layer 2

This layer consists of three independent filters:

  • Allow Rules: Accepts events that meet predefined conditions.
  • Web of Trust (WoT): Accepts events from trusted users or relays.
  • Proof of Work (PoW): Accepts events that meet a certain computational difficulty.

Filtering logic:

  • If at least one filter is enabled, the event must pass at least one.
  • If all filters are disabled, the event is automatically accepted.

Screenshot

screenshot

screenshot

screenshot

screenshot

Donate

If you like this project, you can buy me a coffee :)

lightning: ⚡️ codytseng@getalby.com ⚡️

bitcoin: bc1qx8kvutghdhejx7vuvatmvw2ghypdungu0qm7ds

Icon Attribution

The ostrich element within the icon is sourced from nostr_icons. Special thanks to satscoffee for providing such a beautiful ostrich.

License

MIT

Extension points exported contracts — how you extend this code

Core symbols most depended-on inside this repo

Shape

Function 110
Method 67
Class 24
Interface 9

Languages

TypeScript100%

Modules by API surface

src/main/services/relay.service.ts22 symbols
src/main/services/guard.service.ts14 symbols
src/renderer/src/components/RuleConditions.tsx11 symbols
src/renderer/src/pages/wotAndPow/index.tsx10 symbols
src/main/repositories/rule.repository.ts10 symbols
src/renderer/src/components/ui/use-toast.ts9 symbols
src/main/services/proxy-connector.service.ts9 symbols
src/main/guards/restriction.guard.ts9 symbols
src/main/services/theme.service.ts7 symbols
src/main/repositories/config.repository.ts6 symbols
src/main/index.ts6 symbols
src/renderer/src/pages/proxy/index.tsx5 symbols

For agents

$ claude mcp add nostr-relay-tray \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page