Recent Posts
How to Set Up OpenClaw with a Local Llama Model on a Ring Compute Server
- Calendar
In our previous guide, How to Rent a GPU Server from Ring Compute Using the Vast.ai CLI, we walked through how to spin up an instance on one of our 8x RTX 5090 servers and connect via SSH. This guide picks up where that one left off. With your instance running and an SSH session open, we will install Ollama, pull a Llama 3.1 8B model, and set up OpenClaw β giving you a fully private, self-hosted AI assistant powered by your own GPU.
What Is OpenClaw?
OpenClaw (formerly known as Clawdbot and Moltbot) is an open-source, self-hosted AI agent. Unlike a simple chatbot, OpenClaw can execute shell commands, manage files, browse the web, and connect to messaging platforms like WhatsApp, Telegram, and Slack. It is model-agnostic, meaning you can point it at cloud APIs or a locally running model. In this guide, we will use a local Llama model served by Ollama β no API keys or cloud costs required.
Step 1: Install Ollama
Ollama is a lightweight tool for running large language models locally. Install it with one command:
curl -fsSL https://ollama.com/install.sh | sh
Verify the installation and start the service:
ollama -v
Ollama runs as a background service and listens on port 11434 by default.
Step 2: Pull the Llama 3.1 8B Model
The Llama 3.1 8B model is a great choice for a local assistant. It supports tool calling, has a 128K context window, and fits comfortably on a single GPU with around 5 GB of VRAM. Pull it with:
ollama pull llama3.1:8b
You can test it interactively to make sure everything works:
ollama run llama3.1:8b
Type a message and press Enter. Press Ctrl+D to exit when done.
Step 3: Increase the Context Window
Ollama defaults to a small context window. OpenClaw works better with a larger context. Create a custom model with 64K tokens:
cat <<'EOF' > ~/Modelfile-openclaw
FROM llama3.1:8b
PARAMETER num_ctx 65536
EOF
ollama create openclaw-llama -f ~/Modelfile-openclaw
This creates a derived model called openclaw-llama that you can reference in the OpenClaw config.
Step 4: Install OpenClaw
OpenClaw requires Node.js 22 or later. Install OpenClaw with the official installer:
curl -fsSL https://openclaw.ai/install.sh | bash
Verify the installation:
openclaw --version
Step 5: Configure OpenClaw to Use Ollama
Run the onboarding wizard to set up your gateway and connect it to Ollama:
export OLLAMA_API_KEY="ollama-local"
openclaw onboard --install-daemon
During onboarding, select Ollama as your AI provider. OpenClaw will auto-discover models running on localhost. If you prefer to configure it manually, edit ~/.openclaw/openclaw.json and set the primary model:
{ "agents": { "defaults": { "model": { "primary": "ollama/openclaw-llama" } } } }
Make sure to use the native Ollama API URL (http://127.0.0.1:11434) without a /v1 suffix. Using the OpenAI-compatible endpoint can break tool calling.
Step 6: Access the Dashboard
OpenClaw runs a web dashboard on port 18789. Since we are running on a remote GPU server, set up an SSH tunnel from your local machine:
ssh -N -L 18789:127.0.0.1:18789 -p PORT root@HOST
Then open http://127.0.0.1:18789/ in your browser. You can get your authentication token with:
openclaw config get gateway.auth.token
From the dashboard you can chat with your model, approve actions, configure messaging channels, and monitor activity β all running privately on your Ring Compute server with zero cloud API costs.


