#How to setup the OpenClaw on my Ubuntu VM

18 messages ยท Page 1 of 1 (latest)

long bison
#

Id didn't used the Openclaw Yet. I want to integrate with Discord

karmic garnetBOT
#

Yep, on an Ubuntu VM the cleanest path is:

  1. Install OpenClaw
curl -fsSL https://openclaw.ai/install.sh | bash
openclaw onboard --install-daemon
  1. Create a Discord bot in the Discord Developer Portal, then:
  • enable Message Content Intent
  • recommended: Server Members Intent
  • invite it to your own/private server
  • copy:
    • Bot Token
    • Server ID
    • your User ID
#
  1. On the VM, set the token:
export DISCORD_BOT_TOKEN="YOUR_BOT_TOKEN"
openclaw config set channels.discord.token --ref-provider default --ref-source env --ref-id DISCORD_BOT_TOKEN
openclaw config set channels.discord.enabled true --strict-json
openclaw gateway restart
  1. DM your bot in Discord, it should give you a pairing code.

  2. Approve the pairing:

openclaw pairing list discord
openclaw pairing approve discord <CODE>

After that, Discord DMs should work.

long bison
#

โ—‡ Gemini CLI OAuth โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚ โ”‚
โ”‚ You are running in a remote/VPS environment. โ”‚
โ”‚ A URL will be shown for you to open in your LOCAL browser. โ”‚
โ”‚ After signing in, copy the redirect URL and paste it back here. โ”‚
โ”‚ โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ
โ—‡ Gemini CLI OAuth failed
โ”‚
โ—‡ OAuth help โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚ โ”‚
โ”‚ Trouble with OAuth? Ensure your Google account has Gemini CLI access. โ”‚
โ”‚ โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ
Error: Gemini CLI not found. Install it first: brew install gemini-cli (or npm install -g @google/gemini-cli), or set GEMINI_CLI_OAUTH_CLIENT_ID.
openclaw: command not found
whitedevil@ubuntu:~$ npm install -g @google/gemini-cli
npm warn deprecated prebuild-install@7.1.3: No longer maintained. Please contact the author of the relevant native addon; alternatives are available.

added 42 packages in 21s

9 packages are looking for funding
run npm fund for details
whitedevil@ubuntu:~$ openclaw onboard --install-daemon
openclaw: command not found
whitedevil@ubuntu:~$ openclaw
openclaw: command not found

How fix this?

karmic garnetBOT
#

The main issue is simpler: you installed Gemini CLI, not OpenClaw.

gemini and openclaw are separate commands.

Try this first:

curl -fsSL https://openclaw.ai/install.sh | bash

Then open a new shell, or run:

hash -r
openclaw --version
openclaw onboard --install-daemon
#

If openclaw is still โ€œcommand not foundโ€, itโ€™s a PATH issue. Run:

npm prefix -g
echo "$PATH"
export PATH="$(npm prefix -g)/bin:$PATH"
echo 'export PATH="$(npm prefix -g)/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc
hash -r
openclaw --version

If you want the npm route instead of the installer:

npm install -g openclaw@latest
#
npm prefix -g
echo "$PATH"
long bison
#

whitedevil@ubuntu:~$ curl -fsSL https://openclaw.ai/install.sh | bash

๐Ÿฆž OpenClaw Installer
I'm not saying your workflow is chaotic... I'm just bringing a linter and a helmet.

โœ“ Detected: linux

Install plan
OS: linux
Install method: npm
Requested version: latest

[1/3] Preparing environment
โœ“ Node.js v22.22.2 found
ยท Active Node.js: v22.22.2 (/usr/bin/node)
ยท Active npm: 10.9.7 (/usr/bin/npm)

[2/3] Installing OpenClaw
โœ“ Git already installed
ยท Installing OpenClaw (latest)
! npm install failed for openclaw@latest
Command: env SHARP_IGNORE_GLOBAL_LIBVIPS=1 npm --loglevel error --silent --no-fund --no-audit install -g openclaw@latest
Installer log: /tmp/tmp.uSZSuHQAjB
! npm install failed; showing last log lines
! npm install failed; retrying

karmic garnetBOT
#

Nice, thatโ€™s progress, the installer is running now.
The failure is inside the npm install step, and the real reason is in that temp log.

Please run these and paste the output:

tail -80 /tmp/tmp.uSZSuHQAjB
npm config get prefix
npm prefix -g

Also, if you want the installer to show more detail on the next run:

curl -fsSL https://openclaw.ai/install.sh | bash -s -- --verbose
#

Two common Ubuntu causes:

  1. npm permissions / EACCES
mkdir -p "$HOME/.npm-global"
npm config set prefix "$HOME/.npm-global"
echo 'export PATH="$HOME/.npm-global/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc
hash -r
  1. sharp / libvips issue
SHARP_IGNORE_GLOBAL_LIBVIPS=0 curl -fsSL https://openclaw.ai/install.sh | bash

So, first paste the tail -80 /tmp/tmp.uSZSuHQAjB output, that should tell us which one it is.

long bison
#

whitedevil@ubuntu:~$ mkdir -p "$HOME/.npm-global"
npm config set prefix "$HOME/.npm-global"
echo 'export PATH="$HOME/.npm-global/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc
hash -r
npm error code ENOSPC
npm error syscall write
npm error errno -28
npm error nospc ENOSPC: no space left on device, write
npm error nospc There appears to be insufficient space on your system to finish.
npm error nospc Clear up some disk space and try again.
npm error A complete log of this run can be found in: /home/whitedevil/.npm/_logs/2026-04-15T14_40_33_291Z-debug-0.log

karmic garnetBOT
#

Yep, we found it, your VM is just out of disk space.

This is not an OpenClaw bug now, npm canโ€™t even write its own config/log files.

Please check both disk space and inodes:

df -h
df -i
du -sh ~ /tmp ~/.npm 2>/dev/null

What to do next:

  • free up at least 2 to 4 GB
  • if df -h looks fine but installs still fail, check df -i because you may be out of inodes
  • after freeing space, rerun:
#
curl -fsSL https://openclaw.ai/install.sh | bash

If you want, paste the output of:

df -h
df -i

and Iโ€™ll tell you the quickest thing to clean up.

long bison
#

Ok. Which Model/auth provider i should use? for free.

karmic garnetBOT
#

Short version: for free, your main option is Gemini CLI OAuth.

A few important caveats though:

  • Gemini CLI OAuth is the closest thing to a free hosted setup
  • but in OpenClaw itโ€™s an unofficial integration
  • docs explicitly warn that some users reported Google account restrictions
  • if you try it, use a non-critical Google account

If you want the least headache, a paid API key provider is usually smoother.
If you want zero cost, Gemini CLI OAuth is the one Iโ€™d look at first.

A couple blunt notes:

  • Discord integration and model provider are separate things
  • I would not start with local models for a first Discord setup unless you already have strong hardware
  • model recommendations change fast, so for โ€œwhat actually works best todayโ€, ask in #models