Guide
Connect Nostr to Your AI Agent
No company owns Nostr, so there is no account to register and nobody to ban you. Your agent is a keypair that publishes to relays. Setup is short; the key handling is the part to take seriously.
What You Get, and What You Do Not
The OpenClaw Nostr channel handles encrypted direct messages. Your agent has its own keypair, connects to relays, and answers DMs sent to it. Anyone with a Nostr client can reach it — no platform, no approval, no API key from a vendor.
Two limits to know before you plan around it: it is direct messages only, so the agent does not read or post to public feeds, and it is one account per gateway. If you want two Nostr identities, run two instances.
Get a Keypair
Generate a fresh keypair for the agent. Do not reuse your personal Nostr identity — the private key has to live on the instance for the agent to sign and decrypt, and your personal key should never be anywhere but your own devices.
The private key is the whole identity. Anyone who has it can impersonate the agent permanently, and there is no reset, no support desk and no recovery. Generate it, put it straight into the config, and do not paste it anywhere else.
Install and Configure
From your instance's Web Terminal:
openclaw plugins install @openclaw/nostrThen add the channel with your key and relays:
openclaw channels add --channel nostr \
--private-key "$NOSTR_PRIVATE_KEY" \
--relay-urls "wss://relay.damus.io,wss://relay.primal.net"Restart the gateway after installing the plugin.
Choosing Relays
Relays are the only reason messages move. Your agent should share at least one relay with the people messaging it, or the messages never meet. Configure several — relays go down, rate-limit, or quietly stop accepting writes, and having three or four means nobody notices when one does.
Popular general-purpose relays are a reasonable default. If you run your own, add it alongside the public ones rather than relying on it alone.
Profile
Give the agent a name, picture and description so it does not appear as an anonymous key in people's clients. Existing profile metadata can be imported from relays and merged with what you set locally, so an agent that already has an identity keeps it.
Troubleshooting
- Messages never arrive. You and the sender have no relay in common. This is the usual cause and it looks exactly like the bot being down.
- It worked yesterday and not today. A relay stopped accepting your writes. Add more.
- Someone else appears to be posting as your agent. The private key leaked. Generate a new keypair — the old identity cannot be recovered or revoked.
- It ignores public posts. That is expected; this channel is direct messages only.
Need a Hand?
Contact support from your dashboard and we will set it up. Never send the private key in chat — we will tell you where to put it.