Auth model
Installed plugin + key material + relay configuration
Encrypted decentralized messaging with fewer platform guarantees and more protocol intent.
Nostr DM setup for OpenClaw: plugin install, relay strategy, private-key handling, DM policy, profile metadata, verification, and the protocol limits operators should understand before rollout.
Auth model
Installed plugin + key material + relay configuration
Safety stance
Key handling and relay selection are the actual product surface here, not just implementation details.
Verification ritual
Verify relay connectivity, encrypted DM delivery, and one key-rotation or recovery scenario before trusting the lane.
Rollout mode
15–30 min setup
Optional plugin · NIP-04 DM rail
Nostr keeps the lane narrow: encrypted NIP-04 DMs, relay-backed delivery, and sender policy enforced through pubkeys rather than usernames.
Protocol watch
Weak key hygiene or casual relay assumptions can undermine the privacy story the channel is chosen for.
Nostr is not a mainstream bot API lane. It is a protocol-native DM surface where your real operational boundary is the combination of private key custody, relay selection, and OpenClaw DM policy.
If you are deciding whether this channel is the right lane at all, start with the broader “choose an integration posture” guides:
Nostr makes sense when you want OpenClaw to participate in a decentralized messaging environment without relying on a single platform operator.
That gives you a very different tradeoff from Telegram, Slack, or Discord:
That is exactly why Nostr is appealing to some operators and awkward for others. If you want a portable, protocol-level lane for private conversations, it is strong. If you need groups, rich media, or polished platform-side controls, it is not the first channel to start with.
Choose Nostr when the real requirement is a protocol-native DM lane and you are willing to operate it with the same discipline you would apply to infrastructure.
It is strongest when:
pairing or allowlist.Most early Nostr problems are not “the bot is broken.” They come from mixing up three separate layers.
OpenClaw authenticates to Nostr with the channel private key.
That means your operational identity is not a tenant token or bot object. It is the key itself.
privateKey is required.nsec... or 64-character hex.Nostr delivery depends on relay connectivity.
By default, OpenClaw uses:
wss://relay.damus.iowss://nos.lolYou can replace or extend that list, but the official docs recommend restraint:
wss:// for remote relays unless you are deliberately testing locally.Once a DM reaches the Gateway, OpenClaw enforces channel policy.
The official policy modes are:
pairing — default, unknown senders get a pairing code,allowlist — only keys in allowFrom may DM,open — public inbound DMs, which requires allowFrom: ["*"],disabled — ignore inbound DMs.This is the core Nostr operator distinction: relay reachability is not access control. You still need to decide who is allowed to use the bot.
OpenClaw’s current Nostr channel is intentionally narrow.
Supported now:
Planned, not current:
Operationally important MVP limits:
If your content or workflow assumes rooms, threaded group interaction, or file-heavy exchanges, choose another lane first.
For most operators, the clean first deployment is:
dmPolicy: "allowlist" for production or pairing for evaluation.{
channels: {
nostr: {
enabled: true,
privateKey: '${NOSTR_PRIVATE_KEY}',
dmPolicy: 'pairing',
relays: ['wss://relay.damus.io', 'wss://nos.lol'],
},
},
}
If you already know the allowed senders, move to an explicit allowlist:
{
channels: {
nostr: {
privateKey: '${NOSTR_PRIVATE_KEY}',
dmPolicy: 'allowlist',
allowFrom: ['npub1abc...', 'npub1xyz...'],
},
},
}
Why this is a good starting shape:
Nostr is optional and disabled by default.
Install it with:
openclaw plugins install @openclaw/nostr
In development, a local checkout can also be linked:
openclaw plugins install --link <path-to-openclaw>/extensions/nostr
After install or enablement, restart the Gateway.
If you do not already have a Nostr keypair, the official docs suggest generating one with nak:
nak key generate
Then export the private key:
export NOSTR_PRIVATE_KEY="nsec1..."
The official security guidance here is straightforward and worth following literally:
allowlist for production when you can.pairing: best for evaluation and small trusted rolloutspairing is the default. Unknown senders receive a pairing code instead of full access.
That makes it a good fit when:
allowlist: best when ownership is already knownUse allowlist when you already know the exact sender keys that should reach the bot.
Nostr accepts public keys in either format:
npub...This keeps the policy durable and explicit in config.
open: only when you mean public inbound DMsThe official docs require allowFrom: ["*"] for open mode.
That is a meaningful signal: public inbound DMs are not a casual toggle. Use them only when you really want a public-facing bot surface.
Nostr profile data is published as a NIP-01 kind:0 event.
You can manage it through the Control UI or set it in config.
Example:
{
channels: {
nostr: {
privateKey: '${NOSTR_PRIVATE_KEY}',
profile: {
name: 'openclaw',
displayName: 'OpenClaw',
about: 'Personal assistant DM bot',
picture: 'https://example.com/avatar.png',
banner: 'https://example.com/banner.png',
website: 'https://example.com',
nip05: 'openclaw@example.com',
lud16: 'openclaw@example.com',
},
},
},
}
Two operator notes from the official docs matter here:
https://,Profile metadata helps with identity presentation. It does not change who may DM the bot.
Use the simplest possible proof before you broaden the relay set.
npub) from logs.For local protocol testing, the docs also give a relay-first harness using strfry:
docker run -p 7777:7777 ghcr.io/hoytech/strfry
Then point the channel at a local relay:
{
channels: {
nostr: {
privateKey: '${NOSTR_PRIVATE_KEY}',
relays: ['ws://localhost:7777'],
},
},
}
That is useful when you want to separate relay behavior from internet reachability.
The official docs point to three early failure classes.
Check the documented basics first:
wss:// unless you are testing locally,enabled is not false,The official troubleshooting notes focus on outbound relay behavior:
The docs call this out explicitly: duplicate responses are expected risk when multiple relays deliver the same event.
OpenClaw deduplicates by event ID, and only the first delivery should trigger a response.
That is why “more relays” is not automatically “better operations.”
For a production Nostr lane, the restrained posture is usually best:
allowlist over open,If you need a broad, media-rich, group-oriented assistant surface, route that elsewhere and keep Nostr focused on private operator-grade DM exchanges.
Nostr is best when you want:
It is a weaker fit when you need:
That makes it a strong specialized lane rather than the most forgiving day-one channel.
Verification & references
References