Some checks failed
CI / docs-scope (push) Has been cancelled
CI / changed-scope (push) Has been cancelled
CI / build-artifacts (push) Has been cancelled
CI / release-check (push) Has been cancelled
CI / checks (pnpm canvas:a2ui:bundle && bunx vitest run --config vitest.unit.config.ts, bun, test) (push) Has been cancelled
CI / checks (pnpm canvas:a2ui:bundle && pnpm test, node, test) (push) Has been cancelled
CI / checks (pnpm protocol:check, node, protocol) (push) Has been cancelled
CI / check (push) Has been cancelled
CI / dead-code report (pnpm deadcode:report:ci:knip, knip) (push) Has been cancelled
CI / dead-code report (pnpm deadcode:report:ci:ts-prune, ts-prune) (push) Has been cancelled
CI / dead-code report (pnpm deadcode:report:ci:ts-unused, ts-unused-exports) (push) Has been cancelled
CI / check-docs (push) Has been cancelled
CI / secrets (push) Has been cancelled
CI / checks-windows (pnpm canvas:a2ui:bundle && pnpm test, node, test) (push) Has been cancelled
CI / checks-windows (pnpm lint, node, lint) (push) Has been cancelled
CI / checks-windows (pnpm protocol:check, node, protocol) (push) Has been cancelled
CI / macos (push) Has been cancelled
CI / ios (push) Has been cancelled
CI / android (./gradlew --no-daemon :app:assembleDebug, build) (push) Has been cancelled
CI / android (./gradlew --no-daemon :app:testDebugUnitTest, test) (push) Has been cancelled
Install Smoke / docs-scope (push) Has been cancelled
Install Smoke / install-smoke (push) Has been cancelled
Workflow Sanity / no-tabs (push) Has been cancelled
Workflow Sanity / actionlint (push) Has been cancelled
Docker Release / build-amd64 (push) Has been cancelled
Docker Release / build-arm64 (push) Has been cancelled
Docker Release / create-manifest (push) Has been cancelled
58 lines
1.2 KiB
Bash
58 lines
1.2 KiB
Bash
#!/usr/bin/env bash
|
|
set -e
|
|
|
|
INSTALL_DIR="/opt/openclaw"
|
|
REPO="https://git.yalu.pro/evgeny/openclaw.git"
|
|
|
|
# ====== PORT SETTINGS ======
|
|
OPENCLAW_PORT="${OPENCLAW_PORT:-18789}"
|
|
OPENCLAW_HOST="${OPENCLAW_HOST:-0.0.0.0}"
|
|
|
|
echo "Installing OpenClaw..."
|
|
echo "Gateway will run on: ${OPENCLAW_HOST}:${OPENCLAW_PORT}"
|
|
|
|
# ====== Node 22 ======
|
|
if ! command -v node >/dev/null || [[ $(node -v | cut -d. -f1 | tr -d v) -lt 22 ]]; then
|
|
curl -fsSL https://deb.nodesource.com/setup_22.x | bash -
|
|
apt install -y nodejs
|
|
fi
|
|
|
|
# ====== pnpm ======
|
|
if ! command -v pnpm >/dev/null; then
|
|
npm install -g pnpm
|
|
fi
|
|
|
|
# ====== clone or update ======
|
|
if [ -d "$INSTALL_DIR" ]; then
|
|
git -C "$INSTALL_DIR" pull
|
|
else
|
|
git clone "$REPO" "$INSTALL_DIR"
|
|
fi
|
|
|
|
cd "$INSTALL_DIR"
|
|
|
|
pnpm install
|
|
pnpm build
|
|
|
|
echo "Running onboarding..."
|
|
npx openclaw onboard
|
|
|
|
echo "Starting OpenClaw..."
|
|
|
|
# передаём порт в runtime
|
|
export OPENCLAW_PORT
|
|
export OPENCLAW_HOST
|
|
|
|
npx openclaw start &
|
|
|
|
sleep 5
|
|
|
|
SERVER_IP=$(hostname -I | awk '{print $1}')
|
|
|
|
echo ""
|
|
echo "====================================="
|
|
echo " OpenClaw is running!"
|
|
echo ""
|
|
echo " Local: http://localhost:${OPENCLAW_PORT}"
|
|
echo " Server: http://${SERVER_IP}:${OPENCLAW_PORT}"
|
|
echo "=====================================" |