#Need help setting up OpenClaw + Ollama (Gemma 3:27b)

1 messages ยท Page 1 of 1 (latest)

distant spireBOT
#

Hey yuan! Welcome to the OpenClaw community! ๐Ÿฆž Don't worry โ€” you're not alone, and this is totally doable. Let me walk you through this step by step.

Step 1: Connect OpenClaw to Ollama

Since you're running both on the same MacBook, this is the simplest setup:

Option A: Quick environment variable method

export OLLAMA_API_KEY="ollama-local"

Option B: In your config file (run these commands):

# Set the API key
openclaw config set models.providers.ollama.apiKey "ollama-local"
#
# Set your default model (gemma3:27b)
openclaw config set agents.defaults.model.primary "ollama/gemma3:27b"

Then restart your gateway:

openclaw gateway restart

Verify it's working:

openclaw models list

You should see your ollama/gemma3:27b model listed!


#

Step 2: Set Up Your Daily Briefing (Morning Coffee โ˜•๏ธ)

Here's the cron command to send you a news summary every morning at 7 AM:

For Discord:

openclaw cron add \
  --name "Morning News Brief" \
  --cron "0 7 * * *" \
  --tz "Europe/Vienna" \
  --session isolated \
  --message "Search for the latest tech/news headlines from the past 24 hours. Summarize the top 5 stories in a concise, easy-to-read format for my morning coffee. Include the source and a 1-sentence key takeaway for each." \
  --deliver \
  --channel discord \
  --to "channel:YOUR_CHANNEL_ID_HERE"
#

For Telegram:

openclaw cron add \
  --name "Morning News Brief" \
  --cron "0 7 * * *" \
  --tz "Europe/Vienna" \
  --session isolated \
  --message "Search for the latest tech/news headlines from the past 24 hours. Summarize the top 5 stories in a concise, easy-to-read format for my morning coffee. Include the source and a 1-sentence key takeaway for each." \
  --deliver \
  --channel telegram \
  --to "YOUR_CHAT_ID_HERE"

Quick Tips

#
  1. Find your Discord channel ID: Enable Developer Mode in Discord โ†’ Right-click channel โ†’ "Copy ID"
  2. Find your Telegram chat ID: Message @userinfobot on Telegram or check your OpenClaw logs
  3. Test first before scheduling: Try a one-minute test:
    openclaw cron add --name "Test" --at "1m" --session isolated --message "Hello from OpenClaw!" --deliver --channel discord --to "channel:YOUR_ID"
    
  4. List your cron jobs:
    openclaw cron list
    

Need More Power?

If gemma3:27b is a bit slow for summarization tasks, you might also try:

  • llama3.3 (very capable, good speed)
#
  • qwen2.5-coder:32b (excellent reasoning, faster than you'd expect)

Your M1 Pro 32GB can handle these easily! ๐Ÿ’ช

Give it a try and let me know where you get stuck โ€” happy to help you get that morning coffee ritual sorted! ๐Ÿฆ