LongCut logo

How to Setup OpenClaw with Ollama (Zero Cost AI Assistant)

By ProgrammingKnowledge2

Summary

## Key takeaways - **OpenClaw: Open-Source AI Agent**: OpenClaw is an open-source autonomous AI agent that functions as a personal assistant living inside messaging apps like WhatsApp, Telegram, or Discord. [00:16], [00:20] - **One-Liner Installs NodeJS & Git**: The oneliner curl command installs NodeJS, git, and everything else required automatically if prerequisites are missing on Linux. [01:13], [01:23] - **Heed Beta Security Warnings**: OpenClaw is a hobby project in beta with sharp edges; run it in a sandbox like a virtual machine and keep secrets out of the agent-reachable file system. [03:49], [04:15] - **Config OpenClaw.json for Token**: All settings including the gateway token are saved in ~/.openclaw/openclaw.json; use 127.0.0.1:18789/[token] to access the web chat. [07:47], [09:51] - **Ollama Launch Integrates Models**: After installing Ollama, stop OpenClaw gateway and run 'ollama launch openclaw' to pull and configure models like miniax-m2.5:cloud directly into OpenClaw. [15:44], [17:35] - **Agent Runs Real System Commands**: OpenClaw executes commands like system specs query or finding and reading a hello world C file in ~/Documents, providing exact outputs not from its knowledge. [18:41], [20:07]

Topics Covered

  • One-liner Installs NodeJS Automatically
  • Sandbox OpenClaw for Security
  • Olama Seamlessly Launches OpenClaw
  • AI Agent Executes Real Commands

Full Transcript

Hey guys, in this video I'm going to show you how you can install and set up OpenClaw on your Ubuntu or any other Linux system. So open claw is an

Linux system. So open claw is an opensource autonomous AI agent that functions as a personal assistant living

inside the messaging apps you already use. For example, WhatsApp or Telegram

use. For example, WhatsApp or Telegram or uh Discord and many other tools, right? So let's see how we can install

right? So let's see how we can install and set up open claw. So for that open your favorite browser and search for open claw and the first link which will

appear here will be from openclaw.ai.

So we are going to click on this link and here when you scroll down a little you will see this quick start section and here you will see a few options.

First option is oneliner option and it's available for Mac OS or Linux operating

system. You can also use npm or hackable

system. You can also use npm or hackable but it's recommended that if you are on Linux operating system uh you can use

this oneliner command which is a curl command. Why I'm saying this is because

command. Why I'm saying this is because you can see this line the oneliner installs NodeJS and everything else for

you. So if you use this oneliner command

you. So if you use this oneliner command whatever prerequisite which are required to install open claw it's going to install automatically for you right so

I'm going to copy this oneliner command and then I'm going to click on show apps section and then click on terminal here which is going to open the terminal and

here I'm going to just paste this command and then press enter and once I give this curl command command the installation of open clause starts and

first of all it checks uh what is the installation plan so it will recognize uh the operating system the npm and the

requested version which is the latest version it has also detected that I have the latest version of NodeJS

which is version 24.13.1 so it has given this check mark for the NodeJS installation. If this node

NodeJS installation. If this node version is not there on my Linux operating system, open claw will try to install this NodeJS version. Also, it

requires git. So, it says git is already installed. So, if git is not installed,

installed. So, if git is not installed, open claw will complain and uh you need to install git on your Linux operating

system. You can see in the next step it

system. You can see in the next step it installs the open claw npm package and now it's already installed and once that

is installed the installation of open claw finishes right so it says finishing the setup and open claw installed successfully and the version at the time

of making this video is this version after the setup of uh open claw finishes it's going to start the onboarding

process of open clause. So this is all done in the same process of this curl

command. Earlier it used to be a

command. Earlier it used to be a separate command but now this onboarding of open claw is included in the uh

installation process. Now first of all

installation process. Now first of all you need to read this uh security warning because it's very important. It

says open claw is a hobby project and still in beta. And it says expect sharp edges. It also says if you're not

edges. It also says if you're not comfortable with the basic security and access control, don't run open claw. It

