环境准备
1、Node.js 20+
2、npm 11.11.0+
3、windows需要WSL2
执行安装命令
npm install -g openclaw
成功后输出
npm warn Unknown user config "disturl". This will stop working in the next major version of npm. See `npm help npmrc` for supported config options.
npm warn Unknown user config "chromedriver-cdnurl". This will stop working in the next major version of npm. See `npm help npmrc` for supported config options.
npm warn Unknown user config "couchbase-binary-host-mirror". This will stop working in the next major version of npm. See `npm help npmrc` for supported config options.
npm warn Unknown user config "debug-binary-host-mirror". This will stop working in the next major version of npm. See `npm help npmrc` for supported config options.
npm warn Unknown user config "electron-mirror". This will stop working in the next major version of npm. See `npm help npmrc` for supported config options.
npm warn Unknown user config "flow-bin-binary-host-mirror". This will stop working in the next major version of npm. See `npm help npmrc` for supported config options.
npm warn Unknown user config "fse-binary-host-mirror". This will stop working in the next major version of npm. See `npm help npmrc` for supported config options.
npm warn Unknown user config "fuse-bindings-binary-host-mirror". This will stop working in the next major version of npm. See `npm help npmrc` for supported config options.
npm warn Unknown user config "git4win-mirror". This will stop working in the next major version of npm. See `npm help npmrc` for supported config options.
npm warn Unknown user config "gl-binary-host-mirror". This will stop working in the next major version of npm. See `npm help npmrc` for supported config options.
npm warn Unknown user config "grpc-node-binary-host-mirror". This will stop working in the next major version of npm. See `npm help npmrc` for supported config options.
npm warn Unknown user config "hackrf-binary-host-mirror". This will stop working in the next major version of npm. See `npm help npmrc` for supported config options.
npm warn Unknown user config "leveldown-binary-host-mirror". This will stop working in the next major version of npm. See `npm help npmrc` for supported config options.
npm warn Unknown user config "leveldown-hyper-binary-host-mirror". This will stop working in the next major version of npm. See `npm help npmrc` for supported config options.
npm warn Unknown user config "mknod-binary-host-mirror". This will stop working in the next major version of npm. See `npm help npmrc` for supported config options.
npm warn Unknown user config "node-sqlite3-binary-host-mirror". This will stop working in the next major version of npm. See `npm help npmrc` for supported config options.
npm warn Unknown user config "node-tk5-binary-host-mirror". This will stop working in the next major version of npm. See `npm help npmrc` for supported config options.
npm warn Unknown user config "nodegit-binary-host-mirror". This will stop working in the next major version of npm. See `npm help npmrc` for supported config options.
npm warn Unknown user config "operadriver-cdnurl". This will stop working in the next major version of npm. See `npm help npmrc` for supported config options.
npm warn Unknown user config "phantomjs-cdnurl". This will stop working in the next major version of npm. See `npm help npmrc` for supported config options.
npm warn Unknown user config "profiler-binary-host-mirror". This will stop working in the next major version of npm. See `npm help npmrc` for supported config options.
npm warn Unknown user config "puppeteer-download-host". This will stop working in the next major version of npm. See `npm help npmrc` for supported config options.
npm warn Unknown user config "python-mirror". This will stop working in the next major version of npm. See `npm help npmrc` for supported config options.
npm warn Unknown user config "rabin-binary-host-mirror". This will stop working in the next major version of npm. See `npm help npmrc` for supported config options.
npm warn Unknown user config "sass-binary-site". This will stop working in the next major version of npm. See `npm help npmrc` for supported config options.
npm warn Unknown user config "sodium-prebuilt-binary-host-mirror". This will stop working in the next major version of npm. See `npm help npmrc` for supported config options.
npm warn Unknown user config "sqlite3-binary-site". This will stop working in the next major version of npm. See `npm help npmrc` for supported config options.
npm warn Unknown user config "utf-8-validate-binary-host-mirror". This will stop working in the next major version of npm. See `npm help npmrc` for supported config options.
npm warn Unknown user config "utp-native-binary-host-mirror". This will stop working in the next major version of npm. See `npm help npmrc` for supported config options.
npm warn Unknown user config "zmq-prebuilt-binary-host-mirror". This will stop working in the next major version of npm. See `npm help npmrc` for supported config options.
npm warn Unknown user config "msvs_version". This will stop working in the next major version of npm. See `npm help npmrc` for supported config options.
npm warn deprecated inflight@1.0.6: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
npm warn deprecated npmlog@5.0.1: This package is no longer supported.
npm warn deprecated rimraf@3.0.2: Rimraf versions prior to v4 are no longer supported
npm warn deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported
npm warn deprecated are-we-there-yet@2.0.0: This package is no longer supported.
npm warn deprecated gauge@3.0.2: This package is no longer supported.
added 653 packages in 1m
127 packages are looking for funding
run `npm fund` for details
运行openclaw
#方式1
ollama launch openclaw
#方式2 -需要第一次先运行方式一
openclaw gateway start
注意:此时会提示选择模型,可能需要登录ollama账号,根据提示操作
成功后会自动打开控制台进行对话

网页打开 http://localhost:18789/#token=ollama

其他
关闭openclaw
#方式1
openclaw gateway stop
#方式2 无法关闭的情况,执行后关闭控制台窗口
openclaw gateway --force
根据自己的需要安装插件,安装channel,skill等,国内目前支持钉钉,飞书,亲测可用
使用clawhub安装好用技能,先安装clawhub
npm install -g clawhub
登录:clawhub login --token xxxxxxx在web创建xxxxxxxxxx