packages/docs/plugin-registry/platform/nostr.md
The Nostr plugin connects Eliza agents to the Nostr network, enabling note publishing, relay connectivity, and NIP-04 encrypted direct messages.
Package: @elizaos/plugin-nostr
eliza plugins install @elizaos/plugin-nostr
Use any Nostr client or key generation tool to create a keypair. You need the private key (nsec or hex format).
{
"env": {
"NOSTR_PRIVATE_KEY": "nsec1your_private_key"
},
"connectors": {
"nostr": {
"enabled": true
}
}
}
{
"env": {
"NOSTR_RELAYS": "wss://relay.damus.io,wss://nos.lol,wss://relay.nostr.band"
}
}
| Variable | Required | Default | Description |
|---|---|---|---|
NOSTR_PRIVATE_KEY | Yes | — | Private key for signing events (nsec or hex) |
NOSTR_RELAYS | No | — | Comma-separated relay URLs |
NOSTR_DM_POLICY | No | — | DM policy: allow, deny, or allowlist |
NOSTR_ALLOW_FROM | No | — | Comma-separated allowed public keys |
NOSTR_ENABLED | No | true | Enable or disable the connector |
The plugin auto-enables when the connectors.nostr block contains token, botToken, or apiKey. Environment variables alone do not trigger auto-enable. To use env-based config with auto-enable, include "token": "placeholder" in the connector config, or add the plugin to plugins.allow explicitly.