# Run on VPS as root
sudo bash -euo pipefail <<'EOF'
OC_USER="openclaw"
STATE_DIR="/home/${OC_USER}/.openclaw"
CONFIG="${STATE_DIR}/openclaw.json"
SERVICE="openclaw.service"
if ! systemctl cat "${SERVICE}" >/dev/null 2>&1; then SERVICE="openclaw-gateway.service"; fi
cp -a "${CONFIG}" "${CONFIG}.bak.$(date -u +%Y%m%dT%H%M%SZ)"
sudo -u "${OC_USER}" -H env HOME="/home/${OC_USER}" OPENCLAW_STATE_DIR="${STATE_DIR}" OPENCLAW_CONFIG_PATH="${CONFIG}" \
openclaw config set --strict-json agents.defaults.sandbox.mode '"off"'
systemctl restart "${SERVICE}"
systemctl is-active "${SERVICE}"
EOF
Do I run this on my local machine in the powershell app or how? I am using windows. I wanted to get deeper into this if it was useful. But I finally installed openclaw. Good experience.