Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
58 lines
1.1 KiB
Bash
Executable File
58 lines
1.1 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
# Copyright (c) 2021-2026 community-scripts ORG
|
|
# Author: pfassina
|
|
# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE
|
|
# Source: https://github.com/openclaw/openclaw
|
|
|
|
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
|
color
|
|
verb_ip6
|
|
catch_errors
|
|
setting_up_container
|
|
network_check
|
|
update_os
|
|
|
|
NODE_VERSION="22" setup_nodejs
|
|
|
|
msg_info "Installing Dependencies"
|
|
$STD apt install -y git
|
|
msg_ok "Installed Dependencies"
|
|
|
|
msg_info "Installing OpenClaw"
|
|
$STD npm install -g openclaw@latest
|
|
mkdir -p /root/.openclaw
|
|
cat <<'CONF' >/root/.openclaw/openclaw.json
|
|
{
|
|
"gateway": {
|
|
"bind": "lan",
|
|
"port": 18789
|
|
}
|
|
}
|
|
CONF
|
|
msg_ok "Installed OpenClaw"
|
|
|
|
msg_info "Creating Service"
|
|
cat <<'EOF' >/etc/systemd/system/openclaw.service
|
|
[Unit]
|
|
Description=OpenClaw Gateway
|
|
After=network.target
|
|
|
|
[Service]
|
|
Type=simple
|
|
ExecStart=/usr/bin/openclaw gateway --allow-unconfigured --port 18789 --bind lan
|
|
Restart=always
|
|
RestartSec=10
|
|
Environment=NODE_ENV=production
|
|
Environment=PATH=/usr/bin:/usr/local/bin:/bin
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|
|
EOF
|
|
systemctl enable -q openclaw
|
|
msg_ok "Created Service"
|
|
|
|
motd_ssh
|
|
customize
|
|
cleanup_lxc
|