Feature: Add configurable seed relays, archive kinds, and listen port via environment variables - #96
Merged
barrydeen merged 1 commit intoApr 18, 2026
Conversation
- SEED_RELAYS env var: comma-separated WSS URLs, falls back to built-in defaults - ARCHIVE_KINDS env var: comma-separated event kind numbers, falls back to defaults - PORT env var: configurable listen port, falls back to 3334 - ARCHIVE_REACTIONS=TRUE still auto-adds kind 7 if not in ARCHIVE_KINDS - Simplify archiveTrustedNotes() by removing duplicated kind list branches Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi Barry
Thank you for your great relays. It's my pleasure to submit this set of new optional features for your WOT relay, which I have written for and are in production use with wss://relay.shosho.live
Summary
Three new optional environment variables that make wot-relay more flexible for operators running domain-specific relays (live streaming, marketplace, etc.) without requiring code changes.
All three are fully backward-compatible — existing deployments with no new env vars set behave identically to before.
SEED_RELAYSComma-separated list of WSS URLs to use as seed relays. Falls back to the current built-in list of 14 relays if not set.
ARCHIVE_KINDSComma-separated list of Nostr event kind numbers to archive and clean up. Falls back to the current default kinds if not set. ARCHIVE_REACTIONS=TRUE still adds kind 7 automatically if not already in the list.
This also simplifies archiveTrustedNotes() by removing the duplicated kind list that was identical in both the ARCHIVE_REACTIONS true/false branches.
PORTConfigurable listen port. Falls back to 3334 if not set. Useful for cloud platforms (Railway, Fly.io, etc.) that inject their own PORT variable.
Changes
Thank your for your time reviewing this PR. If you have any questions or comments or prefer changes please let me know and I will be happy to help.
Best regards
Rod