Haven allows you to manage who can interact with your relay through whitelisting and blacklisting.
Whitelisting grants specific npubs the same permissions as the relay owner.
- Outbox Publishing: Ability to publish notes to your outbox relay.
- Blossom Media Server: Ability to upload to your Blossom server.
- Private Relay Access: Ability to read and write to your private relay (
/private). - Web of Trust Bypass: Whitelisted users are automatically trusted and do not need to be part of your Web of Trust to interact with your Chat and Inbox relays.
- Create a JSON file (e.g.,
whitelisted_npubs.json) containing an array of npubs:[ "npub1...", "npub2..." ]
- Set the
WHITELISTED_NPUBS_FILEenvironment variable in your.envfile to point to this file:WHITELISTED_NPUBS_FILE=whitelisted_npubs.json
Note
The relay owner's npub (defined by OWNER_NPUB) is automatically whitelisted. You don't need to add it to the file.
Blacklisting allows you to explicitly block specific npubs from interacting with your Haven relay, even if they would otherwise be allowed by the Web of Trust.
- Chat Relay: Blacklisted users cannot send DMs or messages to your Chat relay.
- Inbox Relay: Your Inbox relay will reject notes from blacklisted users.
- Import: Events from blacklisted users will be skipped when importing from external relays (e.g., using
./haven importor from the live subscription to import relays).
Note
Blacklisting does not affect Blossom Media Server access, Outbox publishing, or private relay access. In theory, you could simultaneously whitelist and blacklist the same npub, which makes very little sense.
Important
Blacklisting has no effect when importing JSONL files.
- Create a JSON file (e.g.,
blacklisted_npubs.json) containing an array of npubs:[ "npub1...", "npub2..." ]
- Set the
BLACKLISTED_NPUBS_FILEenvironment variable in your.envfile to point to this file:BLACKLISTED_NPUBS_FILE=blacklisted_npubs.json