Herkos

Your own mailbox relay

Last updated: 24 September 2026

Herkos mail travels as sealed envelopes (NIP-59 gift wraps) and waits on the relays in your DM relay list until your app collects it. Most public relays hand those envelopes to anyone who asks. Nobody can open them, but anyone can count who receives mail and when, and the relay can delete them whenever it likes.

A relay of your own that asks who is reading (NIP-42) gives your envelopes to you and to nobody else, and keeps them for as long as you decide. This page explains how to set one up in three steps. It takes about fifteen minutes if you already have a server.

Which relay to use

We ran both candidates on 24 September 2026 and checked what they actually do with mail, not what they advertise.

nogringo/nostr-relay HAVEN 1.2.2
Who can read your envelopes Only you, after identifying /chat: anyone in your web of trust, after identifying. /inbox: anyone, with no identification
Who can deliver mail to you Any sender who identifies Only your web of trust
Deleting mail you received Yes No
Fast resync (NIP-77) Yes No
Licence MIT MIT

Use nogringo/nostr-relay as your mailbox. It is the one that does what mail needs: anyone can write to you, and only you can read. HAVEN is a good tool for other things (a personal outbox, media, private notes), but as a mailbox it would turn away mail from anyone you do not follow, including the bridge that carries ordinary email.

What you need

Step 1: run the relay

git clone https://github.com/nogringo/nostr-relay
cd nostr-relay
cp .env.example .env

Edit .env: give the relay a name (RELAY_NAME) and set RELAY_URLS to its public address, wss://relay.example.com.

Then open docker-compose.yml and change the port line to "127.0.0.1:3334:3334". The relay trusts the address the proxy forwards to it when it checks who is identifying, so it must only be reachable through the proxy. Start it:

docker compose up -d

Step 2: put HTTPS in front

With Caddy, the whole configuration (/etc/caddy/Caddyfile) is:

relay.example.com {
    reverse_proxy 127.0.0.1:3334
}

Reload Caddy (sudo systemctl reload caddy). Opening https://relay.example.com in a browser should now answer.

Step 3: tell Herkos

  1. In Herkos, open Settings → Network and servers → Your own relay and tap Check a relay. Enter wss://relay.example.com.
  2. Herkos connects and tries it: it asks for someone else's mail, and it leaves a test envelope from a stranger (then deletes it). You should see Only you can read your mail here and Accepts mail from any sender.
  3. Tap Make it your first DM relay, and Save at the top.

Keep a public relay in the list as well, second: if your server is down, mail still has somewhere to wait. relay.damus.io is a good second choice, because it also asks who is reading.

Good to know