1、Open Claw是针对个人的,而非针对复杂的组织架构群体,建议虚拟机或物理机部署,不要考虑容器方案(由于自身安全策略,需要nginx。官方的docker image不含nginx)

2、部分内容需要科学上网,后台脚本部分涉及github资源等

3、rocky采用server安装就行,无需图形化界面,无需太多包,openclaw官方脚本自适应能力很强

4、本次安装,以虚拟机方式进行,虚拟机IP:192.168.254.196,换IP需要同步更换相关参数。

5、以root用户登录后依次执行如下命令:

curl -fsSL https://openclaw.ai/install.sh -o openclaw-install.sh

chmod 755 openclaw-install.sh

./openclaw-install.sh

systemctl --user enable openclaw-gateway

systemctl --user start openclaw-gateway

openclaw config set gateway.mode local

openclaw config set gateway.bind lan

openclaw config set gateway.auth.token 25****db945c****7a81cfb****74a6af4def8****013809

openclaw config set gateway.controlUi.allowedOrigins '["http://localhost:18789", "http://127.0.0.1:18789", "http://192.168.254.196:18789", "https://192.168.254.196"]' --json

openclaw config set gateway.trustedProxies '["127.0.0.1", "::1"]'

openclaw gateway run

dnf install nginx -y

mkdir -p /etc/nginx/ssl/

openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/nginx/ssl/nginx.key -out /etc/nginx/ssl/nginx.crt -subj "/C=CN/ST=State/L=City/O=Organization/CN=192.168.254.196"

mv /etc/nginx/nginx.conf /etc/nginx/nginx.conf.`date +%s`

cat << EOF > /etc/nginx/nginx.conf

user nginx;

worker_processes auto;

error_log /var/log/nginx/error.log;

pid /run/nginx.pid;

include /usr/share/nginx/modules/*.conf;

events {

worker_connections 1024;

}

http {

log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '

 '$status $body_bytes_sent "$http_referer" '

'"$http_user_agent" "$http_x_forwarded_for"';

access_log /var/log/nginx/access.log  main;

sendfile            on;

tcp_nopush          on;

tcp_nodelay         on;

keepalive_timeout   65;

types_hash_max_size 4096;

include            /etc/nginx/mime.types;

default_type       application/octet-stream;

include /etc/nginx/conf.d/*.conf;

server {

listen       80;

return 301 https://$server_addr$request_uri;

}

server {

listen       443 ssl http2;

server_name  192.168.254.196;

ssl_certificate     /etc/nginx/ssl/nginx.crt;

ssl_certificate_key /etc/nginx/ssl/nginx.key;

ssl_protocols TLSv1.2 TLSv1.3;

ssl_ciphers HIGH:!aNULL:!MD5;

location / {

 proxy_pass http://127.0.0.1:18789;

 proxy_http_version 1.1;

 proxy_set_header Upgrade $http_upgrade;

 proxy_set_header Connection "upgrade";

 proxy_set_header Host $host;

 proxy_set_header X-Real-IP $remote_addr;

 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

 proxy_set_header X-Forwarded-Proto $scheme;

 proxy_read_timeout 86400;

 proxy_send_timeout 86400;

}

}

 }

EOF

openclaw gateway stop

openclaw gateway run

6、安装完成后:

网页访问:https://192.168.3.233/#tokens=25****db945c****7a81cfb****74a6af4def8****013809        

openclaw devices list        ##查看访问设备的Requst ID

openclaw devices approve ***    ##同意新增设备的访问

openclaw onboard ##配置模型、频道和技能

Logo

小龙虾开发者社区是 CSDN 旗下专注 OpenClaw 生态的官方阵地,聚焦技能开发、插件实践与部署教程,为开发者提供可直接落地的方案、工具与交流平台,助力高效构建与落地 AI 应用

更多推荐