LocalAI 5.1: Power-User Guide to the Android App, P2P Invites and llama.cpp Tuning

Last updated: November 29, 2026

LocalAI 5.1.0, released November 28, 2026, adds an experimental Android client, replaces the shared P2P token with one-time invites for each machine, and lets llama.cpp serve concurrent chats from a shared KV cache. It also adds event triggers, incognito chats, a Kubernetes add-on and plugin skills.

Contents

What’s new in LocalAI 5.1

LocalAI is an MIT-licensed, self-hosted server for open models with OpenAI-compatible endpoints. Version 5.1.0 is the first feature release after the 5.0 launch (v5.1.0 release notes). The main changes are:

  • Android client (experimental). Connect a phone to your server by URL or by scanning a one-time pairing invite. Models stay on the server.
  • Per-machine P2P invites. A libp2p layer replaces the shared-token network, so you can invite and revoke individual peers.
  • llama.cpp concurrency. With more than one slot, the llama.cpp backend schedules requests against a shared KV cache by default, processes long prompts in chunks and reuses shared prompt prefixes.
  • Event triggers. A run can start from a webhook or a calendar change, and you choose where it reports.
  • Incognito web chats. Memory-off and zero-retention modes, which admins can disable or cap.
  • Kubernetes add-on and plugins. Inspect clusters from a chat, and install Claude Code-format plugins whose skills, slash commands and HTTP MCP connectors chats can use.
  • More engines. Strata engines for Tencent Hy4-Flash and Inkling, and an experimental Colibri backend that reads mixture-of-experts weights from disk.

LocalAI 5.0 vs 5.1

The LocalAI website describes 5.0 as the release that introduced Projects, the desktop app, Office, Sandbox, Team, Pages and add-ons. Version 5.1 builds on that base with clients, clustering and serving changes. The table summarizes the differences using the official notes and documentation.

Area LocalAI 5.0 LocalAI 5.1
Mobile No Android client Experimental Android client (sideloaded APK)
P2P Shared network token One-time invite per machine; revoke individually
llama.cpp serving Earlier slot scheduler Shared KV cache, chunked prompts, prefix reuse
Automation No event triggers listed Webhook and calendar triggers
Chat privacy No incognito mode Memory-off and zero-retention modes
Desktop app macOS DMG and Linux AppImages Adds a Windows x64 installer
Model config API POST /api/models/config/{id} available Returns 410 Gone

How to upgrade and pair devices

Read the “Before you upgrade” section of the release notes first. Three changes can break an existing setup: old P2P settings can prevent startup, distributed frontends and workers must be upgraded together, and the model configuration endpoint now returns 410 Gone. The P2P migration guide says a server that still sets an old option exits with status 1 and prints the replacement for each one.

  1. Check for old P2P options. Remove --p2p, --p2p-token, --p2p-network-id, --federated and their environment variables, including any in .env files.
  2. Install 5.1.0. Run curl -sSL https://localai.io/install.sh | sh on Linux or an Apple Silicon Mac, pull the new container, or download the desktop app from the GitHub release.
  3. Upgrade the whole cluster. In distributed mode, upgrade frontends and workers at the same time, because mixed versions cannot run the new backend upgrade protocol.
  4. Set the P2P mode. Use --p2p-mode share if other machines connect to this server (authentication must be on) or --p2p-mode connect if it only uses other servers.
  5. Create an invite for each machine. Open Cluster, then Sharing, then Share this instance. Choose a device, remote, worker or model-split worker invite.
  6. Pair and confirm. On Android, scan the QR code or paste the localai://pair link, select Pair, and check that the four-word confirmation phrase matches the server.

The Android app documentation lists the requirements: Android 8.0 (API level 26) or later on a 64-bit ARM device and Android System WebView 111 or later. The app is not in an app store, so you sideload the APK from the release and can verify it with its .sha256 file. The 5.1.0 release ships only a development-signed build, LocalAI-Android-dev-debug-key.apk. The documentation lists password, API key, GitHub and OIDC sign-in, but the release notes say OAuth-only servers are not supported yet, so test sign-in first.

