Skip to content

Run OpenClaw as your self-hosted personal AI agent ​

OpenClaw is a personal AI assistant that is designed to run on your local device. It connects directly to messaging apps like Discord and Slack, and allows you to interact with it right in the app.

It acts as an "always-on" operator that can execute real tasks, such as searching and sending documents, managing calendars, or browsing web pages.

Learning objectives ​

In this guide, you will learn how to:

  • Install and initialize the OpenClaw environment.
  • Integrate OpenClaw with channels like Discord.
  • Optional: Enable the web search capability.
  • Manage skills and plugins.
  • Manage Olares with your OpenClaw agent.
  • Optional: Enable the sandbox for secure code execution.

Prerequisites ​

Before you begin, you need:

  • An Olares device running Olares 1.12.7 or later, with sufficient disk space and memory.

  • Access to Router for local model connections.

  • Discord account: Required to create the bot application.

  • Discord server: A server where you have permissions to add bots.

  • The following model:

    Model typeModelHow to get it
    ChatQwen3.8-27B (llama.cpp)Install from Market

    Model provider

    This tutorial uses Qwen3.8-27B (llama.cpp) through Router's OpenAI-compatible API. If you use a different provider or local proxy, see the OpenClaw documentation on custom providers.

Optional: Use a different model

Install another chat model from Market, or create a model instance with Engine Base apps. Then select it as the default chat model on Router's Default models page. Clients configured with default-chat use the new default without changing their model settings.

To keep a client on one specific model, use the full model name from Router's How to call this model window instead.

Upgrade notes ​

If you are upgrading an existing OpenClaw installation, review the version-specific changes and troubleshooting steps before proceeding. For more information, see Upgrade OpenClaw.

Install OpenClaw ​

  1. From the Olares Market, search for "OpenClaw".

    Search for OpenClaw from Market

  2. Click Get, and then click Install. When the installation finishes, two shortcuts appear in the Launchpad:

    • OpenClaw CLI: The command line interface
    • Control UI: The graphical dashboard

    OpenClaw entry points

Run multiple OpenClaw agents

Olares supports app cloning. If you want to run multiple independent AI agents for different tasks, you can clone the OpenClaw app. For more information, see Clone applications.

Initialize OpenClaw ​

Run a quick setup for the agent.

Step 1: Get model connection details ​

This tutorial uses Qwen3.8-27B (llama.cpp), a tool-capable model available from Market.

TIP

