[{"data":1,"prerenderedAt":120},["ShallowReactive",2],{"seo-verification":3,"blog-heberger-ollama-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":75,"ctaBody":76,"ctaButton":77,"ctaUrl":78,"relatedPosts":79},11,"heberger-ollama-vps","How to Host Ollama on a VPS","Host Ollama on your VPS to serve open source LLMs locally via API. Docker, optional GPU, reverse proxy and API hardening.",8,607,false,"2026-06-09T00: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-ollama-vps-poster.svg",{"categorySlug":20,"appSlug":27},"ollama","Ollama lets you run open source language models (Llama, Mistral, Qwen, Gemma) with a simple OpenAI-compatible API. Installed on your VPS, it becomes a private inference server that all your applications can query, without cost per token or sending data to a cloud provider. Here is how to deploy and secure it.",[30,34,44,47,69,72],{"type":31,"title":32,"body":33},"h2","Why self-host Ollama on a VPS","Ollama is not an interface but an inference engine: it downloads quantized models and serves them via a local REST API, with an OpenAI-compatible endpoint (`\u002Fv1\u002Fchat\u002Fcompletions`). The benefit of a dedicated VPS is twofold. First, cost: a fixed-price VPS replaces an API bill that explodes with volume. Then, privacy: your prompts never leave the server, which is decisive for handling regulated data. Ollama becomes the shared LLM backend of your entire stack, which you plug into AnythingLLM, Flowise, LibreChat or your own scripts, simply by replacing the base URL with that of your VPS.",{"type":35,"title":36,"items":37},"ul","The concrete benefits of a self-hosted Ollama",[38,39,40,41,42,43],"Fixed inference cost: no more billing per token, regardless of the volume of requests.","OpenAI-compatible API: you replace the base URL without rewriting your client code.","Absolute privacy, prompts and responses stay on your infrastructure.","Free choice and switching between dozens of models via `ollama pull`.","Single LLM backend shared across all your self-hosted AI tools.","Possible offline operation, without dependency on an external service.",{"type":31,"title":45,"body":46},"Hardware and software requirements","Ollama is the most RAM-demanding on this list, because the model must fit in memory. A quantized 7B model (Q4) requires about 5 to 6 GB of RAM; so count on at least 8 GB of RAM to comfortably serve a 7B\u002F8B on CPU, and 16 GB for larger models or several loaded models. On pure CPU, generation remains slow: for responsive production, a VPS with a GPU radically changes things. Plan for 20 to 40 GB of disk depending on the number of models downloaded. Docker recommended, plus a subdomain (e.g. api-ia.your-domain.com) and port 443.",{"type":48,"title":49,"steps":50},"steps","Deploy Ollama with Docker and a secured API",[51,54,57,60,63,66],{"title":52,"body":53},"Install Ollama in a container","Run `docker run -d -v ollama:\u002Froot\u002F.ollama -p 127.0.0.1:11434:11434 --name ollama ollama\u002Follama`. The binding on `127.0.0.1` is deliberate: the API must never be exposed directly, because it is unauthenticated by default.",{"title":55,"body":56},"Download a model","Retrieve a model with `docker exec -it ollama ollama pull llama3.1:8b` (or `mistral`, `qwen2.5`). Test locally: `docker exec -it ollama ollama run llama3.1:8b 'Bonjour'`.",{"title":58,"body":59},"Verify the local API","Call the endpoint: `curl http:\u002F\u002F127.0.0.1:11434\u002Fapi\u002Fgenerate -d '{\"model\":\"llama3.1:8b\",\"prompt\":\"test\"}'`. Confirm that the response arrives as a stream.",{"title":61,"body":62},"Add an authentication layer at the proxy","Since Ollama has no native auth, place a reverse proxy in front. With Caddy, expose `api-ia.your-domain.com`, add a token check (`Authorization` header) via a directive, then `reverse_proxy localhost:11434`. Let's Encrypt handles the TLS.",{"title":64,"body":65},"Lock down the firewall","With UFW, only allow 443 (and 22) inbound, and explicitly block external 11434. Check from outside that `https:\u002F\u002Fapi-ia.your-domain.com` does require the token.",{"title":67,"body":68},"Connect your applications","In your clients (OpenAI SDK, Flowise, LibreChat), point the base URL to `https:\u002F\u002Fapi-ia.your-domain.com\u002Fv1` and pass your token. Your existing calls work without any other modification.",{"type":70,"body":71},"tip","On a CPU VPS, the first request after a period of inactivity is slow because the model is reloaded into memory. Keep it resident by setting `OLLAMA_KEEP_ALIVE=-1`, and limit the number of concurrent models with `OLLAMA_MAX_LOADED_MODELS=1` to avoid saturating the RAM. Favor Q4_K_M quantizations: the best speed\u002Fquality compromise on a processor.",{"type":70,"title":73,"body":74},"The official documentation","For advanced configuration and options specific to the tool, refer to the \u003Ca href=\"https:\u002F\u002Follama.com\u002Fdocs\" target=\"_blank\" rel=\"noopener noreferrer\">official Ollama documentation\u003C\u002Fa>. This guide covers going live on a VPS; the vendor documentation remains the reference for fine tuning, major updates and specific use cases.","Your private LLM server on a ServOrbit Cloud VPS","The ServOrbit Cloud VPS offers the RAM and scalability needed to serve your Ollama models locally. Increase the memory when you move to larger models, without migration.","Launch my Cloud VPS","\u002Fvps-cloud",[80,93,107],{"id":16,"slug":81,"title":82,"excerpt":83,"readTime":84,"views":85,"isPinned":13,"publishedAt":86,"category":87,"categories":88,"featuredImage":23,"bgImage":24,"posterImage":90,"relatedSolution":91},"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},[89],{"id":16,"name":17,"slug":18,"color":19,"icon":20},"\u002Fblog\u002Fcovers\u002Fheberger-open-webui-poster.svg",{"categorySlug":20,"appSlug":92},"open-webui",{"id":94,"slug":95,"title":96,"excerpt":97,"readTime":98,"views":99,"isPinned":13,"publishedAt":100,"category":101,"categories":102,"featuredImage":23,"bgImage":24,"posterImage":104,"relatedSolution":105},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},[103],{"id":16,"name":17,"slug":18,"color":19,"icon":20},"\u002Fblog\u002Fcovers\u002Fdeployer-dify-vps-poster.svg",{"categorySlug":20,"appSlug":106},"dify",{"id":84,"slug":108,"title":109,"excerpt":110,"readTime":111,"views":112,"isPinned":13,"publishedAt":113,"category":114,"categories":115,"featuredImage":23,"bgImage":24,"posterImage":117,"relatedSolution":118},"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},[116],{"id":16,"name":17,"slug":18,"color":19,"icon":20},"\u002Fblog\u002Fcovers\u002Fopenclaw-vps-poster.svg",{"categorySlug":20,"appSlug":119},"openclaw",1785628443086]