Tuning llama.cpp concurrency

The biggest performance change is in the llama.cpp backend. In a vendor test on a DGX Spark serving Ornith-1.5-35B-A3B, moving from four slots to 16 slots with paged serving raised aggregate output from 81.0 to 153.3 tokens per second and cut median time to first token from 35.5 to 8.3 seconds (release notes). LocalAI notes that keeping four slots and only enabling the new defaults changed throughput little, so the gain comes from more concurrency.

  • Runtime tuning. Open Runtime tuning in the model editor and pick a preset for unified memory, a discrete GPU or CPU.
  • Chunked prompts. In a Qwen3-8B test, processing an 8,000-token prompt in 256-token chunks cut the longest pause in an ongoing chat from 690 ms to 109 ms.
  • Prefix sharing. Requests that share at least 256 leading tokens can reuse that prefix from another active slot. Set slot_attach:false to turn this off.

Power-user tips and limitations

  • Keep the identity key. P2P stores the server identity as a key file in the data path. Regenerating it means every paired device, remote and worker must pair again.
  • Use incognito with care. Zero-retention stops LocalAI from saving the conversation but still records usage counters, and it applies to web sessions, not API-key requests or worker logs.
  • Restrict the Kubernetes add-on. Writes are off until an admin enables them, but Secret values are readable by default where the kubeconfig allows. Restrict namespaces and hide Secrets.
  • Treat Colibri as a capacity tool. Disk-backed generation on large models can run at a few tokens per second or less.

Limitations. The Android client is experimental, plugin-defined agents, hooks and stdio MCP connectors do not run in this release, and the throughput figures are LocalAI’s own tests rather than independent benchmarks. There is no pricing: LocalAI is free, open-source software you run on your own hardware (install docs).

For other local model tools, see our Ollama 0.40.17 guide, llama.cpp 1.1 guide, LM Studio Bionic 1.2.3 guide and Open WebUI 0.13.5 guide.

Frequently asked questions

What is new in LocalAI 5.1?

LocalAI 5.1.0 adds an experimental Android client, per-machine P2P invites that replace the shared network token, shared-KV-cache scheduling for concurrent llama.cpp requests, webhook and calendar triggers, incognito web chats, a Kubernetes add-on, Claude Code-format plugin skills and new model engines.

Does the LocalAI Android app run models on the phone?

No. The Android app is a client only. It shows the web interface of a LocalAI server running on another computer and connects by address or by a P2P invite link. It needs Android 8.0 or later on a 64-bit ARM device and is installed by sideloading an APK.

Will my old LocalAI P2P setup still work after upgrading to 5.1?

No. The shared-token network is removed in this release with no overlap period. A server that still sets an old option such as –p2p or a P2P token exits with status 1. Remove the old options, set –p2p-mode, and pair each machine again with its own invite.

How do I turn on P2P sharing in LocalAI 5.1?

Set the mode to share with –p2p-mode share, the LOCALAI_P2P_MODE variable or the P2P settings page. Share mode requires authentication to be on. Then create invites under Cluster, Sharing, Share this instance.

Is LocalAI free?

Yes. LocalAI is open source under the MIT license and runs on your own hardware, so there is no subscription fee. Your costs are the hardware and electricity you use to run models.

How do I install or update LocalAI 5.1?

Run curl -sSL https://localai.io/install.sh | sh on Linux or an Apple Silicon Mac, use the Docker Compose file, or download the desktop app from the GitHub release. Set LOCALAI_VERSION to pin a specific release.

Sources

Featured image: LocalAI logo from the LocalAI repository by Ettore Di Giacinto and contributors, MIT license, via GitHub. FreeAnswers is not affiliated with LocalAI.

Related answers

Leave a Comment