#Clawdbot in Docker compose

1 messages Β· Page 1 of 1 (latest)

tropic igloo
#

using official docker compose, being able to chat with my clawdbot, works awesome, mananged persistant storage, but fail to add stuff like "remind me in 10 minutes" -> it complains "clawdbot-cli not installed"

keen runeBOT
#

To help others find answers, you can mark your question as solved via Right click solution message -> Apps -> βœ… Mark Solution

serene jacinthBOT
#

The "clawdbot-cli not installed" error in Docker usually happens because the cron tool needs proper access to the Gateway. Here's how to fix it:

Quick check first: Make sure your clawdbot-cli service is defined in your docker-compose.yml. The official compose file includes both clawdbot-gateway and clawdbot-cli services.

Option 1 - Run CLI commands via Docker:

docker compose run --rm clawdbot-cli cron add \
  --name "Reminder" \
  --at "10m" \
  --session main \
  --system-event "Reminder: your message here" \
  --wake now

Option 2 - Use the cron tool through the agent:
The agent's cron tool should work without the CLI installed. If it's failing:

  1. Check that cron.enabled: true is in your config
#
  1. Verify the Gateway is running: docker compose ps
  2. Check Gateway logs: docker compose logs clawdbot-gateway

For natural language reminders ("remind me in 10 minutes"):
The agent should handle this automatically via the cron tool. If it's not working, the agent might not have the cron tool enabled, or there's a connection issue to the Gateway.

