fix gateway ssh and tailscale serve config

This commit is contained in:
2026-04-17 21:44:03 -04:00
parent 9844d756ce
commit 2250b25319
4 changed files with 16 additions and 50 deletions

View File

@@ -45,7 +45,7 @@ RUN echo '#!/bin/sh' > /home/node/.local/bin/tailscale-start.sh && \
echo 'sleep 3' >> /home/node/.local/bin/tailscale-start.sh && \
echo 'if [ -n "$TAILSCALE_AUTH_KEY" ]; then tailscale --socket=/tmp/tailscale.sock up --authkey="$TAILSCALE_AUTH_KEY" --hostname="${TAILSCALE_HOSTNAME:-openclaw-gateway}" || true; fi' >> /home/node/.local/bin/tailscale-start.sh && \
echo 'sleep 2' >> /home/node/.local/bin/tailscale-start.sh && \
echo 'tailscale --socket=/tmp/tailscale.sock serve --bg 18789 || true' >> /home/node/.local/bin/tailscale-start.sh && \
echo 'if [ "${OPENCLAW_TAILSCALE_MODE:-off}" = "serve" ]; then tailscale --socket=/tmp/tailscale.sock serve --bg 18789 || true; fi' >> /home/node/.local/bin/tailscale-start.sh && \
chmod +x /home/node/.local/bin/tailscale-start.sh
# Copy custom tools into the image
@@ -57,9 +57,9 @@ RUN chmod +x /usr/local/bin/*
RUN mkdir -p /var/tmp/openclaw-compile-cache /home/node/.openclaw/ssh /home/node/.openclaw/gog /home/node/.openclaw/gws /opt/openclaw/defaults \
&& chown -R node:node /home/node/.openclaw /opt/openclaw/defaults /var/tmp/openclaw-compile-cache
# Link ssh to standard locations
RUN mkdir -p /home/node/.ssh \
&& ln -sf /home/node/.openclaw/ssh /home/node/.ssh
# Link ssh to the persistent volume location
RUN rm -rf /home/node/.ssh \
&& ln -s /home/node/.openclaw/ssh /home/node/.ssh
# Copy default config into the image
COPY config/openclaw.json /opt/openclaw/defaults/openclaw.json