Kodename JPG
IDEN

Accessing Local AI from Your Phone via LAN & Cloudflare Tunnel


Written: Nov 28, 2026 · Level: Intermediate · Category: AI Agent


Home > Tutorials > Accessing Local AI from Your Phone via LAN & Cloudflare Tunnel

Once local AI is running on your laptop, the next step is opening it from your phone — so you can chat with your AI while lying on the couch, without sitting in front of the laptop. There are two situations: at home (phone and laptop on the same WiFi) and outside the house (phone anywhere).
Prerequisite: the previous tutorial is done — Ollama and Open WebUI are already running on your laptop (Local AI on Linux: Ollama + Open WebUI on a Potato Laptop).

Method 1: Local Network (Same WiFi)




If your phone and laptop are on the same WiFi, this is the easiest way — nothing to install. First, find your laptop's IP address:
ip addr

Look for the inet line on your WiFi interface (usually wlan0 or wlp2s0) — for example 192.168.1.10. Then open your phone's browser and type:
http://laptop-IP:3000

For example: if your laptop's IP is 192.168.1.10, open http://192.168.1.10:3000. Open WebUI opens just like on the laptop — log in with the admin account you created in the previous tutorial.
Access over the same WiFi: phone and laptop connected to the same router, phone opening http://laptop-IP:3000

Figure 1: Access over the same WiFi (LAN) — phone and laptop on one network.

Tip: Open WebUI is a PWA — in your phone's browser, choose "Add to Home Screen" and it will show up like an app, with its own icon.

Method 2: Cloudflare Quick Tunnel (Try It Out)




Outside the house, the local IP is unreachable — you need a tunnel. The fastest way: a Cloudflare Quick Tunnel, with no account and no open ports on your router. First install cloudflared (Debian/Ubuntu):
curl -L https://pkg.cloudflare.com/install.sh | sudo bash
sudo apt install cloudflared

Then run this single command on your laptop:
cloudflared tunnel --url http://localhost:3000

cloudflared will show a random URL like https://<random-words>.trycloudflare.com — open that URL in your phone's browser, from anywhere. No account, no open ports, no public IP.
But there are limits, so this method is only for trying things out: the URL changes every time you restart the tunnel, the tunnel dies as soon as you press Ctrl-C, and the URL is PUBLIC — anyone who has the link can open your WebUI.
Access from your phone outside home: phone → Cloudflare Edge (trycloudflare.com or your own domain) → cloudflared on the laptop → Open WebUI port 3000

Figure 2: Access from your phone outside home via Cloudflare Tunnel.


Method 3: Named Tunnel (Permanent)




If you want a URL that stays the same and a tunnel that keeps running, use a named tunnel. What you need: a free Cloudflare account and a domain whose DNS is managed by Cloudflare. The steps:
1. Log in and create a tunnel.
cloudflared tunnel login
cloudflared tunnel create ai-laptop

2. Point a subdomain at the tunnel.
cloudflared tunnel route dns ai-laptop ai.yourdomain.com

Replace ai.yourdomain.com with your own subdomain.
3. Create the config file ~/.cloudflared/config.yml — it holds the tunnel name, the credentials file, and an ingress rule that routes the hostname to Open WebUI:
tunnel: ai-laptop
credentials-file: ~/.cloudflared/<tunnel-id>.json
ingress:
  - hostname: ai.yourdomain.com
    service: http://localhost:3000
  - service: http_status:404

4. Run the tunnel.
cloudflared tunnel run ai-laptop

5. To make it start automatically at boot, install it as a service:
sudo cloudflared service install
Warning: Once your WebUI can be reached from the internet, lock the door. Set up Cloudflare Access (Zero Trust, free for up to 50 users) on the tunnel hostname so only you can log in. Never expose Ollama on port 11434 directly — and use a strong Open WebUI admin password.

Quick Troubleshooting




- The Quick Tunnel URL changes on every start → use a named tunnel (Method 3).
- Your phone cannot open IP:3000 on WiFi → make sure the phone and laptop are on the same network, and check the laptop's firewall.

References



  1. https://flaviocopes.com/cloudflare-quick-tunnels/
  2. https://dev.to/recca0120/cloudflare-tunnel-in-2026-expose-localhost-without-opening-ports-or-buying-an-ip-32l5
  3. https://dev.to/coder-safal/how-to-expose-localhost-to-the-internet-with-free-https-cloudflare-tunnel-no-port-forwarding-e6o

Like this tutorial? Support the author so there are even more free tutorials.

Support via Saweria

Comments