银行麒麟桌面操作系统 V10 SP1

安装流程

首先安装依赖程序:

sudo apt update 

sudo apt -y install git curl build-essential jq ca-certificates openssl

 

安装nodejs 22:

curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash -

sudo apt-get install -y nodejs

node --version && npm --version

最后在线安装最新版本的clawdbot

sudo npm install -g clawdbot@latest
clawdbot --version

这样就按照成功了,具体调试,对接国产kimi大模型,参考我其他文章。

 

 

以下是clawdbot的调试命令,我没有挨个测试

Run the onboarding wizard and install the user-level systemd service for the gateway:

clawdbot onboard --install-daemon

The wizard will prompt you to:

  • Authenticate or initialize a local profile
  • Add at least one LLM provider key (for example, OpenAI or Anthropic)
  • Add a messaging channel, such as a Telegram bot token (create one via BotFather; see the Telegram Bot API docs)

When onboarding completes, the gateway service is installed under your user account.

Keep the service running after logout

On Linux, user services stop when you log out unless lingering is enabled. Turn it on and check the service status.

sudo loginctl enable-linger "$USER"
systemctl --user daemon-reload
systemctl --user enable --now clawdbot-gateway.service
systemctl --user status clawdbot-gateway.service

You should see Active: active (running). If it’s not running, inspect logs:

journalctl --user -u clawdbot-gateway.service -f

Clawdbot also includes health and status commands. They provide quick diagnostics:

clawdbot status
clawdbot health
clawdbot gateway status
clawdbot gateway probe

Look for lines like Gateway reachable and a local probe URL such as ws://127.0.0.1:18789.

Secure the instance and expose only what you need

Keep the gateway bound to localhost unless you specifically need remote access or webhooks. For basic protection, configure UFW to allow SSH and otherwise deny inbound traffic.

sudo ufw allow OpenSSH
sudo ufw enable
sudo ufw status verbose

If you must expose a webhook or an admin endpoint on a domain, consider using NGINX as a reverse proxy with TLS via Certbot.

Example sketch with a domain of example.com:

sudo apt -y install nginx
sudo ufw allow 'Nginx Full'
# create a simple server block proxying to the local gateway port if needed
sudo nano /etc/nginx/sites-available/clawdbot.conf

Paste a minimal proxy and adjust the upstream port to match your gateway’s binding (keep it on 127.0.0.1):

server {
    listen 80;
    server_name example.com;

    location / {
        proxy_pass http://127.0.0.1:18789;
        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_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
    }
}

Enable the site and obtain a certificate:

sudo ln -s /etc/nginx/sites-available/clawdbot.conf /etc/nginx/sites-enabled/
sudo nginx -t && sudo systemctl reload nginx
sudo snap install core; sudo snap refresh core
sudo snap install --classic certbot
sudo certbot --nginx -d example.com

If you don’t need public access, skip NGINX entirely and rely on local binding with UFW protecting the host.

Monitor, update, and back up

A few basics keep things smooth on a small VPS.

  • Monitor resources briefly after first run:
htop
free -h
journalctl --user -u clawdbot-gateway.service -n 50
  • Update Clawdbot to the latest release and restart the gateway:
sudo npm install -g clawdbot@latest
clawdbot gateway restart
clawdbot status && clawdbot health
  • Back up config and consider snapshots before major updates. If you’ve set a custom state directory, back it up, or take a VPS snapshot from your provider’s panel.

Troubleshooting quick fixes

  • Node version mismatch: If clawdbot errors on startup, verify node --version prints v22.x. Reinstall Node via the NodeSource steps and rerun npm install -g clawdbot@latest.
  • Service not staying up: Ensure lingering is enabled with sudo loginctl enable-linger "$USER". Check systemctl --user status and journalctl logs for specific errors.
  • Out-of-memory during installs: Add a 2–4GB swap file and retry. Close other processes; consider upgrading RAM if the workload grows.
  • Port or firewall issues: Keep the gateway on 127.0.0.1 unless you know you need external access. If you must expose a port, allow it explicitly with UFW and confirm bindings with ss -ltnp.
  • Channel or provider credentials: Re-run the onboarding to fix tokens, or use the CLI to inspect channels. Telegram tokens come from BotFather; double-check that your bot is added to the intended chat or group.