How to Access OpenClaw Privately with Tailscale

By James Wilson | Last updated on November 23, 2026

Knowing how to access OpenClaw privately with Tailscale lets you use your AI agent dashboard, webhooks, and control UI from any laptop or phone without ever exposing port 18789 to the public internet.

Because OpenClaw has shell, file, and tool execution permissions, leaving its Gateway bound to 0.0.0.0 or behind an unauthenticated reverse proxy creates unnecessary risk. By keeping OpenClaw bound to 127.0.0.1 (loopback) and enabling Tailscale Serve, Tailscale terminates HTTPS certificates automatically over your private MagicDNS hostname and verifies tailnet identity before any request reaches your Gateway.

Whether you host OpenClaw on self-managed VPS hosting or fully managed VPS hosting with Aveshost, this guide walks through prerequisites, CLI and config setup, identity headers, and firewall verification.

How OpenClaw and Tailscale Serve Work Together

If you are new to private mesh networking, our Tailscale VPS security guide explains how Tailscale assigns each authorized device a private 100.x.y.z WireGuard address.

Instead of opening port 18789 in UFW or managing Nginx and Certbot manually for an internal dashboard, OpenClaw’s Tailscale integration pairs two clean layers:

• Loopback Gateway Binding (127.0.0.1:18789): The OpenClaw Gateway listens only on localhost, so public internet scanners and external VPS interfaces cannot reach it.

• Tailscale Serve Proxy (Port 443): Running on the same VPS, Tailscale provisions a valid TLS certificate for your MagicDNS hostname (such as https://openclaw.your-tailnet.ts.net) and proxies HTTPS requests from your authenticated tailnet devices directly to 127.0.0.1:18789.

Architecture diagram showing private OpenClaw access via Tailscale Serve HTTPS proxy to 127.0.0.1:18789

Prerequisites: MagicDNS, HTTPS Certificates, and Auth Mode

Before configuring OpenClaw, confirm three settings in your Tailscale Admin Console and VPS environment:

• 1. Tailscale Logged In on Your VPS & Client: Install Tailscale on your Ubuntu VPS and connect both the VPS and your laptop/phone to the same tailnet.

• 2. Enable MagicDNS & HTTPS Certificates: In the Tailscale Admin Console under DNS, make sure MagicDNS is enabled and turn on HTTPS Certificates so Tailscale can issue TLS certs for your .ts.net node URL.

• 3. Keep OpenClaw Auth Enabled: Tailscale Serve cannot be paired with gateway.auth.mode: "none". Configure a strong token or password auth mode, and optionally set allowTailscale: true.

Tailscale ModeWho Can Reach OpenClaw?TLS CertificatesRecommended For
serve (Tailnet-Only)Only authenticated devices on your private Tailscale networkAutomatic Let’s Encrypt cert on .ts.netPrivate OpenClaw dashboard & admin control (recommended)
funnel (Public Internet)Anyone on the public internetAutomatic Let’s Encrypt cert on .ts.netPublic webhook endpoints only (avoid for admin UI)
off + bind: loopbackLocalhost SSH tunnel onlyNone (HTTP on 127.0.0.1)Single-server SSH port forwarding fallback

Step 1: Configure OpenClaw for Loopback + Tailscale Serve

You can configure OpenClaw’s Tailscale integration either with three CLI commands or directly inside ~/.openclaw/openclaw.json. Both approaches keep the Gateway bound strictly to loopback (127.0.0.1:18789) while instructing Tailscale Serve to expose HTTPS privately across your tailnet.

Make sure you set gateway.auth.mode to "token" (or "password") with a long random secret before restarting the Gateway. OpenClaw refuses to start Tailscale Serve if authentication is disabled, ensuring that every session reaching your agent dashboard is backed by both WireGuard transport encryption and Gateway auth.

If you prefer manual control over Tailscale without OpenClaw managing the daemon state, you can also run tailscale serve --bg --https=443 http://127.0.0.1:18789 directly via the Tailscale Serve CLI.

# Configure OpenClaw Gateway for loopback + Tailscale Serve
openclaw config set gateway.bind loopback
openclaw config set gateway.tailscale.mode serve
openclaw gateway restart
// ~/.openclaw/openclaw.json
{
  "gateway": {
    "port": 18789,
    "bind": "loopback",
    "auth": {
      "mode": "token",
      "token": "replace-with-long-random-secret",
      "allowTailscale": true
    },
    "tailscale": {
      "mode": "serve"
    }
  }
}

Step 2: Verify Identity Headers and Connect Over HTTPS

When gateway.auth.allowTailscale is set to true, OpenClaw verifies incoming requests by querying the local Tailscale daemon (tailscale whois) and matching the forwarded identity header (tailscale-user-login). This lets your authorized tailnet devices open the OpenClaw web dashboard smoothly without re-entering tokens on every trusted browser.

If you want to restrict which devices on your tailnet can reach the OpenClaw node, combine allowTailscale with tag-based Access Controls in your Tailscale Admin Console—for example, allowing only tag:admin-devices to reach port 443 on your tag:openclaw server.

Open https://your-vps-name.your-tailnet.ts.net in your browser from any device connected to Tailscale. The very first request may pause for a few seconds while Tailscale provisions and caches your node’s TLS certificate.

Step 3: Verify Zero Public Exposure on Your VPS

After confirming private HTTPS access works over your .ts.net URL, verify that port 18789 is not exposed publicly in UFW or Docker. Run ss -tulpn | grep 18789 to confirm OpenClaw listens strictly on 127.0.0.1:18789, and run tailscale serve status to ensure only private Serve (never public Funnel) is active.

If you run OpenClaw inside Docker alongside other tools on Aveshost self-managed VPS hosting or fully managed VPS hosting, review our Docker and UFW port safety guide and monitor uptime privately using Uptime Kuma.

Six-step security checklist for accessing OpenClaw privately with Tailscale Serve
# 1. Confirm OpenClaw listens only on 127.0.0.1:18789
ss -tulpn | grep 18789

# 2. Verify Tailscale Serve status (never Funnel for admin UI)
tailscale serve status

Frequently asked questions

Is OpenClaw exposed to the public internet when using Tailscale Serve?

No. Tailscale Serve only accepts connections from authenticated devices inside your private Tailscale network (tailnet). Public internet users cannot reach your .ts.net Serve URL or port 18789 when OpenClaw is bound to loopback.

What is the difference between Tailscale Serve and Tailscale Funnel for OpenClaw?

Tailscale Serve exposes your local service exclusively to devices on your private tailnet, while Tailscale Funnel exposes a service to the public internet. Always use Serve—not Funnel—for your OpenClaw dashboard and Gateway.

Why does the first HTTPS request to my OpenClaw Tailscale URL take a few seconds?

On the first HTTPS connection after enabling Tailscale Serve, Tailscale automatically provisions and validates a Let’s Encrypt TLS certificate for your MagicDNS hostname. Subsequent requests load immediately.

Can I use Tailscale Serve with OpenClaw gateway.auth.mode set to none?

No. OpenClaw requires authentication (such as token, password, or trusted-proxy) when Tailscale Serve is enabled. Set gateway.auth.mode to token with a strong secret and optionally enable allowTailscale: true.

How do I stop exposing OpenClaw via Tailscale Serve?

Run openclaw config set gateway.tailscale.mode off && openclaw gateway restart, or run tailscale serve off in your VPS terminal if you started Serve manually.

James Wilson

For over 10 years, James Wilson has been working in the tech industry. He's an expert in areas like software development, cybersecurity, and cloud computing. He understands the challenges and opportunities that new tech companies face, and he's known for coming up with creative solutions to help them succeed.