Accessing Local AI from Your Phone via LAN & Cloudflare Tunnel
Home > Tutorials > Accessing Local AI from Your Phone via LAN & Cloudflare Tunnel
Archive
- Install Apache, MySQL, PHP and phpMyAdmin on Archlinux 2021
- Configure an Apache Virtual Host Server on ArchLinux Jun 12, 2021
- How to Deploy a Static Blog to GitHub Pages Nov 17, 2026
- How to Sign Up for make.fun with an Agent and Let the Agent Find Bounties on Its Own Nov 17, 2026
- How to Hunt Bug Bounties with Agentic-Bug-Hunter (Free, Local AI) Nov 18, 2026
- How to Install Google Analytics 4 and Tag Manager on a Static Blog Nov 26, 2026
- How to Optimize SEO for a GitHub Pages Blog Nov 26, 2026
- How to Join make.fun Bounties with an AI Agent Nov 26, 2026
- How to Build a Tank Bot on battle.training Nov 26, 2026
- How to Make a Bootable Ventoy USB (Detected on Phones and Laptops) Nov 26, 2026
- Small and Lightweight Linux ISOs for Old Laptops (Potato PCs) Nov 28, 2026
- Local AI on Linux: Ollama + Open WebUI on a Potato Laptop (CPU Only) Nov 28, 2026
- Accessing Local AI from Your Phone via LAN & Cloudflare Tunnel Nov 28, 2026
- How to Mint Free NFTs on BSC Safely Nov 30, 2026
- How to Make Automated Story YouTube Shorts (Stickman + TTS) Nov 30, 2026
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.
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
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.
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
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
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
- https://flaviocopes.com/cloudflare-quick-tunnels/
- https://dev.to/recca0120/cloudflare-tunnel-in-2026-expose-localhost-without-opening-ports-or-buying-an-ip-32l5
- 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