我要评分
获取效率
正确性
完整性
易理解

Deploying an OpenClaw Instance

  1. Deploy the source and install dependencies.
    1. Update the Node.js 22 source. The current openEuler image does not support version check in the Node.js 22 installation script. You need to comment out the relevant code.

      If wget downloads fail due to certificate issues, resolve them by running the following command first:

      echo "check_certificate=off" > ~/.wgetrc

      Run the sed command to comment out the architecture check section in setup_22.x.

      wget https://rpm.nodesource.com/setup_22.x
      sed -i '35,37s/^/#/' setup_22.x
      bash setup_22.x
    2. Install the dependencies.
      yum install -y git cmake
      yum install -y nsolid

      If the Node.js 22 installation fails due to network issues, download and install it in a stable network environment:

      wget https://rpm.nodesource.com/pub_22.x/nodistro/nsolid/aarch64/nsolid-22.22.0-ns6.2.0.aarch64.rpm
      rpm -ivh nsolid-22.22.0-ns6.2.0.aarch64.rpm

    3. After the installation is complete, run the following command to verify:
      node -v

    4. Install pnpm.
      npm install -g pnpm

      If the following error occurs during installation, disable certificate verification:

      npm config set strict-ssl false

  2. Install and configure OpenClaw.
    1. Configure the environment variables. Typically, <openclaw_installation_directory> defaults to ~/.
      export OPENCLAW_STATE_DIR="<openclaw_installation_directory>/.openclaw"
      export OPENCLAW_CONFIG_PATH="<openclaw_installation_directory>/.openclaw/openclaw.json"
    2. Install OpenClaw.
      cd <work_dir>
      git clone https://github.com/openclaw/openclaw.git
      cd openclaw
      pnpm install
      • The environment variables specify the path to the OpenClaw configuration files. Modify the paths based on your actual environment.
      • To bypass verification, run git config --global http.sslVerify false.
      pnpm setup
      source /root/.bashrc
      pnpm link --global
      pnpm run build

      If pnpm run build encounters a Node.js out-of-memory error, manually increase the memory limit by running export NODE_OPTIONS="--max-old-space-size=4096".

    3. Check the OpenClaw version.
      openclaw -v