prepare install pkgs for openclaw
prepare install pkgs for openclaw
·
1,install node
sudo apt install curl curl -sL https://deb.nodesource.com/setup_lts.x | sudo -E bash - sudo apt install nodejs
2,install clashverge rev
a, downlaod
https://hub.trippal.asia/clash-verge-rev/clash-verge-rev/releases/tag/v2.4.6
b, installation
sudo dpkg -i Clash.Verge_2.4.6_amd64.deb
c, configure subscription
https://liangxin.xyz/api/v1/liangxin?OwO=7c8822bb4683b18c84c5c9d4126d9ffb
d, configure global script to add self-hosted node
// Define main function (script entry)
function main(config) {
// 1. Define the VLESS Reality node
const awsNode = {
name: "aws",
type: "vless",
server: "44.200.240.158",
port: 443,
uuid: "c9fedf7a-f25b-4c48-985d-98b21f2d09b6",
udp: true,
tls: true,
"skip-cert-verify": false,
flow: "xtls-rprx-vision",
"client-fingerprint": "chrome",
servername: "www.apple.com",
"reality-opts": {
"public-key": "vtZJcZ_WDNvwq43ljDzeBksnGBq-NqN1PoKn6PbLmDU"
}
};
// 2. Add the node to the global proxies array
if (!config.proxies) {
config.proxies = [];
}
config.proxies.push(awsNode);
// 3. Add the node to EVERY proxy group
if (config["proxy-groups"] && Array.isArray(config["proxy-groups"])) {
config["proxy-groups"].forEach((group) => {
if (!group.proxies) {
group.proxies = [];
}
// Prevent duplicates and add to top
if (!group.proxies.includes(awsNode.name)) {
group.proxies.unshift(awsNode.name);
}
});
}
// 4. Prepend the custom rule (NEW)
// We use unshift to put it at the start of the array so it matches first
if (!config.rules) {
config.rules = [];
}
const myRule = "DOMAIN,home.trippal.asia,DIRECT";
// Check if rule already exists to avoid duplicates
if (!config.rules.includes(myRule)) {
config.rules.unshift(myRule);
}
return config;
}
e, enable virutal network mode,and install service firstly
sudo /usr/bin/clash-verge-service-install
enable virutal network mode
3,install docker
# Add Docker's official GPG key:
sudo apt update
sudo apt install ca-certificates curl
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc
# Add the repository to Apt sources:
sudo tee /etc/apt/sources.list.d/docker.sources <<EOF
Types: deb
URIs: https://download.docker.com/linux/ubuntu
Suites: $(. /etc/os-release && echo "${UBUNTU_CODENAME:-$VERSION_CODENAME}")
Components: stable
Signed-By: /etc/apt/keyrings/docker.asc
EOF
sudo apt update
# install docker
96 sudo apt install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
97 sudo systemctl status docker
100 docker ps
101 sudo usermod -aG docker $USER
102 newgrp docker
4, install ctyun_alive script to keep alive
a, download source git clone https://github.com/dongzhisub/ctyun_alive.git b, make a docker image docker build -t myctyunalive:1.1 . c, install chromimun in the local to setup user-data dir. mkdir data sudo apt-get install chromium-browser chromium-browser --user-data-dir=./data/ (in the browser, please access pc.ctyun.cn and do a login) d,run docker docker compose -f docker-compose-local.yml down docker compose -f docker-compose-local.yml up
5, setup git
git config --global user.email "dongzhisub@yahoo.com" git config --global user.name "dongzhisub"
6, install openclaw
curl -fsSL https://openclaw.ai/install.sh | bash
7, configure openclaw
https://zhuanlan.zhihu.com/p/2008967279078024338 https://zhuanlan.zhihu.com/p/2003215600378454774 # feishu configure https://blog.csdn.net/qq_59308920/article/details/157730182 https://developer.aliyun.com/article/1711216 # https://github.com/xianyu110/clawbot https://www.youtube.com/watch?v=masJoPqT-6A&t=16s https://eastondev.com/blog/zh/posts/ai/20260205-openclaw-config-guide/