From d9a075139a63538a49846e59b52e36b251e74027 Mon Sep 17 00:00:00 2001 From: Michel Roegl-Brunner Date: Mon, 26 Jan 2026 14:11:03 +0100 Subject: [PATCH] Update install --- ct/clawdbot.sh | 2 +- frontend/public/json/clawdbot.json | 10 ++++-- install/clawdbot-install.sh | 58 +++++++++++++++--------------- 3 files changed, 37 insertions(+), 33 deletions(-) diff --git a/ct/clawdbot.sh b/ct/clawdbot.sh index dadefee2f..868da8c38 100644 --- a/ct/clawdbot.sh +++ b/ct/clawdbot.sh @@ -62,5 +62,5 @@ description msg_ok "Completed Successfully!\n" echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${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}" diff --git a/frontend/public/json/clawdbot.json b/frontend/public/json/clawdbot.json index ca21f9043..d444b60ca 100644 --- a/frontend/public/json/clawdbot.json +++ b/frontend/public/json/clawdbot.json @@ -8,7 +8,7 @@ "type": "ct", "updateable": true, "privileged": false, - "interface_port": 18791, + "interface_port": 80, "documentation": "https://docs.clawd.bot/", "website": "https://clawd.bot/", "logo": "https://cdn.jsdelivr.net/gh/selfhst/icons@main/webp/clawdbot.webp", @@ -31,6 +31,10 @@ "username": null, "password": null }, - "notes": [] + "notes": [ + { + "type": "info", + "text": "After install run onboarding: clawdbot onboard --install-daemon" + } + ] } - diff --git a/install/clawdbot-install.sh b/install/clawdbot-install.sh index 861a8570f..ed44b0ef3 100644 --- a/install/clawdbot-install.sh +++ b/install/clawdbot-install.sh @@ -16,41 +16,41 @@ update_os msg_info "Installing Dependencies" $STD apt-get install -y \ build-essential \ - git + git \ + nginx msg_ok "Installed Dependencies" NODE_VERSION="24" NODE_MODULE="clawdbot@latest" setup_nodejs import_local_ip -msg_info "Configuring Clawdbot" -mkdir -p /opt/clawdbot/data -cat </opt/clawdbot/.env -NODE_ENV=production -GATEWAY_PORT=18791 -GATEWAY_HOST=0.0.0.0 + +msg_info "Configuring Nginx" +cat </etc/nginx/sites-available/clawdbot +server { + listen 80; + 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 -msg_ok "Configured Clawdbot" - -msg_info "Creating Service" -cat </etc/systemd/system/clawdbot.service -[Unit] -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" +ln -sf /etc/nginx/sites-available/clawdbot /etc/nginx/sites-enabled/clawdbot +rm -f /etc/nginx/sites-enabled/default +$STD nginx -t +$STD systemctl enable -q --now nginx +msg_ok "Configured Nginx" motd_ssh customize