Understanding Relays in Amethyst
DanishCryptoUnderstanding Relays in Amethyst: A Comprehensive Guide
Amethyst, a popular Android client for the Nostr protocol, relies heavily on relays to handle data storage, retrieval, and distribution. Relays are essentially servers that store and broadcast Nostr events (like notes, DMs, zaps, profiles, and more). Unlike centralized platforms, Nostr is decentralized, so relays can be public, paid, private, or local, and users have full control over which ones they connect to. This setup enhances censorship resistance but requires thoughtful configuration to balance privacy, speed, battery life, and completeness of feeds.
Amethyst's relay settings (found in Settings → Relays) categorize relays into specific types, each serving a distinct purpose. These categories help optimize how the client reads (pulls data) and writes (pushes data) events. The app uses an "outbox/inbox model" (based on NIP-65), where it intelligently selects relays based on user preferences, followed accounts, and event types. For example, Amethyst discovers relays automatically via NIP-65 announcements from your follows, but you can manually add, prune, or toggle them.
Below, I'll explain each relay type in Amethyst as of late 2025 (based on v1.0.4+ updates), including their purpose, how they work, and tips for setup. Note: Keep your total relays lean (10-20 max) to avoid battery drain—focus on 2-3 per category. Use tools like nostr.watch or relay.tools to find reliable ones.
1. Public Outbox/Home Relays
- Purpose: These are your primary "write" relays for publishing content. They store all your public events (notes, likes, replies, lists, profiles, etc.) and make them discoverable to others. Essential for visibility—your followers' clients pull from here via NIP-65 announcements.
- How They Work: When you post, Amethyst sends the event to these relays first. They broadcast it to connected clients or other relays. If a relay is down, Amethyst fails over to backups. These should be reliable and allow public reads (anyone can download your events). Paid relays (e.g., nostr.wine) often provide better uptime and spam filtering.
- Setup Tips: Limit to 1-3. Recommendations: nostr.wine (paid, reliable), nos.lol (free, global), or a country-specific one for low latency. Tick "Write" only; enable auto-discovery for suggestions from follows. If you're missing posts from friends, add their announced outboxes here.
- Pros/Cons: High visibility but potential privacy trade-off (public data). Use for broad reach; avoid sensitive content.
2. Public Inbox Relays
- Purpose: These handle incoming public notifications, replies, and mentions. They're your "read" relays for global feeds, ensuring you see responses to your posts or tagged content.
- How They Work: Relays here accept events from anyone if they tag you or are public. Amethyst pulls from them for your reply threads and notifications. They must allow writes from outsiders but can restrict downloads to subscribers (e.g., paid relays filter spam). In the outbox model, Amethyst prioritizes these for efficiency over querying random relays.
- Setup Tips: 1-3 max. Recommendations: nos.lol (free), nostr.mom (global), or paid like <your.relay>.nostr1.com for spam protection. Tick "Read" primarily. If spam is an issue, switch to paid ones that authenticate downloads.
- Pros/Cons: Keeps notifications flowing; can overload with junk if not filtered. Opposite of outboxes—focus on inbound traffic.
3. DM Inbox Relays
- Purpose: Specialized for private direct messages (DMs) and encrypted content (NIP-17/44). They store incoming DMs securely, ensuring only you can access them.
- How They Work: These accept encrypted events tagged to you but restrict downloads to authenticated users (you). Amethyst pulls DMs from here, decrypting locally. Great for privacy-sensitive comms like NIP-47 wallet connects or RPC calls. They often require AUTH (NIP-42) to prevent spam.
- Setup Tips: 1-2. Recommendations: inbox.nostr.wine (paid, secure), or your private relay like <your.relay>.nostr1.com. Tick "Read" for DMs. For max privacy, use a self-hosted one via Citrine (ws://localhost:4869).
- Pros/Cons: Enhances DM security; limited to encrypted events. Use separate from public relays to avoid leaks.
4. Private Home Relays
- Purpose: Your personal, secure storage for all events, including drafts, backups, and delegated signing (NIP-26/46). Not for public sharing—ideal for offline syncing or hardware signers.
- How They Work: These store events privately; only you can read/write. Amethyst uses them for local caching, backups, or remote signing (e.g., via Amber or Peridot). They support NIP-44 remote signing and can be local (e.g., Citrine on-phone) or remote (e.g., Umbrel via Tailscale).
- Setup Tips: 1 only. Recommendations: ws://localhost:4869 (Citrine for mobile), or ws://umbrel.your-tailnet.ts.net:4848 (Umbrel self-hosted). No public ticks—keep internal.
- Pros/Cons: Ultimate privacy/control; no broadcasting. Perfect for key bunkers but not for visibility.
5. Proxy Relays
- Purpose: Act as gateways or funnels for all traffic, routing requests through a single point to simplify connections or add privacy (e.g., via Tor).
- How They Work: Amethyst sends all reads/writes through these first; they proxy to upstream relays. Useful for battery saving—your client talks to one relay, which handles the rest. Supports NIP-38 proxy tags for event forwarding.
- Setup Tips: 1 max. Use your private relay (e.g., Umbrel) here for minimal traffic. Tick for routing; combine with Tor for anonymity.
- Pros/Cons: Reduces connections (battery win); potential single-point failure. Ideal for mobile data limits.
6. Broadcast Relays
- Purpose: For wide distribution of your events, especially to many followers or across networks.
- How They Work: These push your writes to multiple downstream relays automatically. Amethyst uses them for redundancy—post once, broadcast everywhere. Based on NIP-73 or similar for efficient syncing.
- Setup Tips: 1-2. Recommendations: High-uptime ones like relay.damus.io. Tick "Write" for outgoing blasts.
- Pros/Cons: Ensures reach; can increase spam if overused. Use sparingly.
7. Indexer Relays
- Purpose: Specialized for quick lookups of metadata, follows, and relays (kinds 0, 3, 10002). They index data for fast queries.
- How They Work: Amethyst pulls from these for profiles, contact lists, and relay discovery (NIP-65). They crawl and cache structured data, speeding up app startup and searches. Added as defaults in v1.0.4 for new accounts.
- Setup Tips: 1-3. Recommendations: purplepag.es (metadata-focused). Auto-added often; tick for reads.
- Pros/Cons: Faster UI; limited to specific kinds. Essential for outbox model efficiency.
8. Search Relays
- Purpose: For full-text or event searching across the network (NIP-50/81).
- How They Work: These index and query events by content, tags, or IDs. Amethyst sends search requests here; they return results without full feeds. Great for finding old posts or hashtags.
- Setup Tips: 2-3. Recommendations: nostr.wine, relay.nostr.band, relay.noswhere.com. Dedicated for search—no reads/writes.
- Pros/Cons: Enables discovery; results depend on what they've indexed (no "global" view).
9. Local Relays
- Purpose: On-device or nearby relays for low-latency access, like Citrine on your phone.
- How They Work: Amethyst prioritizes these for caching and offline use. They act as private storage, syncing with upstreams when online.
- Setup Tips: 1. Use ws://localhost:4869 (Citrine). Ideal for battery optimization.
- Pros/Cons: Fastest; device-bound.
10. Trusted Relays
- Purpose: User-marked reliable relays for priority in queries.
- How They Work: Amethyst favors these for reads/writes, overriding auto-discovery. Useful for paid or self-hosted ones.
- Setup Tips: Mark via settings; duplicates may appear—clean up.
11. Blocked Relays
- Purpose: Blacklist unreliable or spammy relays.
- How They Work: Amethyst ignores these entirely, preventing connections.
- Setup Tips: Add problematic ones here; fixes bugs like duplicated entries (v1.0.4 patch).
12. Connected/General Relays
- Purpose: Catch-all for active or uncategorized relays.
- How They Work: Lists currently connected ones; includes auto-discovered. Use for monitoring ping/latency.
- Setup Tips: Prune to avoid bloat.
General Tips for Optimization
- Battery/Power: Use proxy mode with one relay (e.g., Umbrel) to minimize connections. Turn off auto-discovery if >300 relays appear.
- Privacy: Prefer private/DM relays for sensitive data; use Tor/Orbot integration.
- Troubleshooting: Check logs in Amethyst (Advanced → Logs) or relays' NIP-11 docs. If feeds lag, add upstreams to your private relay.
- Updates (2025): v1.0.4 added indexer defaults, NWC deep links, and relay stats. Always update via GitHub for fixes.
This setup makes Amethyst flexible—start simple with defaults, tweak for your needs. For more, check Vitor Pamplona's guides on nostr.com