also recommends that we run open claw in some kind of uh sandbox plus least privilege uh tool scenario. For example,

you can run it inside a virtual machine where uh it's limited to the virtual environment and not to your whole uh computer. Right? Also, it says keep

computer. Right? Also, it says keep secret out of the agent reachable file system and use the strongest available

model. Right? So if you agree with these

model. Right? So if you agree with these uh security uh recommendation then you can move forward with the open claw

installation. So in the next step it

installation. So in the next step it says I understand this is powerful and inherently risky continue. So for moving

forward just use your arrow key and go to the yes u option and then press enter and it's going to show you uh two on boarding mode. One is quick start, other

boarding mode. One is quick start, other is manual. So I'm going to select the

is manual. So I'm going to select the quick start option and press enter. And

first of all, you need to uh use some kind of uh model. So you can see the list of all the models which are

available here. What I plan to do is I

available here. What I plan to do is I want to uh configure Oola Lama models

with the open claw and the O lama models are not u available here in this list.

So what I'm going to do is I'm going to select skip for now and I will configure the O lama models little bit later. So

I'm going to just select skip for now and then press enter. And now in the next step it says filter model by

provider. So here also I will not find

provider. So here also I will not find the model which I want because I want the models which are available in Olama.

So I'm going to uh just select all providers here and then press enter and then select the model. So once again

because this uh model is not available in this list I'm going to select this option which says enter model manually

and then press enter and then instead of uh this name I'm going to just write and then forward slash demo for example

right this model is not available on Olama I just want to finish the onboarding and then I'm going to

configure a real LLM using Olama for open claw. So just give any name here

open claw. So just give any name here and then press enter so that this kind of onboarding is finished and in the

next step we are going to configure the Olama with the open claw tool. Also you

can select the channel using which you want to communicate with uh the open claw tool and all these channels are

available like telegram or WhatsApp or discord and many others for now I don't want to use any channel I will use the

native web chat tool using open claw so I'm going to select skip for now so let me uh press enter here and then in the next step you and see uh this option. So

it says updated open claw forward/openclaw.json.

forward/openclaw.json.

So this is a very important file where all your settings are uh saved. So just

remember this location. We might need to go to this location to uh find out some of the configurations related to open claw. And this location is

claw. And this location is openclaw/openclaw.json

openclaw/openclaw.json JSON file. The workspace file is

JSON file. The workspace file is underopenclaw folder. Now here it also says configure

folder. Now here it also says configure skill now. For now I'm going to uh

skill now. For now I'm going to uh select no here because skills I can also configure at any time in future. So I'm

going to select no and then press enter.

And then it says enable hooks. So there

are plenty of hooks which are available here. For now, I'm going to just select

here. For now, I'm going to just select skip for now. So just press space key on your keyboard to select any option. So

I'm going to press space key here which is going to select the skip for now option and then press enter. And it's

going to install the gateway service and start the gateway service which is the main tool which starts the open claw.

Right? So it says gateway service installed and in some time it's going to start the gateway service right. So now

I can see the gateway service is also started. So after this uh point gateway

started. So after this uh point gateway service uh installed you can see health check help and then optional apps and

under control UI you can see uh this uh UI is going to open automatically for

you which is under 127.0.0.1 colon 18789 on your default browser. The important

thing to note here is this one right. So

you can see this uh address here which is 127.0.0.1 colon port 18789/

token. So you need to remember this

token. So you need to remember this token in order to open this open claw

web chat in future also right. So this

token is also available inside your open claw.json

file which we have seen uh at the top which is this one right so you can find the token in this file also. So I'm

going to copy this uh path from here and let me open one more terminal instance and here I'm going to uh just paste this path and open this uh JSON file using

cat for example right so just write cat and then uh just paste this path and then press enter and here you will be able to see the value of this token this

token value is similar what you see in the installation step which is listed here. Right? So whenever you want to

here. Right? So whenever you want to open the chat in the UI, you need to give this kind of address. So always

remember this otherwise open claw is going to complain. And I have already mentioned that you can find the token in the openclaw.json

