This article explains how you can set up ClawBot locally using LM Studio and run it on your own machine without relying on paid APIs.
By connecting ClawBot to LM Studio, you can use local AI models to test and perform basic development tasks while keeping everything private and under your control.
Since everything runs on your own machine, you get full control and privacy over your data. I tested this setup myself and it works well for experimentation and learning.
Quick Reminder:
- This setup is mainly for testing and basic tasks.
- Running AI models locally requires a decent system with good CPU or GPU performance.
- You should have at least 16 GB RAM (32 GB recommended for smoother performance).
- For complex tasks, a system with strong GPU or higher CPU power will work much better.
- The setup is completely free, but remember that the model runs on your own system resources.
Before starting, it’s important to understand the limitations and requirements of running everything locally.
Minimum Hardware (Basic Setup)
This will run 7B models like Qwen2.5-Coder-7B-Instruct.
- CPU: modern 4–6 core CPU (Intel i5 / Ryzen 5 or better)
- RAM: 16 GB recommended
- Storage: 10–20 GB free space
- GPU: optional (can run on CPU)
Performance:
- speed: ~5–10 tokens/sec on CPU
- usage: good for chat and testing agents
Recommended Hardware (Smooth Experience)
For faster inference and multiple tools.
- CPU: 8+ core processor (Ryzen 7 / i7)
- RAM: 32 GB
- GPU: 8–12 GB VRAM (RTX 3060 / 4060 / 4070)
- Storage: SSD required
Performance:
- speed: 20–60 tokens/sec
- latency: much lower
- agent tasks: smoother
Step By Step Guide
Phase-1 — Install LM Studio
LM Studio runs the local model.
-
Go to the official website
Download LM Studio for Windows
Install normally.
Open LM Studio
Phase-2 — Download a model
Inside LM Studio:
Left sidebar -> Model Search (4th icon)
Example search:
Qwen2.5-Coder-7B-Instruct
NOTE: Just above the download button you can select the Quantization of the model
Step-2.1: How to select the Right Model
Selecting the best model in LM Studio depends on several technical factors: hardware capacity, task type, model size, and quantization.
1. Check Your Hardware First:
Your RAM and GPU VRAM determine what models can run efficiently.
Typical guidelines:
| Hardware | Recommended Model Size |
|---|---|
| 8 GB RAM | 3B–4B models |
| 16 GB RAM | 7B–8B models |
| 32 GB RAM | 13B models |
| 64 GB RAM | 30B+ models |
Meaning of the “B”
B = Billion
Examples:
7B = 7 Billion parameters
6.7B = 6.7 Billion parameters
34B = 34 Billion parameters
70B = 70 Billion parameters
So a 7B model has about 7,000,000,000 parameters.
Example Model Sizes
Small models
1B – 3B
Fast but weaker reasoning
Medium models
7B – 8B
Good balance of speed and intelligence
Large models
13B – 34B
Much smarter but need strong hardware
Very large models
70B+
Need powerful GPUs or servers
2. Choose Model Based on Task
Different models are trained for different tasks.
Coding
Best model types:
Qwen2.5-Coder
DeepSeek-Coder
CodeLlama
Content Writing / Chat
Llama 3.1
Mistral
Qwen2.5
Reasoning / Agents
DeepSeek-R1 Distill
Qwen2.5
Ministral
3. Pick the Right Quantization
Quantization controls memory usage vs quality.
Common options:
| Quantization | Quality | RAM Usage |
|---|---|---|
| Q2 | low | very small |
| Q3 | medium-low | small |
| Q4_K_M | good | moderate |
| Q5_K_M | very good | higher |
| Q6/Q8 | near original | large |
Best default choice:
Q4_K_M
- quality: very good
- speed: fast
- memory: manageable
4. Choose Trusted Model Publishers
The same model can appear from multiple uploaders.
Prefer models published by:
Llama family
Qwen family
Mistral family
DeepSeek family
Phase-3 — Load the Model
In the server panel click:
Load Model
Select your downloaded model.
Once loaded you should see it listed under:
Loaded Models
NOTE: Must enable (Manually choose model load parameters)
Put context length low as possible because it will affect response time.
- Low context length → Fast response but loose accuracy
- high context length → Slow response but high accuracy
- GPU offloading decides how many of those layers run on the GPU instead of the CPU.
If your system has no GPU, set:
GPU Offload = 0
If GPU offload = 0 layers: CPU does all calculations.
LLMs are built with layers (like 32–40 layers depending on the model).
Example:
Total layers in model = 32
If you set:
GPU Offload = 10
Then:
10 layers → GPU
22 layers → CPU
So the workload is shared.
Phase-4 — Start LM Studio Local API Server
1. Open LM Studio
Launch LM Studio on your computer.
2. Open Developer Settings
Look at the left sidebar: usually ****(third icon from the top)
In your sidebar click the icon that looks like:
>_
This is the Developer / API panel.
3. Open the Local Server Panel
first option in in Developer sidebar
4. Keep Server Setting like this
5. Start the Server
Click:
toggle the button before server setting
You should see:
Server running at URL comes next to it check it.
Open browser:
http://localhost:1234/v1/models
or
http://172.25.64.1:1234/v1/models
If you see JSON with your model → LM Studio is working.
Example response:
{
"data": [
{
"id": "qwen2.5-coder-7b-instruct",
"object": "model",
"owned_by": "organization_owner"
},
{
"id": "text-embedding-nomic-embed-text-v1.5",
"object": "model",
"owned_by": "organization_owner"
}
],
"object": "list"
}
Phase-5 — Install OpenClaw
OpenClaw requires Node.js 22 as a prerequisite. Don't worry—installation is automated.
Universal Installation (All Platforms):
Open your terminal/command prompt and run this single command:
curl -fsSL https://openclaw.ai/install.sh | bash
If that doesn't work, or you're on Windows PowerShell, use:
iwr -useb https://openclaw.ai/install.ps1 | iex
Open PowerShell as Administrator:
- If install as admin then it will automatically configure the gateway.
- If it asks anywhere Remote or Local, then set it as
local.
Phase-6 — Configure OpenClaw to Use LM Studio
After running make sure you select like these:
Other things you can select skip for now option, or you can setup later any of those you want to. I’ll setup later.
You get base URL and LLM model from the right sidebar of LM studio in info tab. Use yours not copy paste it. you can only use the API KEY as same as mine.
You will asked about following field: (here what I select)
Default model: Keep current (vllm/qwen2.5-coder-7b-instruct)
Channel status: skip for now
Search provider: Skip for now
Configure skills now?: No
Enable hooks? No
Optional apps: skip for now
Control UI: Web UI
Phase-7 — Run OpenClaw
After completion of above command you get a URL like this:
http://127.0.0.1:18789/#token=YOUR-Token
Now copy the URL and paste it any browser search bar. You get the chat interface like this
Now you can use the claw bot here.
Or, you can run using command:
openclaw gateway
Phase-8 — Now if you want to remove clawbot from the system entirely
For security reasons if you don't want to use claw bot follow following steps to remove clawbot from the system:
Step-1: Stop the Running Server
If OpenClaw is running in the terminal:
Ctrl + C
Step-2: Delete the OpenClaw Project Folder
Go to the following path:
C:\Users\youname
Delete the .openclaw folder.
Now, Work is not done yet. You have to delete packages too.
Step-3: Remove Global Packages
Check global packages:
npm list -g --depth=0
If you see something like:
openclaw
remove it:
npm uninstall -g openclaw
Usually, this step is not required because OpenClaw runs locally.
Step-4: Remove Local Models
If you downloaded models for LM Studio, they are stored separately.
Location (Windows):
C:\Users\<your-user>\.lmstudio\models
Delete models if you want to free space.
Step-5: Clear Node Cache (Optional)
This step is optional but removes leftover npm cache.
npm cache clean --force
Reminder:
- It is only for testing and perform basic tasks.
- You need large system which has more GPU or CPU power to perform complex task.
- This is entirely free so you can use it but keep in mind that it is using your system resources to run.
----- 📄 Document Ends Here. Thanks for Reading!!! 🎉 -----






Top comments (0)