- Models
- Developers
- iPhone
Use Ollama from iPhone: point your phone at a local LLM
How to use Ollama or LM Studio from iPhone or Android: open the server to your network, use the computer’s LAN address, and pick a model that can call tools.
Updated 7 min read
On this page: 9 sections
To use Ollama from iPhone or Android, make the Ollama server on your computer listen on your local network, then give the phone the computer’s network address with the port and /v1, such as http://192.168.1.20:11434/v1, not localhost. The phone and the computer have to be on the same network, and on iPhone the app needs Local Network permission. LM Studio, llama.cpp and vLLM work the same way through their OpenAI-compatible endpoints.
What you need
- A Mac, Windows or Linux computer with enough memory for the model, running Ollama, LM Studio, llama.cpp’s
llama-serveror vLLM. - A model on it that supports tool calling (more on that below).
- The phone and the computer on the same Wi-Fi or wired network.
- An app on the phone that accepts a custom OpenAI-compatible base URL.
The model runs on the computer. The phone only sends requests and shows the answers, so the phone’s own memory and chip don’t limit which model you can use.
Why localhost doesn’t work from your phone
localhost (and 127.0.0.1) means “this device”. Typed on your phone, it points at the phone, where nothing is listening. You need the computer’s address on your network, usually something like 192.168.1.20 or 10.0.0.5.
To find it:
- macOS: System Settings · Wi-Fi, then Details next to your network. Or run
ipconfig getifaddr en0in Terminal (en0 is usually Wi-Fi). - Windows: run
ipconfigand read the IPv4 Address line. - Linux: run
hostname -I.
The second catch: most local model servers listen only on 127.0.0.1 by default, so even the right address gets no answer until you tell the server to listen on the network. The sections below do that for each one.
If your router hands the computer a new address after a restart, reserve one for it in the router’s settings.
Set up Ollama for network access
Ollama listens on 127.0.0.1, port 11434, by default. Its FAQ says to change the bind address with the OLLAMA_HOST environment variable. Setting it to 0.0.0.0:11434 makes Ollama listen on every network interface.
macOS (the Ollama app):
launchctl setenv OLLAMA_HOST "0.0.0.0:11434"
Then quit Ollama and open it again. A value set with launchctl setenv doesn’t survive a restart of the Mac, so run it again after a reboot.
Linux (Ollama installed as a systemd service):
sudo systemctl edit ollama.service
Add these lines, save, and close the editor:
[Service]
Environment="OLLAMA_HOST=0.0.0.0:11434"
Then reload and restart:
sudo systemctl daemon-reload
sudo systemctl restart ollama
Windows: quit Ollama from the taskbar, open Settings and search for “environment variables”, choose to edit the variables for your account, add OLLAMA_HOST with the value 0.0.0.0:11434, and start Ollama again from the Start menu.
To check, open http://192.168.1.20:11434 (with your computer’s address) in the phone’s browser. A short line saying Ollama is running means the network side works. The base URL for apps is that address plus /v1: http://192.168.1.20:11434/v1.
Give the model room to work
Agents send long prompts. Ollama’s default context length depends on your GPU memory, and below 24 GiB of VRAM it’s 4k tokens, which an agent fills quickly. Raise it with the context length slider in the Ollama app’s settings, or set OLLAMA_CONTEXT_LENGTH the same way as OLLAMA_HOST. A longer context uses more memory; ollama ps shows whether the model still fits on the GPU.
Set up LM Studio
- Download and load a model in LM Studio.
- Open the Developer tab and turn on Start server. From a terminal,
lms server startdoes the same. - In the server settings, turn on Serve on Local Network.
- Note the port. It’s 1234 unless you changed it, so the base URL is
http://192.168.1.20:1234/v1. - For the model name, use the identifier LM Studio shows for the loaded model.
LM Studio’s server doesn’t ask for a key by default. Its server settings include Require Authentication; if you turn it on, create a token in LM Studio and paste it into the app’s key field. Check the context length in the model’s load settings too. The server docs cover the rest.
llama.cpp and vLLM, briefly
llama.cpp. Its llama-server listens on 127.0.0.1 by default. Give it the host and a port you choose, so you know which one to type on the phone:
llama-server -m ./models/your-model.gguf --host 0.0.0.0 --port 8080
The base URL is then http://192.168.1.20:8080/v1. Add --api-key with a secret of your own to require a key. Vision needs the model’s multimodal projector file (--mmproj), which llama.cpp still marks as experimental.
vLLM. Usually on a Linux machine with a GPU. Phone agents typically let the model decide when to call a tool, and in vLLM that needs two flags, as its tool calling docs explain:
vllm serve your-org/your-model --host 0.0.0.0 --port 8000 --enable-auto-tool-choice --tool-call-parser hermes
hermes is one parser; pick the one that matches your model’s family from vLLM’s list. --api-key works here too. The base URL is http://192.168.1.20:8000/v1.
Pick a model that can drive an agent
Chatting and driving a browser are different jobs (here is how a browser agent works). For agent work, check the model card for:
- Tool calling (function calling). The agent acts by calling tools: tap, type, scroll, finish. A model without it can talk about the page but can’t do anything on it. Ollama’s model library lets you filter by Tools, and LM Studio marks models with native tool use with a hammer badge.
- Vision. An agent can send a screenshot with each step. A vision model reads it; a text-only model can’t, so if your app can turn screenshots off, do that for those. Ollama’s library also filters by Vision.
- A long context window. See above.
- Enough size. Small models follow a ten-step task less reliably than large ones: they may repeat a step, skip one, or finish early. Start with short, clear tasks and build up.
LM Studio’s docs list Qwen, Llama 3.1 and 3.2, and Mistral models among those with native tool support. Model lineups change quickly, so the model card is the place to check.
Keep it safe on your network
Listening on 0.0.0.0 means any device on the same network can use your model server, not only your phone.
- Use it on networks you trust. Home or office, not café or hotel Wi-Fi.
- Don’t forward the port on your router. That puts the server on the internet. To reach it away from home, connect the phone to your home network over a VPN instead.
- Require a key where you can. Ollama’s local server ignores API keys, so anyone who can reach it can use it. LM Studio has Require Authentication, and
llama-serverand vLLM take--api-key. - Remember that plain
http://isn’t encrypted. Requests and replies, including page text and screenshots, cross your network in the clear. - Answer the firewall prompt with care. If your computer asks whether to allow incoming connections, allow them on private networks only.
How agenttab connects to your server
In agenttab, open Settings · Model, choose Your server, and pick Ollama, LM Studio, llama.cpp server, vLLM or any OpenAI-compatible endpoint. The address field shows an example with the usual port, such as http://192.168.1.10:11434/v1; enter your computer’s address and port instead. The note under the field says the same thing, to use the address on your network rather than localhost. The key is optional, for servers that require one.
- Local Network permission on iPhone. iOS asks before an app reaches devices on your network. If you said no, allow agenttab under Privacy & Security · Local Network in the Settings app.
- A connection test sends a tiny request and shows which model answered and how fast.
- Your OK names the server. Before the first run, the data-sharing sheet says requests go to your server at its address, and nothing goes until you tap Allow.
- Nothing in between. Requests go from the phone straight to your server. The pages the agent opens still load from the internet, as in any browser; it’s the model traffic that stays on your network.
- Cost reads $0.00, since there’s no provider bill. Token counts still show, and still matter, because they fill the context window (more on how tokens add up).
- Text-only models: turn off Send screenshots in Settings.

If it won’t connect, the support page has a short checklist, and your key and privacy on the home page shows the request path. For keys and hosted providers, see what bring your own key means.
FAQ
Can I run the LLM on the phone itself instead?
Some apps run small models on the phone. Models that drive a browser well tend to need more memory than a phone can spare, so a computer on your network is the usual setup. agenttab doesn’t run models on the phone; it connects to a provider or your server.
Why can’t my phone reach Ollama?
Check these in order: the address isn’t localhost; OLLAMA_HOST is set and Ollama was restarted; the phone and computer are on the same network (guest Wi-Fi often keeps devices apart); on iPhone, Local Network permission is on; and the computer’s firewall allows port 11434.
Does it work over mobile data or away from home?
Not on its own. An address like 192.168.1.20 only works inside your network. Connect the phone to your home network over a VPN rather than opening the port to the internet.
Do I need an API key for Ollama?
No. Ollama’s local server ignores the key, so leave the field empty if the app allows it. If you put a key in front of LM Studio, llama.cpp or vLLM, enter that one.