[{"data":1,"prerenderedAt":157},["ShallowReactive",2],{"seo-verification":3,"blog-how-to-host-localai-on-a-vps-en":6},{"google":4,"bing":5},"EycwPY2XMyTkVzas3n1ygeNJFGAH513qrMjfDljzsMQ","",{"id":7,"slug":8,"slugs":9,"title":12,"excerpt":13,"readTime":14,"views":15,"isPinned":16,"publishedAt":17,"category":18,"categories":24,"featuredImage":26,"bgImage":27,"posterImage":28,"relatedSolution":29,"intro":32,"sections":33,"ctaTitle":107,"ctaBody":108,"ctaButton":109,"ctaUrl":110,"relatedPosts":111},12,"how-to-host-localai-on-a-vps",{"fr":10,"en":8,"ar":11},"heberger-localai-vps","كيفية-استضافة-localai-على-خادم-vps","How to Host LocalAI on a VPS","Deploy LocalAI on your VPS as a drop-in replacement for the OpenAI API. Docker, GGUF models, chat, embeddings, images and reverse proxy.",3,0,false,"2026-06-08T00:00:00+00:00",{"id":19,"name":20,"slug":21,"color":22,"icon":23},1,"Artificial Intelligence","intelligence-artificielle","bg-purple-500\u002F10 text-purple-400","ia",[25],{"id":19,"name":20,"slug":21,"color":22,"icon":23},null,"\u002Fblog\u002Fcovers\u002Fbg.svg","\u002Fblog\u002Fcovers\u002Fheberger-localai-vps-poster.svg",{"categorySlug":30,"appSlug":31},"artificial-intelligence","local-ai","LocalAI is an open source, API-compatible replacement for the OpenAI API: chat, embeddings, image and audio generation, all running locally. On your VPS, it becomes a versatile and private AI API that your applications consume without changing their code. Here is how to set it up.",[34,38,48,51,73,76],{"type":35,"title":36,"body":37},"h2","Why self-host LocalAI on a VPS","Where Ollama focuses on text, LocalAI aims for broad compatibility with the OpenAI API: it exposes `\u002Fv1\u002Fchat\u002Fcompletions`, `\u002Fv1\u002Fembeddings`, `\u002Fv1\u002Fimages\u002Fgenerations` and even audio transcription, on a single API. For a team that already has code written against the OpenAI SDK, LocalAI is a near-transparent replacement: you change the base URL and the key, the rest works. On a VPS, you get this versatility without external dependency or per-call cost. This is especially relevant when you need text generation, vectors for RAG and, occasionally, images all at once, without multiplying providers and keys.",{"type":39,"title":40,"items":41},"ul","The concrete benefits of a self-hosted LocalAI",[42,43,44,45,46,47],"Drop-in replacement for the OpenAI API: no rewriting of the client code.","A single API for chat, embeddings, images and audio.","Support for multiple backends (llama.cpp, diffusers, whisper) under a unified interface.","Open model formats (GGUF) that are downloadable and interchangeable.","No usage-based billing: a fixed VPS cost for all types of generation.","Data and generations kept entirely on your server.",{"type":35,"title":49,"body":50},"Hardware and software requirements","Since LocalAI is versatile, its needs depend on the functions enabled. For 7B chat and embeddings on CPU, aim for 8 GB of RAM and 4 vCPU. If you enable image generation (Stable Diffusion) or audio, the load rises sharply and a VPS with a GPU becomes strongly recommended. Disk is a key point: GGUF and diffusion models are heavy, plan for 30 to 50 GB. Docker and Docker Compose are required, along with a subdomain (e.g. ia.your-domain.com) and port 443. Prepare the list of models to load according to your uses.",{"type":52,"title":53,"steps":54},"steps","Deploy LocalAI with Docker and HTTPS",[55,58,61,64,67,70],{"title":56,"body":57},"Prepare the models folder","Over SSH: `mkdir -p \u002Fopt\u002Flocalai\u002Fmodels && cd \u002Fopt\u002Flocalai`. This `models` folder will be mounted in the container and will contain your GGUF files and YAML configurations.",{"title":59,"body":60},"Launch the LocalAI container","Use the official image, for example `docker run -d -p 127.0.0.1:8080:8080 -v $PWD\u002Fmodels:\u002Fmodels --name localai localai\u002Flocalai`. Choose the tag matching your hardware (CPU or GPU).",{"title":62,"body":63},"Install a model via the gallery","LocalAI provides a gallery: `curl http:\u002F\u002F127.0.0.1:8080\u002Fmodels\u002Fapply -d '{\"id\":\"...\"}'`, or manually drop a GGUF into `models\u002F` with its config YAML. Then list via `curl http:\u002F\u002F127.0.0.1:8080\u002Fv1\u002Fmodels`.",{"title":65,"body":66},"Test OpenAI compatibility","Validate with a chat call: `curl http:\u002F\u002F127.0.0.1:8080\u002Fv1\u002Fchat\u002Fcompletions -d '{\"model\":\"...\",\"messages\":[{\"role\":\"user\",\"content\":\"test\"}]}'`. Also test `\u002Fv1\u002Fembeddings` if you plan to do RAG.",{"title":68,"body":69},"Configure the reverse proxy and SSL","Route `ia.your-domain.com` to `localhost:8080` via Caddy or Nginx, with Let's Encrypt. Add token protection because LocalAI does not enforce a key by default on a bare deployment.",{"title":71,"body":72},"Migrate your applications","In your OpenAI clients, change the base URL to `https:\u002F\u002Fia.your-domain.com\u002Fv1` and the key to your token. Chat, embeddings and image calls switch to your infrastructure.",{"type":74,"body":75},"tip","Only enable the backends you need. Loading a chat model, an embedding model and Stable Diffusion simultaneously on a CPU VPS saturates the RAM and collapses performance. Set `SINGLE_ACTIVE_BACKEND=true` to keep only one backend resident at a time, and reserve image generation for a GPU VPS if it becomes a regular use.",{"type":77,"title":78,"headers":79,"rows":82},"comparison","LocalAI vs Ollama: which local LLM server is right for you?",[5,80,81],"LocalAI","Ollama",[83,86,90,94,97,101,104],[84,85,85],"GPU required","No (CPU-only by default)",[87,88,89],"OpenAI-compatible API","Yes","Yes (partial)",[91,92,93],"Image generation","Yes (Stable Diffusion)","No",[95,96,93],"Speech-to-text","Yes (Whisper)",[98,99,100],"Model library","200+ GGUF models","Curated model list",[102,103,103],"RAM (3B model)","~2 GB",[105,106,106],"Licence","MIT","A complete and private AI API on a ServOrbit Cloud VPS","With a ServOrbit Cloud VPS and preconfigured Docker, deploy LocalAI as a private alternative to the OpenAI API. Choose a CPU or GPU configuration according to your chat, embeddings or image needs.","Start my Cloud VPS","\u002Fvps-cloud",[112,127,142],{"id":19,"slug":113,"slugs":114,"title":117,"excerpt":118,"readTime":119,"views":15,"isPinned":16,"publishedAt":120,"category":121,"categories":122,"featuredImage":26,"bgImage":27,"posterImage":124,"relatedSolution":125},"how-to-host-open-webui-on-a-vps",{"fr":115,"en":113,"ar":116},"heberger-open-webui","كيفية-استضافة-open-webui-على-خادم-vps","How to Host Open WebUI on a VPS","A complete guide to deploying Open WebUI on your own VPS. Keep control of your data, avoid cloud API costs, and access your LLMs from a clean web interface.",4,"2026-06-01T00:00:00+00:00",{"id":19,"name":20,"slug":21,"color":22,"icon":23},[123],{"id":19,"name":20,"slug":21,"color":22,"icon":23},"\u002Fblog\u002Fcovers\u002Fheberger-open-webui-poster.svg",{"categorySlug":30,"appSlug":126},"open-webui",{"id":128,"slug":129,"slugs":130,"title":133,"excerpt":134,"readTime":14,"views":15,"isPinned":16,"publishedAt":135,"category":136,"categories":137,"featuredImage":26,"bgImage":27,"posterImage":139,"relatedSolution":140},2,"deploying-dify-on-a-vps-ai-workflows-under-control",{"fr":131,"en":129,"ar":132},"deployer-dify-vps","نشر-dify-على-vps-سير-عمل-الذكاء-الاصطناعي-تحت-السيطرة","Deploying Dify on a VPS: AI Workflows Under Control","Install Dify on a ServOrbit VPS to build agents, chatflows and AI apps without losing control of your data.","2026-02-11T00:00:00+00:00",{"id":19,"name":20,"slug":21,"color":22,"icon":23},[138],{"id":19,"name":20,"slug":21,"color":22,"icon":23},"\u002Fblog\u002Fcovers\u002Fdeployer-dify-vps-poster.svg",{"categorySlug":30,"appSlug":141},"dify",{"id":143,"slug":144,"slugs":145,"title":148,"excerpt":149,"readTime":14,"views":15,"isPinned":16,"publishedAt":150,"category":151,"categories":152,"featuredImage":26,"bgImage":27,"posterImage":154,"relatedSolution":155},121,"hosting-openclaw-on-a-vps",{"fr":146,"en":144,"ar":147},"heberger-openclaw-vps","استضافة-openclaw-على-خادم-vps","Hosting OpenClaw on a VPS","Host OpenClaw on your VPS: the open source personal AI assistant reachable from WhatsApp, Telegram, Discord and 50+ messaging apps. Docker, LLM setup and HTTPS.","2026-02-23T00:00:00+00:00",{"id":19,"name":20,"slug":21,"color":22,"icon":23},[153],{"id":19,"name":20,"slug":21,"color":22,"icon":23},"\u002Fblog\u002Fcovers\u002Fheberger-openclaw-vps-poster.svg",{"categorySlug":30,"appSlug":156},"openclaw",1787581003379]