OpenClaw requires a large "context window" (that is the AI's short-term memory) to handle complex tasks without forgetting your previous instructions. If you are using local models, it is recommended to select a model that natively supports a context window of at least 64K tokens.

How model connections work

On Olares 1.12.7 and later, AI clients connect through Olares Router. Router provides the Base URL and routes default-chat to the model selected on its Default models page.

This guide uses Qwen3.8-27B (llama.cpp) as the default chat model. For connection formats and API key requirements, see Connect AI apps.

  1. Open Router from Launchpad. On Default models, set Qwen3.8-27B (llama.cpp) as the default chat model.

  2. Go to LLM, find Qwen3.8-27B (llama.cpp), and click View connection example on its row.

  3. In How to call this model, select Apps in Olares and copy the Base URL, including /v1.

  4. For the model name, use default-chat.

    Selecting a model in your app

    default-chat is a routing name and does not appear in model lists loaded from Router. If the app you are connecting to Router loads a model list, add default-chat manually. If the app only supports selecting a listed model, select the full model name shown in Router's How to call this model window.

  5. For the API key, leave the field empty. If the app you are connecting to Router requires a value, enter olares.

Step 2: Run onboarding wizard ​

Set up OpenClaw using the step-by-step interactive wizard.

  1. Open the OpenClaw CLI app from the Launchpad.

  2. Enter the following command to start the interactive onboarding wizard:

    bash
    openclaw onboard --classic

    Do not run openclaw onboard

    Do not run openclaw onboard on its own. It launches a conversational TUI that requires an API key configured in the environment variables. Since no API key is configured there, this path is unusable. For the interactive wizard, use openclaw onboard --classic instead.

    If you accidentally entered the TUI, type /quit and press Enter to exit.

  3. The wizard guides you through a series of steps. Use the arrow keys to navigate and press Enter to confirm.

    Note on configurations

    To get you started quickly, this tutorial skips several advanced settings in the wizard. You can configure or modify them later.

    SettingsOption
    Personal-by-default acknowledgmentSelect Yes.
    Help make OpenClaw betterSelect as needed.
    Select QuickStart.
    Model/auth providerSelect Custom Provider.
    API Base URLPaste the Router Base URL from Step 1, including /v1.
    How do you want to provide this API key?Select Paste API key now if this prompt appears.
    API Key (leave blank if not required)Leave blank for this app in Olares.
    Endpoint compatibilitySelect OpenAI-compatible.
    Model IDEnter default-chat. The wizard may verify the endpoint before continuing.
    Endpoint IDEnter router. The model reference is router/default-chat.
    Model alias (optional)Leave blank.
    Does this model support image input?If prompted, select Yes for Qwen3.8-27B (llama.cpp). For another model, check its capabilities in Router.
    Test AI access now with a live completionSelect Yes.
    The message AI access works indicates that OpenClaw can successfully connect to the model.
    Remaining settings (channels, search provider,
    and skill dependencies)
    Select Skip for now.
    You can configure them later.

    Once you complete the onboarding wizard, OpenClaw opens the Terminal User Interface (TUI) automatically.

    If the TUI opened by onboarding reports HTTP 403

    In OpenClaw 2026.9.6, the wizard can open the TUI using the container's LAN address. With the Olares proxy configuration, this connection can fail with proxy_attribution_required even though the model is configured correctly.

    Enter /quit to leave that TUI, then run openclaw tui in the same OpenClaw CLI terminal. Check that the heading shows ws://127.0.0.1:18789. This local connection uses the existing configuration and credentials. For this specific error on the onboarding path, you do not need to add gateway.remote.edgeAuth or change the mobile Gateway URL.

    OpenClaw TUI after setup

  4. Type /quit and press Enter to exit.

  5. Keep the OpenClaw CLI window open. You need it in the next step.

Step 3: Pair device ​

Connect the Control UI to the OpenClaw CLI to use the graphical dashboard.

Step 4: Personalize OpenClaw ​

To make your OpenClaw bot more personalized, it is highly recommended to complete the persona setup process.

This process establishes the agent's identity, behavioral boundaries, and long-term memory through persona files. These files keep your agent's behavior consistent across all platforms and channels.

  1. In the chat area, ensure your model is selected.

    The indicator in the bottom-right corner (for example, default-chat · Off) shows the current model and reasoning status. Off means reasoning is disabled, not that the model is unavailable.

  2. (Optional) Enable reasoning.

    By default, reasoning is off for faster responses. To enable or adjust it, drag the Effort slider to an appropriate position between Faster and Smarter.

    Model selection panel

  3. Type and send a simple message to start. For example:

    text
    Wake up please!
  4. The agent responds and starts interviewing you. You can establish rules, personality traits, and preferences. For example:

    text
    - Call me Bella. I like simple language without technical jargon and 
    concise bulleted answers.
    - You are John, a witty assistant who uses emojis.
    - Never access my calendar without asking first, and never execute any 
    financial operations.
  5. As you chat with the agent, the agent writes your preferences to its core persona files, such as IDENTITY.md, USER.md, and SOUL.md.

  6. (Optional) If the agent fails to update the persona files, explicitly instruct it to do so in the chat.

    If the issue persists, resolve it using one of the following methods:

    • Check the context window: Read the configured context size in Router. In Files, open Data > clawdbot > config > openclaw.json and set contextWindow to a value supported by the engine. For example, if Engine args shows -c 104448, use no more than 104448.

      TIP

      Changing contextWindow in OpenClaw does not increase the engine's context capacity. If you need a larger context, first configure the engine in Router for a value that the model and hardware support, then update the client.

    • Change the model: Switch to a model with better tool-calling and instruction-following capabilities.

  7. Continue the conversation until the agent gathers enough information.

  8. Verify that the persona files were successfully updated:

    a. Open the Files app from the Launchpad.

    b. Go to Data > clawdbot > config > workspace.

    c. Check the modified time of the .md files to identify which ones were recently updated, such as USER.md, IDENTITY.md, and SOUL.md.

    Persona files generated by OpenClaw

    d. (Optional) Download a file to view it in a supported text editor, and verify that it contains your newly established rules, such as your name, language style, and restrictions.

    e. If the temporary BOOTSTRAP.md file exists, delete it.

    Modify persona settings

    To change these settings in the future, use one of the following methods:

    • Ask the agent in the chat to update its rules.
    • Download the .md files from this folder, edit them in a text editor, and re-upload them to overwrite the old ones.

Next steps ​

  1. Integrate with Discord to chat with your agent remotely.
  2. Enable web search to give your agent access to the live internet information.
  3. Install skills and plugins to enhance your agent's capabilities.
  4. Connect using OpenClaw mobile clients using QR or manual pairing over LarePass VPN.

Troubleshooting and FAQs ​

Find solutions to common errors and behavioral issues in Common issues.

Learn more ​