From 6ccf92ee92076bfa48e06320e1b0576a4c7608d1 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 20 Mar 2026 04:09:29 +0000 Subject: [PATCH 1/3] Initial plan From 4d42026d393361a2eb5388b9aef25356baba84b0 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 20 Mar 2026 04:12:25 +0000 Subject: [PATCH 2/3] feat: add gohttpserver web-based file manager on port 8888 Co-authored-by: Pol-Lanski <19168735+Pol-Lanski@users.noreply.github.com> --- Dockerfile | 18 ++++++++++++++++-- dappnode_package.json | 7 +++++++ entrypoint.sh | 14 ++++++++++++++ 3 files changed, 37 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index a89dc69..3667f7c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -45,8 +45,22 @@ COPY setup-wizard/ /app/setup-wizard/ COPY entrypoint.sh /usr/local/bin/entrypoint.sh RUN chmod +x /usr/local/bin/entrypoint.sh -# Expose gateway, bridge, terminal, and setup wizard ports -EXPOSE 18789 18790 7681 8080 +# Install gohttpserver (web-based file manager) - static binary from GitHub releases +RUN ARCH=$(dpkg --print-architecture) && \ + if [ "$ARCH" = "amd64" ]; then GHS_ARCH="amd64"; \ + elif [ "$ARCH" = "arm64" ]; then GHS_ARCH="arm64"; \ + else echo "Unsupported architecture: $ARCH" && exit 1; fi && \ + TARBALL="gohttpserver_1.3.0_linux_${GHS_ARCH}.tar.gz" && \ + curl -fsSL "https://github.com/codeskyblue/gohttpserver/releases/download/1.3.0/${TARBALL}" \ + -o "/tmp/${TARBALL}" && \ + curl -fsSL "https://github.com/codeskyblue/gohttpserver/releases/download/1.3.0/gohttpserver_1.3.0_checksums.txt" \ + | grep "${TARBALL}" | sha256sum --check --status && \ + tar -xz -C /usr/local/bin --strip-components=0 -f "/tmp/${TARBALL}" gohttpserver && \ + chmod +x /usr/local/bin/gohttpserver && \ + rm "/tmp/${TARBALL}" + +# Expose gateway, bridge, terminal, setup wizard, and file manager ports +EXPOSE 18789 18790 7681 8080 8888 # Health check for DappNode monitoring HEALTHCHECK --interval=30s --timeout=10s --start-period=60s --retries=3 \ diff --git a/dappnode_package.json b/dappnode_package.json index 1e7c449..11605f9 100644 --- a/dappnode_package.json +++ b/dappnode_package.json @@ -36,6 +36,7 @@ "homepage": "https://openclaw.ai", "ui": "http://openclaw.dappnode:18789#token=openclaw", "terminal": "http://openclaw.dappnode:7681", + "files": "http://openclaw.dappnode:8888", "setup-wizard": "http://openclaw.dappnode:8080", "docs": "https://docs.openclaw.ai" }, @@ -80,6 +81,12 @@ "description": "Web-based setup wizard for easy configuration", "serviceName": "gateway", "port": 8080 + }, + { + "name": "OpenClaw File Manager", + "description": "Web-based file manager for browsing and managing OpenClaw data files", + "serviceName": "gateway", + "port": 8888 } ], "warnings": { diff --git a/entrypoint.sh b/entrypoint.sh index 11b923b..f850ba0 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -78,6 +78,20 @@ ttyd \ TTYD_PID=$! echo "ttyd started (PID: ${TTYD_PID})" +# --------------------------------------------------------------------------- +# Start gohttpserver (web-based file manager) in the background on port 8888 +# No application-level auth: access is controlled at the DAppNode network level, +# consistent with the ttyd terminal which also relies on DAppNode access control. +# --------------------------------------------------------------------------- +echo "Starting gohttpserver file manager on port 8888..." +gohttpserver \ + --port 8888 \ + --root "$OPENCLAW_DIR" \ + --upload \ + --delete & +GOHTTPSERVER_PID=$! +echo "gohttpserver started (PID: ${GOHTTPSERVER_PID})" + # Execute the main command (runs as root; no-new-privileges prevents gosu/sudo) if [ -n "$EXTRA_OPTS" ]; then exec "$@" $EXTRA_OPTS From 2ffd997b6b96fe53f37598e797ce2467664b3305 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 20 Mar 2026 04:27:07 +0000 Subject: [PATCH 3/3] fix: correct sha256 checksum verification path for gohttpserver Co-authored-by: Pol-Lanski <19168735+Pol-Lanski@users.noreply.github.com> --- Dockerfile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 3667f7c..73ea109 100644 --- a/Dockerfile +++ b/Dockerfile @@ -53,8 +53,10 @@ RUN ARCH=$(dpkg --print-architecture) && \ TARBALL="gohttpserver_1.3.0_linux_${GHS_ARCH}.tar.gz" && \ curl -fsSL "https://github.com/codeskyblue/gohttpserver/releases/download/1.3.0/${TARBALL}" \ -o "/tmp/${TARBALL}" && \ - curl -fsSL "https://github.com/codeskyblue/gohttpserver/releases/download/1.3.0/gohttpserver_1.3.0_checksums.txt" \ - | grep "${TARBALL}" | sha256sum --check --status && \ + EXPECTED=$(curl -fsSL "https://github.com/codeskyblue/gohttpserver/releases/download/1.3.0/gohttpserver_1.3.0_checksums.txt" \ + | grep "${TARBALL}" | awk '{print $1}') && \ + ACTUAL=$(sha256sum "/tmp/${TARBALL}" | awk '{print $1}') && \ + [ "$EXPECTED" = "$ACTUAL" ] || (echo "Checksum mismatch for ${TARBALL}" && exit 1) && \ tar -xz -C /usr/local/bin --strip-components=0 -f "/tmp/${TARBALL}" gohttpserver && \ chmod +x /usr/local/bin/gohttpserver && \ rm "/tmp/${TARBALL}"