Install Openclaw on Ubuntu Server

I’ve recently been playing around with Openclaw, which is an AI assistant that can do things like check your mail, calendar, create appointments, and even create Notion pages for you.

There are a few ways to approach this, for example, through the terminal or through Ollama.

But for a quick and easy install on your Ubuntu server, these are the main steps that gave me a smooth experience using Ollama.

# Add a user and add them to your sudoers
adduser openclaw
sudo usermod -aG sudo openclaw

# change user 
su openclaw 

# install nvm
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
# Then follow instructions.  Generally this 
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"  # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"

# install node
nvm install --lts
nvm use --lts

# install git
sudo apt install git -y

# install brew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
# then follow instructions. 
 echo >> /home/openclaw/.bashrc
 echo 'eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv bash)"' >> /home/openclaw/.bashrc
 eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv bash)"
 sudo apt-get install build-essential
 brew install gcc
 
#run openclaw 
ollama launch openclaw