An OpenClaw plugin that enables encrypted messaging via Keybase.
- Direct Messages: Send and receive encrypted DMs
- Team Channels: Support for Keybase team channels
- Multi-account: Configure multiple Keybase bot accounts
- Pairing Flow: Secure user approval system
- Allowlists: Control who can message your bot
- Mention Gating: Configure when bot responds in groups
- Keybase account - Create one at https://keybase.io for your bot
- Paper key - Generate from Settings > Devices > Add a device > Paper key
- Keybase binary - Install from https://keybase.io/download and ensure it's on your
PATH
Install via the OpenClaw CLI:
openclaw plugins install @ephb/openclaw-keybaseOr install from a local checkout:
openclaw plugins install ./path/to/openclaw-keybase-plugin{
channels: {
keybase: {
enabled: true,
username: "mybot",
paperkey: "word1 word2 word3 word4 word5 word6 word7 word8",
dm: { policy: "pairing" },
},
},
}{
channels: {
keybase: {
enabled: true,
username: "mybot",
paperkeyFile: "/run/secrets/keybase-paperkey",
dmPolicy: "pairing",
},
},
}Alternatively, you can use environment variables:
KEYBASE_USERNAME- Bot usernameKEYBASE_PAPERKEY- Paper key for loginKEYBASE_BINARY- Path tokeybasebinary if not onPATH
{
channels: {
keybase: {
accounts: {
work: {
username: "workbot",
paperkeyFile: "/run/secrets/keybase-work",
dmPolicy: "allowlist",
allowFrom: ["colleague1"],
},
personal: {
username: "personalbot",
paperkeyFile: "/run/secrets/keybase-personal",
dmPolicy: "pairing",
},
},
},
},
}| Policy | Behavior |
|---|---|
"pairing" (default) |
Unknown senders get a pairing code; approve via openclaw pairing approve |
"allowlist" |
Only usernames in allowFrom can DM |
"open" |
Anyone can DM (requires allowFrom: ["*"] as safety confirmation) |
"disabled" |
DMs are silently dropped |
| Policy | Behavior |
|---|---|
"allowlist" (default) |
Only teams listed in teams are monitored |
"open" |
All team channels the bot can see are monitored |
"disabled" |
Team channel messages are silently dropped |
Keybase targets used in routing and openclaw message send:
| Type | Format | Example |
|---|---|---|
| DM | <username> or user:<username> |
alice |
| Team channel | <team>#<channel> or team:<team>#<channel> |
myteam#general |
After installation and configuration:
openclaw plugins enable keybase
openclaw channels status --probeCommon issues:
- "keybase: command not found" - The
keybasebinary is not onPATH. Install it or setchannels.keybase.keybasePath. - "need username and paperkey" - Both
usernameand a paper key source are required. - Bot not responding in teams - Check
groupPolicyandteamsconfig. - Bot not responding to DMs - Check
dmPolicyandallowFrom. - Paper key rejected - Ensure the full key is provided without extra whitespace.
MIT
Contributions are welcome! Please open an issue or pull request on GitHub.