i have openclaw installed on my VPS.
I first cloned and checked out the lastest version
and installed it (see script below on how i did that)
now i want to upgrade (here is what i think i should run):
cd /opt/openclaw
git pull --prune
git checkout -b v2026.3.2_branch v2026.3.2 >/dev/null || git checkout v2026.2.26_branch
openclaw --version
systemctl --user stop openclaw-gateway.service
pnpm install
pnpm build
pnpm ui:build
systemctl --user start openclaw-gateway.service
systemctl --user status openclaw-gateway.service
openclaw --version
this is my initial install script:
#!/usr/bin/env bash
set -euo pipefail
sudo dnf groupinstall -y "Development Tools"
sudo dnf install -y cmake lsof
sudo mkdir -p /opt/openclaw
sudo chown rocky:rocky /opt/openclaw
sudo chmod 750 /opt/openclaw
cd /opt/openclaw
if [ ! -d .git ]; then
git clone https://github.com/openclaw/openclaw .
else
git fetch --all --prune --tags
fi
# Use tag/branch as you like:
git checkout -b v2026.2.26_branch v2026.2.26 2>/dev/null || git checkout v2026.2.26_branch
git status --porcelain=v1
git rev-parse --short HEAD
git describe --tags --always || true
pnpm install
pnpm build
pnpm ui:build
# Install CLI wrapper
mkdir -p "$HOME/.local/bin"
cat > "$HOME/.local/bin/openclaw" <<'EOF'
#!/usr/bin/env bash
exec node /opt/openclaw/openclaw.mjs "$@"
EOF
chmod +x "$HOME/.local/bin/openclaw"
command -v openclaw
openclaw --version
# Gateway service install (user service)
openclaw gateway install
# Ensure it runs after reboot without login
sudo loginctl enable-linger rocky
systemctl --user daemon-reload
systemctl --user enable --now openclaw-gateway.service
systemctl --user status openclaw-gateway.service --no-pager