the openclaw.json file. So when you go to the web chat

file. So when you go to the web chat here if it gives any error related to token. So here when you uh click on the

token. So here when you uh click on the overview section under the control you can uh provide the gateway token. Right.

So this is where you can provide the token and reload your page and you will be able to start with the session. Right

now the important thing to note here is because we haven't chosen any node for now when you type uh hi here it's not

going to give you any answer because the model which we have chosen is the fake model right we just wanted to finish the

uh configuration or onboarding and that's why you will see uh that you are not going to get any answer because the model which we chosen. So you can find

this uh agent section here and the model which is uh chosen by us is this dummy or demo model which doesn't exist right.

So now how we can make it work. So for

this go to your terminal and here it says onboarding complete dashboard open.

So once the onboarding is complete we can stop the gateway of open claw. So

you can give this command which is open claw space gateway and then you can stop the gateway. So gateway is the main uh

the gateway. So gateway is the main uh tool which you can stop or start in order to start the open claw uh web chat

or dashboard. Right? So just give this

or dashboard. Right? So just give this command open claw gateway stop and then press enter. And once this open clock

press enter. And once this open clock gateway is stopped uh you can go to your favorite browser and we are going to install the O lama on our Ubuntu

operating system and then we are going to see how we can configure the models using Olama and search for Olama and the first link which will appear here will

be from olama.com. So I'm going to click on this link and on this main page you will see this command which says start

building with open model and straight away on this main page itself you will uh see uh this curl command which you can use to install OAMA on your Linux or

Ubuntu operating system. So I'm going to just uh copy this curl command and then I'm going to click on show apps section

and then open a new terminal from here.

So once this terminal window opens I'm going to paste this uh command which I have copied from the Olama website and

then press enter here and first of all you need to give your password which you use to log your Ubuntu operating system.

So let me provide that and then press enter and this is going to start the download of Olama related files and then it's going to install it. So we just

need to wait for few seconds and after few seconds I can see this message uh which says no Nvidia GPU detected. So

Olama will run on CPUon mode which is fine for me for now right? So because

I'm running Olama on my local system, so it's going to use the CPUon mode. It

also says Olama API is available at this uh address. So I'm going to copy this

uh address. So I'm going to copy this address and let's open this address in the web browser and let's see what happens. So it says Olama is running. So

happens. So it says Olama is running. So

that's fine. And once I see Olama is running message. So once the Olama is

running message. So once the Olama is installed on our Linux operating system, you can go to the olama.com web page and when you scroll down a

little, you will see this open claw section here. So I'm going to click on

section here. So I'm going to click on open claw and here I can see how I can use to launch open claw. So I'm going to

copy this command and go to my terminal.

And here if you remember we have already stopped the open clock gateway using this command. So this is important. You

this command. So this is important. You

need to stop the gateway and then give this command. So I'm going to paste this

this command. So I'm going to paste this command which is lama launch open claw and then I'm going to press enter here

and here it says uh choose any one model from here. Right? So I'm going to choose

from here. Right? So I'm going to choose one of these models which are recommended. Here I generally choose one

recommended. Here I generally choose one of these cloud models. So I'm going to choose this Miniax uh - M2.5 col cloud

and then press enter here. And then it says download Miniax -2.5 cloud. Yes, I

will download this. So I'm going to just select yes and then press enter. And

it's going to pull this Miniax uh uh cloud uh tool. And first of all I need to log in with uh my Olama account. So

if I don't have any Olama account I can uh easily create one using this continue with Google or continue with GitHub account. So let me just log to my Olama

account. So let me just log to my Olama account. And once I logged in with my

account. And once I logged in with my Olama account with my Google account or my GitHub account I'm going to click on connect here. And it says device

connect here. And it says device connected successfully. So once I see

connected successfully. So once I see this message, I can go to the terminal and uh you will be able to see this next

section here which says uh this will modify your open clock configuration and my configuration is already saved at

this location. Right? So we have already

this location. Right? So we have already seen how we can open this file and see the configuration. Right? So uh this new

