This repository has been archived on 2026-08-07. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
zq/10.项目/12-AI助手/10-OpenClaw/知乎专栏/01-在旧电脑上部署 OpenClaw:我的血泪踩坑史_23127PN0CC_Mar-08-0751-2026_1.md
T

7.8 KiB

Ubuntu 24

用云服务器直接安装

OpenClaw

用一键安装脚本 curl -fsSL https://openclaw.ai/install.sh | bash

后台启动

(腾讯云)网关起不来,提示systemctl。阿里云没问题,可以跳过这一步

# 更新systemd
sudo apt update
sudo apt install dbus-user-session
sudo apt install --reinstall libpam-systemd
#启用Root用户的lingering
sudo loginctl enable-linger root
#验证
loginctl show-user root | grep Linger 
#启动dbus服务
systemctl --user start dbus.service
#验证服务状态
systemctl --user status
#安装gateway
openclaw gateway install
#启动
openclaw gateway start
#成功

搞模型

Minimax CodingPlan

sk-cp-8PugyKE2xsG0S4x4KzDuuIV6Z9bT1NFwkpfrOSG05djFVExAgYEPpp7iUaTcugT6_P4uBYIN9S75l3ij-Yd2Ct8f6CxdKWdgFahESfn_jla-SlU6oGUCBjk

Kimi CodingPlan

sk-sk-kimi-4ogncmlAcNCJaPQWaGDvRpHO7rTGokMsk-kimi-4ognsk-kimi-4ogncmlAcNCJaPQWaGDvRpHO7rTGokMsk-kimi-4ogncmlAcNCJaPQWaGDvRpHO7rTGokMfddnoSZ8u5pNaXgg2aK4Tb4CCBbEIuv40fddnoSZ8u5pNaXgg2aK4Tb4CCBbEIuv40cmlAcNCJaPQWaGDvRpHO7rTGokMfddnoSZ8u5pNaXgg2aK4Tb4CCBbEIuv40fddnoSZ8u5pNaXgg2aK4Tb4CCBbEIuv40kimi-4ogncmlAcNCJaPQWaGDvRpHO7rTGokMsk-kimi-4ognsk-kimi-4ogncmlAcNCJaPQWaGDvRpHO7rTGokMsk-kimi-4ogncmlAcNCJaPQWaGDvRpHO7rTGokMfddnoSZ8u5pNaXgg2aK4Tb4CCBbEIuv40fddnoSZ8u5pNaXgg2aK4Tb4CCBbEIuv40cmlAcNCJaPQWaGDvRpHO7rTGokMfddnoSZ8u5pNaXgg2aK4Tb4CCBbEIuv40fddnoSZ8u5pNaXgg2aK4Tb4CCBbEIuv40

智谱GLM CodingPlan

80ec82f2b14047d9a0399682a042378b.E8rv2nPSyuIsGoDr

阿里百炼通义千问CodingPlan

安装插件 sk-sp-9b5f973d23f84526b99132d0edf3b411

"auth": {
    "profiles": {
      "alibaba-cloud:default": {
        "provider": "alibaba-cloud",
        "mode": "api_key"
      }
    }
  },
