Self-Host Clawra With OpenClaw on a Mac mini
guide2026-06-069 min read
Clawra is most useful when treated as an OpenClaw agent stack: a gateway, a chat channel, a model provider, a selfie skill, and a small set of local files that define memory and personality.
openclawclawratelegramfal-ai
Summary
This setup runs a Clawra-style AI companion on a remote Mac mini through OpenClaw Gateway. Telegram is the user-facing chat surface, an OpenAI-compatible provider answers text messages, and fal.ai generates selfies from Clawra’s reference image. The important distinction is that the AI girlfriend experience is not a single hosted product. It is a composition of local gateway state, model routing, channel configuration, persona files, and a selfie skill.What This Solves
The goal is to self-host the “Clawra” experience instead of relying on a hosted Claw Friend-style website. The final working shape is:- OpenClaw Gateway running as a macOS LaunchAgent on a Mac mini.
- Telegram bot as the private chat interface.
- An OpenAI-compatible LLM provider for normal conversation.
SumeLabs/clawrainstalled as theclawra-selfieskill.- fal.ai used for reference-image-based selfie generation.
- Local state stored under
~/.openclaw.
Who This Is For
This is for someone who wants to run a personal AI companion on their own Mac mini or always-on Mac instead of using a hosted app. It assumes comfort with SSH, Node, Telegram bots, API keys, and command-line validation. It is also for future debugging: if Clawra replies to text but cannot send pictures, the failure is probably not the LLM. It is usually the skill/tool exposure path or the image provider path.Prerequisites
- A remote Mac mini reachable over SSH.
- Node 24, or at least Node 22.19+.
- OpenClaw installed globally.
- A Telegram bot created through BotFather.
- An OpenAI-compatible chat provider with
baseUrl,apiKey, and model id. - A fal.ai API key for image generation.
- Enough disk for logs, sessions, generated artifacts, and future memory indexes.
In this deployment, the OpenClaw state directory was small: roughly tens of megabytes, with session logs under one megabyte at the time of testing. The Mac mini had enough room for OpenClaw itself, but the overall disk was already fairly full, so long-term image storage and logs should still be monitored.
The Workflow
Install OpenClaw on the Mac mini
Install a current Node runtime, then install OpenClaw globally and configure the gateway as a macOS LaunchAgent.Validate that the gateway is running locally:The gateway should bind to loopback, usually
127.0.0.1:18789, so it is usable on the Mac but not exposed as a public web service.Configure the language model
The text side of Clawra is backed by the configured OpenClaw primary model. In this run, the active model was an OpenAI-compatible provider row:The provider used an OpenAI-compatible base URL and the
openai-completions adapter. That is what answers ordinary Telegram messages.Validate model auth and routing:Configure Telegram as the private chat surface
Add the Telegram bot token to OpenClaw and keep it in polling mode. Polling avoids needing a public webhook URL.Security matters here. During debugging, an open DM policy is convenient, but the final state should allow only the intended Telegram user:Check the live channel:
Install the Clawra selfie skill
The Clawra repository is a skill that gives OpenClaw a selfie workflow. It can be installed through the package installer or cloned manually.Manual fallback:Enable the skill with the fal.ai key:
Teach the agent when to use selfies
OpenClaw uses workspace files as durable context. The Clawra behavior belongs in This is not vector memory. It is durable persona and instruction memory: the system reads it when building the agent prompt.
~/.openclaw/workspace/SOUL.md.Understand how selfies are generated
The installed Clawra skill uses a fixed reference image:When the user asks for a selfie, the intended flow is:The fal.ai model used by the skill is the xAI Grok Imagine edit endpoint through fal:This means Clawra’s appearance is not inferred from chat history. It is anchored by the reference image. To customize her appearance, replace the reference image URL or adapt the skill to upload and use a custom portrait.
Validate the actual end-to-end behavior
A good test plan has separate checks for gateway, model, channel, and image generation:Then send normal messages to the bot. A text reply proves the LLM and Telegram path work. A selfie reply proves the skill, fal.ai, media sending, and Telegram delivery all work.
How Memory Works
There are three different things people often call “memory” in this setup. First, there is session history. OpenClaw stores conversations under the agent session directory:SOUL.md, because it tells the agent that it is Clawra and when to use selfies.
Third, there is semantic memory search. OpenClaw has memory search commands, but in this setup semantic recall was not fully active because the configured memory search provider expected an OpenAI API key that was not present.
That means the current setup has session logs and persistent persona files, but not a fully configured long-term semantic memory index. It can remember through files and session state, but it is not yet a complete “automatically remember everything I said forever” system.
What It Can Do Well
This setup is already good at several practical companion-agent workflows:- Private Telegram chat through a self-hosted gateway.
- Chinese or English conversation through the configured OpenAI-compatible LLM.
- Persistent persona through
SOUL.md. - Reference-image-based selfies through fal.ai.
- Manual media sending through OpenClaw’s message API.
- A local-first architecture where state lives under
~/.openclaw. - LaunchAgent persistence so the gateway comes back after restart.
- Custom appearance by changing the reference image.
- More robust long-term memory by configuring OpenClaw memory search correctly.
- Better image model routing by adding a real image provider profile.
- Scheduled check-ins or reminders through OpenClaw cron and messaging tools.
- Multi-channel companions through Discord, Slack, WhatsApp, or other supported channels.
Common Failure Modes
Final Checklist
-
openclaw gateway status --deepshows the LaunchAgent loaded and the gateway listening on loopback. -
openclaw models status --probesucceeds for the primary chat model. -
openclaw channels status --channel telegram --jsonshows Telegram running. - Telegram
dmPolicyis not open to everyone. -
clawra-selfieis enabled and has access toFAL_KEY. -
SOUL.mdtells the agent when to use the selfie skill. - A normal Telegram message gets a text reply.
- A direct fal.ai image edit can generate an image from the Clawra reference image.
- A media message can be sent with
openclaw message send. - Long-term semantic memory is either configured intentionally or explicitly treated as not enabled yet.
What To Remember
Clawra is not one magic service. It is a gateway plus a persona plus a chat channel plus a model plus an image skill. When something fails, split the problem into those layers. For text, check the LLM provider. For Telegram, check polling and allowlists. For selfies, check fal.ai and the reference image. For “memory”, distinguish session logs, durable workspace files, and semantic recall.Metadata
Quick Reference
Typeguide
Statuspublished
Date2026-06-06
Retrieval Tags
openclawclawratelegramfal-aiself-hosting
Related
Self-Hosted AI InfrastructureAgent MemoryTelegram Bots