SSH Tunneling for OpenClaw UI Access | Generated by AI

Home 2026.03

Question: If using SSH port forwarding with the command ssh -N -L 18789:127.0.0.1:18789 lzw@192.168.1.36, will the copy button work in the OpenClaw Control UI?

Answer:

Yes, using this SSH tunnel setup should allow the full Control UI (including the copy button and other clipboard features) to work properly in your browser.

Why this setup fixes the original WebSocket issue and enables copy functionality

How to use it correctly

  1. On your local computer, open a terminal and run:
    ssh -N -L 18789:127.0.0.1:18789 lzw@192.168.1.36
    
    • Keep this terminal open (the tunnel dies if you close it).
    • You may need to enter the password or use key-based auth.
  2. In your browser (on the same local computer), go to:
    http://localhost:18789
    (or http://127.0.0.1:18789 — same thing)

  3. Log in with your gateway token if prompted (usually shown during onboarding or in ~/.openclaw/openclaw.json on the server).

  4. The Control UI should load fully, WebSocket connects without closure, and copy buttons (e.g. for tokens, commands, logs) function normally.

Optional: Make it more convenient

This SSH tunnel method is the officially recommended way in OpenClaw docs for secure LAN/remote access without exposing the port publicly or setting up HTTPS.

References:


Back Donate