#Sudo permission on Telegram

1 messages Β· Page 1 of 1 (latest)

vivid falcon
#

How can I give sudo permission to OpenClaw through Telegram in my Mac Mini with Linux?

vivid falcon
#

If you want to run sudo commands and execute scripts without constantly clicking "Approve" in the UI, follow this 3-step recipe:

  1. Enable Elevated Tool in Config
    Edit your ~/.moltbot/moltbot.json (or ~/.openclaw/openclaw.json) to allow elevated access from Telegram:

"tools": {
"elevated": {
"enabled": true,
"allowFrom": {
"telegram": true
}
}
}

  1. Configure Passwordless Sudo (OS Level)
    Since the bot can't type a password interactively, you must allow the user running the bot to use sudo without it.
    Run sudo visudo and add this line at the very end:

your_user ALL=(ALL) NOPASSWD: ALL

  1. Activate "Full Mode" in Chat
    Restart the gateway (moltbot gateway restart). Then, in your Telegram chat, send the magic command:

/elevated full