[{"data":1,"prerenderedAt":117},["ShallowReactive",2],{"seo-verification":3,"blog-heberger-localai-vps-en":6},{"google":4,"bing":5},"EycwPY2XMyTkVzas3n1ygeNJFGAH513qrMjfDljzsMQ","",{"id":7,"slug":8,"title":9,"excerpt":10,"readTime":11,"views":12,"isPinned":13,"publishedAt":14,"category":15,"categories":21,"featuredImage":23,"bgImage":24,"posterImage":25,"relatedSolution":26,"intro":28,"sections":29,"ctaTitle":72,"ctaBody":73,"ctaButton":74,"ctaUrl":75,"relatedPosts":76},12,"heberger-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.",8,644,false,"2026-06-08T00:00:00+00:00",{"id":16,"name":17,"slug":18,"color":19,"icon":20},1,"Artificial Intelligence","intelligence-artificielle","bg-purple-500\u002F10 text-purple-400","ia",[22],{"id":16,"name":17,"slug":18,"color":19,"icon":20},null,"\u002Fblog\u002Fcovers\u002Fbg.svg","\u002Fblog\u002Fcovers\u002Fheberger-localai-vps-poster.svg",{"categorySlug":20,"appSlug":27},"localai","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.",[30,34,44,47,69],{"type":31,"title":32,"body":33},"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":35,"title":36,"items":37},"ul","The concrete benefits of a self-hosted LocalAI",[38,39,40,41,42,43],"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":31,"title":45,"body":46},"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":48,"title":49,"steps":50},"steps","Deploy LocalAI with Docker and HTTPS",[51,54,57,60,63,66],{"title":52,"body":53},"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":55,"body":56},"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":58,"body":59},"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":61,"body":62},"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":64,"body":65},"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":67,"body":68},"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":70,"body":71},"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.","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",[77,90,104],{"id":16,"slug":78,"title":79,"excerpt":80,"readTime":81,"views":82,"isPinned":13,"publishedAt":83,"category":84,"categories":85,"featuredImage":23,"bgImage":24,"posterImage":87,"relatedSolution":88},"heberger-open-webui","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.",6,3200,"2026-06-01T00:00:00+00:00",{"id":16,"name":17,"slug":18,"color":19,"icon":20},[86],{"id":16,"name":17,"slug":18,"color":19,"icon":20},"\u002Fblog\u002Fcovers\u002Fheberger-open-webui-poster.svg",{"categorySlug":20,"appSlug":89},"open-webui",{"id":91,"slug":92,"title":93,"excerpt":94,"readTime":95,"views":96,"isPinned":13,"publishedAt":97,"category":98,"categories":99,"featuredImage":23,"bgImage":24,"posterImage":101,"relatedSolution":102},2,"deployer-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.",7,2480,"2026-02-11T00:00:00+00:00",{"id":16,"name":17,"slug":18,"color":19,"icon":20},[100],{"id":16,"name":17,"slug":18,"color":19,"icon":20},"\u002Fblog\u002Fcovers\u002Fdeployer-dify-vps-poster.svg",{"categorySlug":20,"appSlug":103},"dify",{"id":81,"slug":105,"title":106,"excerpt":107,"readTime":108,"views":109,"isPinned":13,"publishedAt":110,"category":111,"categories":112,"featuredImage":23,"bgImage":24,"posterImage":114,"relatedSolution":115},"openclaw-vps","Deploying OpenClaw on a VPS","A guide to deploying OpenClaw on your own VPS. Keep control of your AI agents and your data within your own infrastructure.",5,422,"2026-06-11T00:00:00+00:00",{"id":16,"name":17,"slug":18,"color":19,"icon":20},[113],{"id":16,"name":17,"slug":18,"color":19,"icon":20},"\u002Fblog\u002Fcovers\u002Fopenclaw-vps-poster.svg",{"categorySlug":20,"appSlug":116},"openclaw",1785628440444]