Can you share:

  1. Your docker-compose.yml (or which template you're using)?
  2. The exact error message you see?

This will help pinpoint whether it's a config issue or something else. 🦐

tropic igloo
#

services:
clawdbot-gateway:
image: ${CLAWDBOT_IMAGE:-clawdbot:local}
environment:
HOME: /home/node
TERM: xterm-256color
CLAWDBOT_GATEWAY_TOKEN: ${CLAWDBOT_GATEWAY_TOKEN}
CLAUDE_AI_SESSION_KEY: ${CLAUDE_AI_SESSION_KEY}
CLAUDE_WEB_SESSION_KEY: ${CLAUDE_WEB_SESSION_KEY}
CLAUDE_WEB_COOKIE: ${CLAUDE_WEB_COOKIE}
volumes:
- ${CLAWDBOT_CONFIG_DIR}:/home/node/.clawdbot
- ${CLAWDBOT_WORKSPACE_DIR}:/home/node/clawd
ports:
- "${CLAWDBOT_GATEWAY_PORT:-18789}:18789"
- "${CLAWDBOT_BRIDGE_PORT:-18790}:18790"
init: true
restart: unless-stopped
command:
[
"node",
"dist/index.js",
"gateway-daemon",
"--bind",
"${CLAWDBOT_GATEWAY_BIND:-lan}",
"--port",
"${CLAWDBOT_GATEWAY_PORT:-18789}"
]

clawdbot-cli:
image: ${CLAWDBOT_IMAGE:-clawdbot:local}
environment:
HOME: /home/node
TERM: xterm-256color
BROWSER: echo
CLAUDE_AI_SESSION_KEY: ${CLAUDE_AI_SESSION_KEY}
CLAUDE_WEB_SESSION_KEY: ${CLAUDE_WEB_SESSION_KEY}
CLAUDE_WEB_COOKIE: ${CLAUDE_WEB_COOKIE}
volumes:
- ${CLAWDBOT_CONFIG_DIR}:/home/node/.clawdbot
- ${CLAWDBOT_WORKSPACE_DIR}:/home/node/clawd
stdin_open: true
tty: true
init: true
entrypoint: ["node", "dist/index.js"]

serene jacinthBOT
# tropic igloo services: clawdbot-gateway: image: ${CLAWDBOT_IMAGE:-clawdbot:local} e...

Ah, I see your docker-compose.yml - you have both services defined correctly! The issue is likely that the agent is trying to spawn clawdbot-cli as a subprocess on the host, which doesn't exist there.

Here's the problem: When the agent runs cron add, it should call the Gateway API directly. If it's trying to run clawdbot-cli cron add as a shell command, that won't work in Docker.

Solution - Run the cron command via Docker:

docker compose run --rm clawdbot-cli cron add \
  --name "Test Reminder" \
  --at "10m" \
  --session main \
  --system-event "Reminder: test message" \
  --wake now

If the agent should handle reminders automatically:

  1. Check if the agent has the cron tool available
  2. Verify cron.enabled: true in your config (in ~/.clawdbot/clawdbot.json)
#
  1. Check Gateway logs: docker compose logs clawdbot-gateway

For a Docker-specific setup, you might want to add a wrapper script to your host that calls the CLI via Docker. Create /usr/local/bin/clawdbot:

#!/bin/bash
docker compose -f /path/to/your/docker-compose.yml run --rm clawdbot-cli "$@"

Then chmod +x /usr/local/bin/clawdbot and the agent can use clawdbot cron add ... normally.

Does that help? 🦐

tropic igloo
#

I'm inside Docker β€” docker command isn't available here. Run this outside Docker on your host:
docker compose run --rm clawdbot-cli cron add
--name "11A departures"
--at "11:00"
--session main
--system-event "Check 11A departures to Friedrich-Engels-Platz"
--wake now

but i need it to run inside docker, and i'd like to schedule stuff without installing clawdbot outside docker

serene jacinthBOT
# tropic igloo I'm inside Docker β€” docker command isn't available here. Run this outside Docker...

Got it - you're running inside a container and don't have Docker CLI access there. The issue is the agent is trying to spawn clawdbot-cli as a subprocess instead of using the built-in cron tool.

Quick fix - exec into the gateway container:
From your host, run commands inside the gateway container:

docker compose exec clawdbot-gateway node dist/index.js cron add \
  --name "Reminder" \
  --at "10m" \
  --session main \
  --system-event "Your reminder message" \
  --wake now

Or use the CLI container:

docker compose run --rm clawdbot-cli cron add \
#
  --name "Reminder" \
  --at "10m" \
  --session main \
  --system-event "Your reminder message" \
  --wake now

For the agent to handle reminders automatically:
The agent should use its built-in cron tool (which calls the Gateway API directly) rather than spawning subprocesses. If it's failing, check:

  1. Is the Gateway reachable from the agent? (Should be ws://127.0.0.1:18789)
  2. Is the cron tool enabled for the agent?
  3. Check agent logs for the actual error

Mount Docker socket (if you really need docker inside docker):
Add to your clawdbot-gateway service:

#
volumes:
  - /var/run/docker.sock:/var/run/docker.sock

Then from inside the container you could run docker commands, but this has security implications.

Which approach works best for your setup? 🦐

tropic igloo
#

ahhh i see my tools in json config "tools": {},

#

is empty

serene jacinthBOT
# tropic igloo ahhh i see my tools in json config `"tools": {},`

Found it! πŸŽ‰

An empty "tools": {} means no tools are enabled. Remove it entirely or configure it properly:

Option 1 - Remove the tools section (use defaults):

// Delete this line or leave it out entirely
"tools": {},

Option 2 - Enable specific tools including cron:

{
  "tools": {
    "allow": ["cron", "read", "write", "message", "exec"]
  }
#
}

Option 3 - Enable all tools:

{
  "tools": {
    "allow": []
  }
}

With allow: [] (empty array), all tools are available. With allow: ["cron", ...], only those specific tools work.

After updating, restart the gateway:

#
docker compose restart clawdbot-gateway

Then try "remind me in 10 minutes" again - it should work! 🦐

#

Yes, empty {} means no tools are allowed. That's why cron isn't working!

Fix: Either delete the "tools": {}, line entirely OR change it to:

{
  "tools": {
    "allow": []
  }
}

Empty allow array = all tools enabled. Then restart the gateway and reminders will work. 🦐

tropic igloo
#

wtf: list available tools

Available tools I can use:

Category Tools
Files read, write, edit
Shell bash, exec
Docker process (manage background exec)
Browser browser (control web browser)
Canvas canvas (node canvases)
Nodes nodes (paired node control)
Cron cron (schedule wake events)
Messaging message (send messages, polls, reactions)
Sub-agents sessions_spawn, sessions_send, sessions_history, sessions_list
Status session_status
Image image (analyze images)
Memory memory_search, memory_get
WhatsApp whatsapp_login
Gateway gateway (restart/config/updates)
Skills available:

β€’ discord, slack, github, notion, session-logs, weather, anachb βœ“
What's NOT available in this session:

β€’ docker command (I'm inside Docker)
β€’ clawdbot CLI commands directly
Want me to test a specific tool? πŸ”§

now you have cron!

Still unauthorized β€” the cron tool needs an authorized gateway connection which isn't available in my current session....

serene jacinthBOT
#

Then restart the gateway:

docker compose restart clawdbot-gateway

Verify from inside the container:

docker compose exec clawdbot-gateway cat /etc/hosts | grep clawdbot

If that doesn't work, you may need to add extra_hosts to your compose file so containers can resolve each other by name:

services:
  clawdbot-gateway:
    extra_hosts:
#
      - "host.docker.internal:host-gateway"

Try the gateway URL fix first - that's the most common issue in Docker setups! 🦐

tropic igloo
#

it used to work πŸ™ but i am fucked now!

serene jacinthBOT
# tropic igloo it used to work πŸ™ but i am fucked now!

Don't panic! Let's debug this step by step.

Quick diagnostics - run these from your host:

  1. Check if gateway is running:
docker compose ps
  1. Check gateway logs for errors:
docker compose logs clawdbot-gateway --tail 50
  1. Test if the agent container can reach the gateway:
#
docker compose exec clawdbot-gateway wget -qO- http://localhost:18789/health 2>/dev/null || echo "Gateway not responding"
  1. Check your current gateway URL in config:
grep -A2 '"gateway"' ~/.clawdbot/clawdbot.json

What probably happened:

  • When you edited tools: {}, you might have accidentally modified or corrupted another part of your config
  • Or the Gateway restarted with a different configuration

Quick fix - reset just the gateway URL:

{
#
  "gateway": {
    "url": "ws://127.0.0.1:18789"
  }
}

Then restart:

docker compose restart clawdbot-gateway

What do you see when you run the diagnostics above? 🦐

tropic igloo
#

gimme a prompt for a agent to work on checkout

serene jacinthBOT
# tropic igloo gimme a prompt for a agent to work on checkout

Here's a system prompt for a checkout assistant agent:


Checkout Assistant System Prompt:

You are a helpful checkout assistant for an e-commerce store. Your role is to:

**Core Responsibilities:**
- Guide customers through the checkout process
- Help with payment issues and troubleshooting
- Answer questions about shipping, returns, and policies
- Assist with promo codes and discounts
- Handle order modifications and cancellations
#
**Guidelines:**
- Be friendly, patient, and professional
- Keep responses concise - customers want to checkout fast
- Ask clarifying questions when needed
- If you can't resolve an issue, escalate to a human agent

**Checkout Flow:**
1. Verify cart items and quantities
2. Confirm shipping address
3. Select shipping method
4. Apply promo codes (if any)
5. Process payment
6. Confirm order details
7. Provide order confirmation number