Key Takeaways
A verification-first Ubuntu guide for installing Ollama, checking the systemd service and local API, testing real inference, and recording the model details needed for OpenClaw.
Before connecting OpenClaw to a local model, verify Ollama as an independent service. This guide installs Ollama on Ubuntu, checks the systemd service and local API, pulls a model, runs a real inference test, and leaves you with evidence that the model runtime works before OpenClaw is added.
What this step proves
At the end of this guide you should be able to confirm all four layers independently:
- the
ollamaCLI is installed - the Ollama service is running
- the local API responds on
127.0.0.1:11434 - a locally installed model can generate a response
That separation matters: if OpenClaw fails later, you can distinguish an Ollama/runtime problem from an OpenClaw configuration problem.
1. Check the Ubuntu host first
Confirm the operating system, free disk space, and available memory before downloading a model:
Model requirements vary significantly by model size and quantization. Do not assume that a model which downloads successfully will run comfortably on the host. Choose a model that fits your hardware and workload.
Updating package metadata is reasonable, but a full unattended distribution upgrade is not required just to install Ollama:
2. Install Ollama from the official installer
Ollama documents the following Linux installation command:
Then verify that the CLI is available:
For production or security-sensitive hosts, review third-party installation scripts before piping them to a shell and follow your normal change-control policy.
3. Verify the service instead of starting a second server
On a normal Linux installation, Ollama is commonly managed as a systemd service. Check that first:
If it is installed but stopped:
Use ollama serve primarily when you intentionally want to run the server in the foreground. Starting it while systemd already owns port 11434 can create unnecessary confusion.
If startup fails, inspect the service logs:
4. Verify the local API
The default local Ollama endpoint used by OpenClaw is http://127.0.0.1:11434. Test model discovery directly:
A successful response proves that the HTTP service is reachable. It does not yet prove that a model can perform inference.
If the request fails, check the listener and service before changing OpenClaw:
Keep a local-only deployment bound to loopback unless you deliberately need LAN access. Exposing a model endpoint changes the security boundary and should be protected accordingly.
5. Pull a model that fits the machine
Use an exact model name from Ollama's current model catalog. For example, after choosing a model appropriate for your hardware:
Do not copy an old model recommendation simply because it appeared in a tutorial. Model availability and recommended choices change; the important artifact for the next step is the exact identifier returned by ollama list.
6. Run an inference smoke test
First test through the CLI:
Then test the native API so you know the same service path that integrations depend on can generate output:
Replace <model-name> with the exact installed model ID. A valid JSON response containing generated text is stronger evidence than checking the port alone.
7. Record the values OpenClaw will need
Before moving to OpenClaw, record:
Current OpenClaw documentation supports Ollama directly. For a local Ollama host, OpenClaw can discover models from the loopback endpoint after Ollama is selected/configured, and its onboarding flow can verify the selected route with a real completion. Use the current OpenClaw Ollama documentation when you perform that integration rather than copying stale provider configuration from older tutorials.
Troubleshooting by failure layer
| Symptom | Check first | Likely layer |
|---|---|---|
ollama: command not found | command -v ollama | Installation / PATH |
| Port 11434 refuses connections | systemctl status ollama and journalctl -u ollama | Service |
/api/tags works but model is missing | ollama list | Model installation |
| Model exists but inference fails or is extremely slow | RAM/VRAM, logs, model size | Runtime / hardware |
| Ollama tests pass but OpenClaw later fails | OpenClaw provider/model configuration | Integration |
Production checklist
Before treating this step as complete:
ollama --versionsucceedssystemctl status ollamareports the expected service state/api/tagsreturns successfullyollama listcontains the intended model- a CLI inference succeeds
- a native API inference succeeds
- you have recorded the exact base URL and model ID
- you have not exposed port
11434publicly by accident
FAQ
Do I need to run ollama serve manually on Ubuntu?
Not necessarily. If the Linux installer has configured Ollama as a systemd service and that service is running, starting another foreground server is unnecessary. Check systemctl status ollama first.
Is port 11434 alone enough to prove Ollama works?
No. A listening port only proves that something is accepting connections. Verify /api/tags, then perform an actual generation request.
Which model should I install for OpenClaw?
There is no universal choice. Use the current OpenClaw and Ollama model guidance and choose according to available RAM/VRAM, context requirements, tool-use needs, latency, and workload. OpenClaw notes that smaller or heavily quantized local models can be less reliable for agent workloads, so test the actual agent behavior rather than relying only on a simple chat prompt.
Should Ollama listen on the public internet?
Not for a default local setup. Keep it on loopback unless remote access is an intentional architecture decision with appropriate network and authentication controls.
Next steps
- Install OpenClaw on Ubuntu: Step 2 of Local AI Workflow
- Connect OpenClaw to Ollama: Local AI Agent in Practice
- OpenClaw Proxy Setup
Sources
Alex Vance
Lead Proxy Network Architect
Reviewed by the BytesFlows engineering team. Examples are written for compliant public-web data collection, QA, SEO monitoring, and market research workflows. Results can vary by target site, country, client runtime, and request rate.