Update install

This commit is contained in:
Michel Roegl-Brunner 2026-01-26 14:11:03 +01:00
parent 602f23f92a
commit d9a075139a
3 changed files with 37 additions and 33 deletions

View File

@ -62,5 +62,5 @@ description
msg_ok "Completed Successfully!\n" msg_ok "Completed Successfully!\n"
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}" echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
echo -e "${INFO}${YW} Access it using the following URL:${CL}" echo -e "${INFO}${YW} Access it using the following URL:${CL}"
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:18791${CL}" echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:80${CL}"

View File

@ -8,7 +8,7 @@
"type": "ct", "type": "ct",
"updateable": true, "updateable": true,
"privileged": false, "privileged": false,
"interface_port": 18791, "interface_port": 80,
"documentation": "https://docs.clawd.bot/", "documentation": "https://docs.clawd.bot/",
"website": "https://clawd.bot/", "website": "https://clawd.bot/",
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons@main/webp/clawdbot.webp", "logo": "https://cdn.jsdelivr.net/gh/selfhst/icons@main/webp/clawdbot.webp",
@ -31,6 +31,10 @@
"username": null, "username": null,
"password": null "password": null
}, },
"notes": [] "notes": [
{
"type": "info",
"text": "After install run onboarding: clawdbot onboard --install-daemon"
}
]
} }

View File

@ -16,41 +16,41 @@ update_os
msg_info "Installing Dependencies" msg_info "Installing Dependencies"
$STD apt-get install -y \ $STD apt-get install -y \
build-essential \ build-essential \
git git \
nginx
msg_ok "Installed Dependencies" msg_ok "Installed Dependencies"
NODE_VERSION="24" NODE_MODULE="clawdbot@latest" setup_nodejs NODE_VERSION="24" NODE_MODULE="clawdbot@latest" setup_nodejs
import_local_ip import_local_ip
msg_info "Configuring Clawdbot"
mkdir -p /opt/clawdbot/data msg_info "Configuring Nginx"
cat <<EOF >/opt/clawdbot/.env cat <<EOF >/etc/nginx/sites-available/clawdbot
NODE_ENV=production server {
GATEWAY_PORT=18791 listen 80;
GATEWAY_HOST=0.0.0.0 server_name _;
location / {
proxy_pass http://127.0.0.1:18791;
proxy_http_version 1.1;
proxy_set_header Upgrade \$http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host \$host;
proxy_set_header X-Real-IP \$remote_addr;
proxy_set_header X-Forwarded-For \$proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto \$scheme;
proxy_cache_bypass \$http_upgrade;
proxy_buffering off;
proxy_read_timeout 86400s;
proxy_send_timeout 86400s;
}
}
EOF EOF
msg_ok "Configured Clawdbot" ln -sf /etc/nginx/sites-available/clawdbot /etc/nginx/sites-enabled/clawdbot
rm -f /etc/nginx/sites-enabled/default
msg_info "Creating Service" $STD nginx -t
cat <<EOF >/etc/systemd/system/clawdbot.service $STD systemctl enable -q --now nginx
[Unit] msg_ok "Configured Nginx"
Description=Clawdbot Service
After=network.target
[Service]
Type=simple
User=root
WorkingDirectory=/opt/clawdbot
EnvironmentFile=/opt/clawdbot/.env
ExecStart=/usr/bin/clawdbot
Restart=on-failure
RestartSec=5
[Install]
WantedBy=multi-user.target
EOF
systemctl enable -q --now clawdbot
msg_ok "Created Service"
motd_ssh motd_ssh
customize customize