Build, host and run AI solutions.

Logo LocalAI

LocalAI

Run open-source LLMs on CPU — no GPU required. OpenAI-compatible API, 200+ models, self-hosted in one command.

2 GB (4 GB recommended for 7B+ models) RAM 2 vCPU (4 vCPU recommended) Port 8080 Available

Tech stack

DockerGollama.cpp
Minimum RAM2 GB (4 GB recommended for 7B+ models)
Minimum CPU2 vCPU (4 vCPU recommended)
Default port8080
Compatible OSChoice of Linux distributions

LocalAI (MIT, ~47k GitHub stars) is a free, open-source alternative to the OpenAI API. It runs on consumer-grade hardware without a GPU — any VPS with 2 GB RAM can serve Llama 3, Mistral, Phi-3, Qwen and 200+ other models via an OpenAI-compatible REST API. Your existing code that calls `openai.ChatCompletion.create()` works without modification: change the base URL to your VPS and all API calls are routed locally, with zero per-token cost and complete data privacy.

Deployed on a ServOrbit VPS, LocalAI becomes your private LLM backend: an endpoint your team's applications, RAG pipelines and agent frameworks call instead of OpenAI — with no cloud dependency, no usage limits, and no data leaving your infrastructure. LocalAI supports text generation, function calling, image generation (Stable Diffusion), speech-to-text (Whisper), and text embeddings — all from a single container.

Key features

OpenAI-compatible REST API — drop-in replacement for OpenAI, works with every LangChain/LlamaIndex/LiteLLM SDK unchanged.
CPU-only inference — runs on any VPS without a GPU using llama.cpp; optimised SIMD paths for Intel and ARM.
200+ models supported — Llama 3, Mistral, Phi-3, Qwen 2.5, DeepSeek, Gemma 2, Falcon, and any GGUF-format model.
Multi-modal: text generation, function/tool calling, embeddings, image generation (Stable Diffusion), and speech-to-text (Whisper).
Pull models by name — curl http://localhost:8080/models/apply -d '{"id":"llama-3.2-3b-instruct:q4_0"}' downloads and activates any supported model.
MIT licence — fully auditable, no telemetry, air-gap capable; v4.6.2 (released 2026-07-06) adds distributed cluster mode and prefix-cache-aware routing.
Composable with LiteLLM and Open WebUI — LocalAI serves the inference layer; LiteLLM adds multi-provider routing; Open WebUI adds the chat UI.

When to use this solution?

1

Private LLM backend for your applications

Replace your OpenAI API calls with a LocalAI endpoint on your VPS. Your SaaS, internal tool, or RAG pipeline sends requests to https://your-domain.com/v1/chat/completions — identical JSON, identical SDK, zero cost per token. Reaching the endpoint from another machine requires a domain attached to the VPS, since LocalAI only listens on the loopback; code running on the VPS itself calls http://127.0.0.1:8080/v1/chat/completions. Ideal for high-volume use cases where per-token API pricing becomes a bottleneck.

2

Air-gapped inference for sensitive data

For legal, medical or financial applications where data cannot leave your infrastructure, LocalAI runs entirely offline once the model is downloaded. No requests ever reach an external API. The GGUF model files are stored in a Docker volume on your own disk.

3

Embeddings and semantic search without an API key

Run embedding models (nomic-embed-text, mxbai-embed-large) locally alongside Qdrant on the same VPS to build a complete semantic search or RAG pipeline. No OpenAI embedding API cost, no data leaving your server, no rate limits.

Deploy LocalAI on your VPS

Guide optimized for ServOrbit Cloud VPS.

01

Create the VPS

Order a ServOrbit VPS with at least 2 GB of RAM; the system installed is Ubuntu 24.04. For comfortable multi-user use, or for models from 7 billion parameters upwards, 4 GB is recommended. Core count matters for speed: 4 vCPU noticeably reduce generation latency on models of 3 to 7 billion parameters.

02

Deploy LocalAI