"agents": {
    "defaults": {
      "model": {
        "fallbacks": [
          "zhipu/glm-4.7",
          "zhipu/glm-4.7-FlashX",
          "minimax/MiniMax-M2.1",
          "minimax/MiniMax-M2.1-lightning"
        ],
        "primary": "kimi-coding/k2p5"
      },
      "models": {
        "zhipu/glm-4.7": {},
        "zhipu/glm-4.7-FlashX": {},
        "minimax/MiniMax-M2.1": {},
        "minimax/MiniMax-M2.1-lightning": {},
        "alibaba-cloud/qwen3-max-2026-01-23": {},
        "kimi-coding/k2p5": {
          "alias": "Kimi K2.5"
        }
      },
      "workspace": "/root/.openclaw/workspace",
      "compaction": {
        "mode": "safeguard"
      },
      "maxConcurrent": 8,
      "subagents": {
        "maxConcurrent": 16
      }
  },
"models": {
    "mode": "merge",
    "providers": {
      "alibaba-cloud": {
        "baseUrl": "https://dashscope.aliyuncs.com/compatible-mode/v1",
        "api": "openai-completions",
        "models": [
          {
            "id": "qwen3-max-2026-01-23",
            "name": "qwen3-max-thinking",
            "reasoning": false,
            "input": [
              "text"
            ],
            "cost": {
              "input": 0,
              "output": 0,
              "cacheRead": 0,
              "cacheWrite": 0
            },
            "contextWindow": 262144,
            "maxTokens": 65536
          }
        ]
      }
    },
    "minimax": {
        "baseUrl": "https://api.minimaxi.com/anthropic",
        "apiKey": "sk-cp-8PugyKE2xsG0S4x4KzDuuIV6Z9bT1NFwkpfrOSG05djFVExAgYEPpp7iUaTcugT6_P4uBYIN9S75l3ij-Yd2Ct8f6CxdKWdgFahESfn_jla-SlU6oGUCBjk",
        "api": "anthropic-messages",
        "authHeader": true,
        "models": [
          {
            "id": "MiniMax-M2.1",
            "name": "MiniMax M2.1",
            "reasoning": false,
            "input": [
              "text"
            ],
            "cost": {
              "input": 15,
              "output": 60,
              "cacheRead": 2,
              "cacheWrite": 10
            },
            "contextWindow": 200000,
            "maxTokens": 8192
          },
          {
            "id": "MiniMax-M2.1-lightning",
            "name": "MiniMax M2.1 Lightning",
            "reasoning": false,
            "input": [
              "text"
            ],
            "cost": {
              "input": 15,
              "output": 60,
              "cacheRead": 2,
              "cacheWrite": 10
            },
            "contextWindow": 200000,
            "maxTokens": 8192
          }
        ]
      },
      "zhipu": {
        "baseUrl": "https://open.bigmodel.cn/api/coding/paas/v4",
        "apiKey": "80ec82f2b14047d9a0399682a042378b.E8rv2nPSyuIsGoDr",
        "api": "openai-completions",
        "models": [
          {
            "id": "{glm-4.7}",
            "name": "{glm 4.7}",
            "reasoning": false,
            "input": [
              "text"
            ],
            "cost": {
              "input": 0,
              "output": 0,
              "cacheRead": 0,
              "cacheWrite": 0
            },
            "contextWindow": 200000,
            "maxTokens": 8192
          },
          {
            "id": "glm-4.7-FlashX",
            "name": "glm 4.7 FlashX",
            "reasoning": false,
            "input": [
              "text"
            ],
            "cost": {
              "input": 0,
              "output": 0,
              "cacheRead": 0,
              "cacheWrite": 0
            },
            "contextWindow": 200000,
            "maxTokens": 8192
          }
        ]
      }
  },
"plugins": {
    "entries": {
      "alibaba-cloud-auth": {
        "enabled": true
      }
    }
  },
openclaw config set 'models.providers.zhipu' --json '{
  "baseUrl": "https://open.bigmodel.cn/api/coding/paas/v4",
  "apiKey": "80ec82f2b14047d9a0399682a042378b.E8rv2nPSyuIsGoDr",
  "api": "openai-completions",
  "models": [
    { "id": "{glm-4.7}", "name": "{glm 4.7}" }
  ]
}'

openclaw config set models.mode merge

openclaw models set zhipu/glm-4.7

搞外网访问

"hooks": {
	"internal": {
	  "enabled": true,
	  "entries": {
		"boot-md": {
		  "enabled": true
		},
		"command-logger": {
		  "enabled": true
		},
		"session-memory": {
		  "enabled": true
		}
	  }
	}
},

"gateway": {
    "port": 18789,
    "mode": "local",
    "bind": "lan",
    "co"c"controlUi": {
      "allowInsecureAuth": true
    },ontrolUi": {
      "allowInsecureAuth": true
    },ntrolUi": {
      "allowInsecureAuth": true
    },
    "auth": {
      "mode": "token",
      "token": "bef8134f5927f3321a3df17cde922b4a"
    },
    "tailscale": {
      "mode": "off",
      "resetOnExit": false
    },
    "http": {
      "endpoints": {
        "responses": {
          "enabled": true
        }
      }
    }
  },
  "plugins": {
    "entries": {
      "alibaba-cloud-auth": {
        "enabled": true
      },
      "alibaba-cloud-international-auth": {
        "enabled": true
      },
      "alibaba-cloud-us-auth": {
        "enabled": true
      }
    }
  },
  "tools": {
    "web": {
      "search": {
        "enabled": true,
        "provider": "brave",
        "apiKey": "BSAjOnKoRQhsGaUEWY57A3GZiXEgzzQ"
      }
    }
  }

宝塔面板

腾讯云 widg5guc c40f07bd ftp: micecola_com_cn kFRffxMA9aDmfakw http://47.82.1.197:18789/?token=eeaf68e4545727133f94bca0523cd0b3c72049c6d80aad59

搞聊天窗口

飞书

openclaw plugins install @m1heng-clawd/feishu
openclaw channels add
https://open.feishu.cn/?lang=zh-CN
cli_a9f74dc9a3f8dbce
QtnvzRUhhFoNTTorxJuAwgSJ3ocPv0p1
openclaw config set channels.feishu.appId "cli_a9f74dc9a3f8dbce"
openclaw config set channels.feishu.appSecret "QtnvzRUhhFoNTTorxJuAwgSJ3ocPv0p1"
openclaw config set channels.feishu.enabled true
# 推荐使用 websocket
openclaw config set channels.feishu.connectionMode websocket
openclaw config set channels.feishu.dmPolicy pairing
openclaw config set channels.feishu.groupPolicy allowlist
openclaw config set channels.feishu.requireMention true

IMessage

扩展功能

网络搜索

"tools": {
    "web": {
      "search": {
        "enabled": true,
        "provider": "brave",
        "apiKey": "BSAjOnKoRQhsGaUEWY57A3GZiXEgzzQ"
      }
    }
  }