the configuration. Right? So uh this new model which we have pulled is added there. So I'm going to just uh select

there. So I'm going to just uh select enter to proceed because yes option is already selected. So I'm going to press

already selected. So I'm going to press enter here which is going to launch the open claw with this model. Right. So

once this um open claw start with the selected model I can go to the web page which I have shown you already which was

not working earlier. So this is the same web page which uh we uh ran on 127.0.0.1 colon 1878

9 right and now when we go to the agents section here you can see the primary model is/minax- m2.5 colon cloud here. So I can go to

the chat and here I can chat with my model using the open claw. So what I'm going to do here is I'm going to write a

very interesting message here which says what are the specs of this computer. So

let's see what it gives us. So I'm going to press send here.

So I got the answer here. You can see uh the system information. So, so you can see OS is Ubuntu, CPU is Intel core, uh

RAM is this and storage is this, right?

So, for uh fulfilling this uh request for giving me my own computer spec, it

has to run some command, right? So uh

open claw using the selected model from Olama. It has ran some internal commands

Olama. It has ran some internal commands and using those commands it has uh recognized uh all the specs on my

computer and it has given all the specs on my computer. So so it's able to run commands and uh give me the output based on those. Let's give one more command.

on those. Let's give one more command.

So I'm going to give this command which says find the folder in my documents directory where I have saved the C program and tell me what program is

written inside the C file. So inside my documents folder I have this C apps folder where I have this test C file and

inside this uh test C file I have this uh C program which is the very simple hello world program. Let's see it's able to find this inside inside my documents

folder. So let me give uh this uh

folder. So let me give uh this uh message or request. So now I can see uh it's running this find command to find

the C file in my documents folder and then uh this file is uh detected and then it's reading this file and it's

going to give me the output and this is what it found in that C file. So you can see this uh output is giving given to me

and uh this is the exact program which I have in my C5 file and it's there in the test C file right and it prints hello

world. So it has successfully detected

world. So it has successfully detected where this file is uh in my document folder and then it's giving me the

response with the content of that C file. So you can see it's not giving

file. So you can see it's not giving answers based on its own knowledge. It's

running the commands and then giving the response. Also you can configure some

response. Also you can configure some channels uh using this open clause. So

uh you can uh add WhatsApp or Telegram or all the channels which are available.

Uh you can also see the instance here.

You can see the sessions which you ran.

You can also see the token usage. So if

you are using uh let's say some uh paid model you will be able to see uh how many token you have used per day and

then you will be able to assess uh the cost related to it. So I have sent nine messages today and uh the average token

value was this one but it costed me nothing because I'm using the opensource model for now right but in your case um

it if you're using some kind of paid model you will be able to keep track of those tokens here in the usage section

you can also run the scheduleuler here so you can schedule some tasks uh which can run every uh minute or

every hour or every day. You can see uh all this here. How can you configure that? You can also u add the agents

that? You can also u add the agents here. So you can add all these uh MD

here. So you can add all these uh MD files. So agent MD or soul these are

files. So agent MD or soul these are standard uh files which you can add to your project. So that based on that it's

your project. So that based on that it's going to give you uh the answer using this context right so files and tools are available. So you can see read and

are available. So you can see read and write tools. You can add the skill files

write tools. You can add the skill files here and then you can add uh the channel or uh see the channel which you have

chosen and then chrome jobs right you can add the skills I have as I mentioned right and from here you can choose uh

password skill or Apple nodes and many others right and then uh the nodes you can see and you will be able to see the

configuration here in the config section where you will see uh the environment I can choose all for now there is no

custom entries even I can see the logs so what's happening and if something goes wrong uh I will be able to see the errors here right and then under the

resources I can see that under docs.openclaw.ai

AI I will be able to see some more documentation related to open claw. So

what more I can do using open claw and read more about open claw from here. So

that's how you can set up the open claw on your Ubuntu or any other Linux operating system. I hope you have

operating system. I hope you have enjoyed this video and I will see you in the next video.

Loading...

Loading video analysis...