OpenClaw Deploy On Debian Linux
Last updated
apt install python3-pip -ypip install litellm --break-system-packagesAmazonBedrockLimitedAccess
AmazonBedrockMarketplaceAccesscurl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o awscliv2.zip
unzip awscliv2.zip
./aws/installroot@debian:~# aws --version
aws-cli/2.34.7 Python/3.13.11 Linux/6.1.0-43-cloud-amd64 exe/x86_64.debian.12
root@debian:~# vim ~/.bashrc
export PATH="/usr/local/aws-cli/v2/current/bin:$PATH"
source ~/.bashrcaws configureaws_access_key_id = AKIXXXXXXXXXX
aws_secret_access_key = XXXXXXXXX
Default region name [None]: ap-northeast-1
Default output format [None]: jsonaws bedrock list-foundation-models --region ap-northeast-1vim config.yamlroot@Debian:~# cat config.yaml
model_list:
- model_name: sonnet
litellm_params:
model: bedrock/jp.anthropic.claude-sonnet-4-5-20250929-v1:0
- model_name: haiku
litellm_params:
model: bedrock/anthropic.claude-3-haiku-20240307-v1:0
router_settings:
routing_strategy: simple-shuffle
fallbacks:
- sonnet:
- haiku
root@Debian:~# litellm --config /root/config.yaml
INFO: Application startup complete.
INFO: Uvicorn running on http://0.0.0.0:4000 (Press CTRL+C to quit)curl http://127.0.0.1:4000/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{
"model":"sonnet",
"messages":[
{"role":"user","content":"hello"}
]
}'export NODE_OPTIONS="--max-old-space-size=1024"curl -fsSL https://openclaw.ai/install.sh | bashopenclaw onboardopenclaw config set agents.defaults.model sonnet◇ I understand this is personal-by-default and shared/multi-user use requires lock-down. Continue?
│ Yes
│
◇ Onboarding mode
│ QuickStart
◇ Config handling
│ Reset
◇ Reset scope
│ Full reset (config + creds + sessions + workspace)
Failed to move to Trash (manual delete): ~/.openclaw/openclaw.json
Failed to move to Trash (manual delete): ~/.openclaw/agents/main/sessions
│◇ Model/auth provider
│ LiteLLM
│
◇ Model configured ─────────────────────────────╮
│ │
│ Default model set to litellm/claude-opus-4-6 │
│ │
├────────────────────────────────────────────────╯
│
◇ Default model
│ Enter model manually
│
◇ Default model
│ sonnetopenclaw gateway runopenclaw config set model.baseURL http://127.0.0.1:4000/v1
#指向本地API端口
openclaw doctor --fix
#check openclaw debug
1. 检查端口是否被占用:lsof -i :18789
2. 查看错误日志:openclaw logs --follow
3. 运行诊断:openclaw doctor