Installing from your client area creates the localai/localai:latest container — an image of about 900 MB — mounts the local-ai volume on /build/models, and publishes the OpenAI-compatible API server on the loopback interface, at 127.0.0.1:8080. No model ships with it: the first request naming a model triggers its download into the persistent volume.

03

Connect for the first time

LocalAI opens without any credentials at all: your first move is to go through the model gallery and download one, since the installation provides none. The OpenAI-compatible API answers at the same address and is protected by no key — as long as the service listens only on the loopback interface, only users with SSH access to the VPS can reach it.

04

Pull a model

A single API call is enough: curl http://127.0.0.1:8080/models/apply -H 'Content-Type: application/json' -d '{"id":"llama-3.2-3b-instruct:q4_0"}'. LocalAI fetches the GGUF file and registers the model. The Q4 quantisation of a 3 billion parameter model fits in 2 GB of RAM; a 7 billion one calls for about 4.

05

Make your first API call

Test the API from the VPS: curl http://127.0.0.1:8080/v1/chat/completions -H 'Content-Type: application/json' -d '{"model":"llama-3.2-3b-instruct:q4_0","messages":[{"role":"user","content":"Hello!"}]}'. The response has exactly the shape of OpenAI's: changing the base URL in your existing code is all it takes to make it work.

06

Point your apps at LocalAI

In any OpenAI SDK, set base_url='https://<your-domain>/v1' and api_key='not-needed'; that public address assumes a domain attached to the VPS. From the VPS itself, use base_url='http://127.0.0.1:8080/v1'. Without a domain, open an SSH tunnel — ssh -L 8080:127.0.0.1:8080 root@<your-vps-ip> — and point at http://localhost:8080/v1. The port may be reassigned at install time: use the one shown on the app's card in your client area, 8080 being only the catalogue value. In LangChain that gives ChatOpenAI(base_url=..., api_key='x'); in LiteLLM, prefix the model with localai/; in Open WebUI, declare an OpenAI connection with that same base URL. Your existing code needs no other change.

07

Protect the endpoint

LocalAI is open by default: no key is required. The application knows how to demand one through the LOCALAI_API_KEY environment variable, but the catalogue installation does not set one — so treat the endpoint as unauthenticated. As soon as a domain is attached, ServOrbit installs the nginx vhost and the TLS certificate; encryption protects the transport, it identifies nobody. As long as no key is in place, stay without a domain and work through an SSH tunnel, or publish an authenticating gateway instead — LiteLLM for instance — and keep LocalAI behind it.

Frequently asked questions

LocalAI is a free, open-source (MIT) server that runs large language models locally on any CPU. It exposes an OpenAI-compatible REST API, so your existing code works without modification — just change the API base URL to your server.

Embed the deploy button

Maintaining a project that uses LocalAI? This button lets your readers deploy it on a VPS in one click, without reading Docker documentation.

Deploy LocalAI on ServOrbit
Markdown
[![Deploy LocalAI on ServOrbit](https://servorbit.com/brand/deploy/button.svg)](https://servorbit.com/vps-cloud?template=local-ai&utm_source=deploy-badge&utm_medium=referral&utm_campaign=local-ai)
HTML
<a href="https://servorbit.com/vps-cloud?template=local-ai&utm_source=deploy-badge&utm_medium=referral&utm_campaign=local-ai"><img src="https://servorbit.com/brand/deploy/button.svg" alt="Deploy LocalAI on ServOrbit" height="40"></a>

The button points to a VPS order with the template preselected. The image is served from servorbit.com — nothing to host on your side.

Build, host and run AI solutions.

Activate LocalAI on your infrastructure.

Dedicated Cloud VPS — IPv4 included, European datacenter, support included. Your data never leaves your server.

Recommended configuration: 2 GB (4 GB recommended for 7B+ models) RAM · 2 vCPU (4 vCPU recommended)

Need help?

Browse our help center and FAQ, or reach our team — callback, WhatsApp or email. Support in French, English and Arabic.