RU

Ollama on a smartphone: a server in one line and a KMP client for Android and iOS

Published: 2026-11-10 · Author: AI Release · @ai_release1
Ollama on a smartphone: a server in one line and a KMP client for Android and iOS

⚡ The gist in 5 seconds

🔍 What happened

Habr has published a practical write-up on how to set up a local Ollama server and access it from your phone. Installation is standard: brew install ollama on macOS or curl -fsSL https://ollama.com/install.sh | sh on Ubuntu. The author then starts the server with OLLAMA_HOST=0.0.0.0:11434 ollama serve, so it can be reached not only from localhost but also from an emulator or any device on the network.

Models are pulled via ollama pull, and the state is checked with ollama ps and ollama list. The example in the article shows gemma4:12b-mlx at 7.7 GB and gemma4:e4b-mlx at 9.5 GB with the note PROCESSOR 100% GPU — meaning the weights live in GPU memory and generation doesn't run on the CPU. For ARM-based Macs, the author recommends the mlx variants of the models. The request is verified with a plain curl call to /api/generate with the field "stream": false.

The second half of the piece is about the client. A new Kotlin Multiplatform project with shared UI, DI via Koin, and networking via Ktor. The author goes into detail on the difference between the global startKoin and the local koinApplication inside a Composable: the latter returns a container only to you and doesn't leak into GlobalContext, which saves previews in Android Studio. For iOS you still need Xcode and macOS — KMP removes the need to write UI in Swift, but it doesn't eliminate Apple's tooling. Details are in the article on Habr.

🧠 Our take

The demand for this is easy to explain: people have already tried cloud chatbots and want their requests to stay off someone else's server. Ollama is great precisely because it starts with a single command — and then the pain begins, since there's no proper mobile client for it. Every other guide on the topic ends with the words "write your own." Here, the author actually goes all the way and shows what such a client is built from.

Our assessment: the main value of the article isn't in ollama serve but in the KMP + Koin + Ktor combo. One UI, two platforms, an environment familiar to any Android developer. For someone already writing in Kotlin, the entry barrier is low. For everyone else — it isn't: Xcode, code signing, macOS, and editing Info.plist aren't going anywhere. So the "cross-platform" claim here is only half honest, and the author doesn't hide it.

On performance, without illusions: a 9 GB model loaded into a laptop's GPU responds quickly, but the phone in this setup is just a terminal. All the computation happens on the laptop, and the pairing only works on a single Wi-Fi network. The winners are those who need a private assistant at home or in the office. The losers are those who were waiting for an autonomous model in their pocket: the smartphone doesn't compute anything here.

⚠️ What we don't know

The source has plenty of weak spots. This is one author's personal experience, not documentation. The model names in the examples — gemma4, qwen3.5 — are quoted exactly as written; the author doesn't explain where they came from, so the accuracy of the tags can't be vouched for. There isn't a single speed measurement on a phone, and not a word about authentication: 0.0.0.0 exposes the server to everyone on the network, which is a direct risk if there's a stranger's machine nearby. And there's no data on whether the iOS setup actually worked in a real build or only in theory.

💬 What's worth debating

  • Should you open Ollama on 0.0.0.0 for convenience, or restrict access to a tunnel and the local network only?
  • Is it worth writing your own KMP client instead of using ready-made solutions, once you factor in the time spent maintaining two platforms?
  • Do local models on a laptop still make sense when mobile chips can handle more and more tasks on their own?

Prediction: within a quarter, guides like this will start including authentication or a VPN by default instead of a bare OLLAMA_HOST=0.0.0.0, as soon as someone exposes an open instance to the public internet.

Disclaimer: this material is based on one author's personal experience and is not official Ollama documentation.

Source: Habr

🤖 AI summary
#Ollama#KMP#локальные#Android#iOS#AI#LLM#нейросети
← PreviousКитай впервые ввёл буфер безработицы из-за ИИ: поможет ли это

Source: habr.com · post in Telegram