Self-Hosted AI in 2026: Models, Tools, Hosting and Cost
Self-hosted AI in 2026: which open models fit 8-80 GB, Ollama vs LM Studio vs vLLM, private chat apps, and costs from a $6.49 VPS to $0.34/hr GPUs.
Quick comparison
| Provider | From | Starting plan | Free tier | Our rating | Link |
|---|---|---|---|---|---|
HostingerChecked | $2.49/mo | Premium (web hosting)20 GB SSD | No (30-day money-back guarantee) | Not rated | Visit |
DigitalOceanChecked | $4/mo | Basic Droplet 512 MiB1 vCPU · 0.5 GB RAM · 10 GiB SSD | Occasional promo credit for new users | Not rated | Visit |
ElestioChecked | $11/mo | Linode 'Micro' (cheapest shown)1 vCPU · 1 GB RAM · 25 GB SSD | 3-day trial with $20 credit | Not rated | Visit |
RunPodChecked | $0.34/hr | RTX 4090 24GB (Community Cloud) | No free credits; small referral bonus after a $10 top-up | Not rated | Visit |
Vast.aiChecked | $0.47/hr | RTX 4090 24GB | No free credits | Not rated | Visit |
ModalChecked | $1.10/hr | A10 | $30/month of free credits on the Starter plan | Not rated | Visit |
Self-hosted AI means running open-weight AI models, or the apps around them, on hardware you control instead of a hosted chat service. As of November 28, 2026, a computer with 16 GB of memory runs a 20-billion-parameter model such as gpt-oss:20b (a 14 GB download) for free, a VPS from $6.49 a month hosts a private chat app for a team, and a rented 24 GB GPU costs from $0.34 an hour. Only very heavy use makes self-hosting the model itself cheaper than an API.
At a glance (checked November 28, 2026)
| What | Figure | Source date |
|---|---|---|
| Free, on your own computer | Ollama, llama.cpp or LM Studio; gpt-oss:20b runs “with as little as 16GB memory” | Ollama, Nov 28, 2026 |
| Cheapest always-on server for a chat app | Hostinger KVM 1 (1 vCPU, 4 GB): $6.49/mo for 24 months ($155.76 upfront), renews at $11.99; KVM 2 (2 vCPU, 8 GB): $8.79/mo | Hostinger, Nov 2026 |
| Managed, no server upkeep | Elestio Ollama or Open WebUI: “starting at $30/mo”, billed hourly | Elestio, Nov 28, 2026 |
| Rented 24 GB GPU (20B-30B models) | RunPod RTX 4090 $0.34/hr (Community Cloud); Vast.ai median $0.47/hr | RunPod Oct 2026; Vast.ai Nov 2026 |
| Rented 80 GB GPU (120B models) | RunPod H100 PCIe $1.99/hr (Community) = $1,452.70 a month around the clock | Oct 2026 |
| The same 120B model as an API | gpt-oss-120b on Together AI: $0.15 per million input tokens, $0.60 per million output | Nov 2026 |
We haven’t run these tools or servers ourselves. Model sizes, requirements and defaults come from each project’s own pages, read on November 28, 2026; prices come from the site’s price data with the month it was checked (see how we work). If you’re choosing an AI agent rather than a model or chat app, go to self-hosted AI agents.
What “self-hosted AI” means
Every AI setup has three layers, and you can self-host any of them:
- The model: the weights, files from 1 GB to hundreds of GB.
- The runner: the inference server that loads the model into memory and answers requests (Ollama, llama.cpp, LM Studio, vLLM).
- The app: the chat interface, document search, assistant or automation that people actually open (Open WebUI, LibreChat, AnythingLLM, Dify, n8n).
Fully self-hosted means all three run on your hardware and nothing leaves it. The common middle ground is a self-hosted app calling an API model: you own the interface, chat history and user accounts, but prompts still go to the model provider under its data policy. Both count as self-hosted AI; they protect different things.
Which self-hosted AI models are worth running?
Open-weight models can be downloaded and run by anyone, but licenses differ, so read them before commercial use.
| Family | Maker | Sizes | License | Good to know |
|---|---|---|---|---|
| gpt-oss | OpenAI | 20B (21B total, 3.6B active), 120B (117B total, 5.1B active) | Apache 2.0 | 20B runs “within 16GB of memory”; 120B runs “on a single 80GB GPU” (model card) |
| Qwen 3.5 | Alibaba’s Qwen team | 0.8B to 122B | Apache 2.0 | Image input, tool calling, thinking mode on by default; 262,144-token context (model card) |
| Qwen 3.6 | Alibaba’s Qwen team | 27B, 35B | See the model page | Aimed at agentic coding; 256K context (Ollama) |
| Gemma 4 | E2B, E4B, 12B, 26B A4B, 31B | Apache 2.0 | Text and image input, native tool use; 128K context on E2B/E4B, 256K on the rest (model card) | |
| Llama 4 Scout | Meta | 109B total, 17B active, 16 experts | Llama 4 Community License | Gated download; services with over 700 million monthly users must ask Meta for a license (model card) |
| DeepSeek V4 Flash | DeepSeek | 284B total, 13B active | MIT | 1 million-token context; far too large for a home PC (model card) |
There’s no single best model. On 16-24 GB, gpt-oss:20b, Gemma 4 12B and Qwen 3.5 up to 27B are permissively licensed starting points. With an 80 GB GPU, gpt-oss:120b is the step up.
How much memory does a self-hosted model need?
The model has to fit in GPU memory (VRAM), or in unified memory on an Apple silicon Mac, with room left for context. Download sizes from Ollama’s library for gpt-oss, Qwen 3.5, Qwen 3.6 and Gemma 4, at the default 4-bit builds unless noted:
| Memory you have | What fits | Examples (download size) |
|---|---|---|
| 8 GB | Up to about 9B | qwen3.5:4b (3.3 GB); qwen3.5:9b (6.6 GB, tight) |
| 16 GB | Up to about 20B | gemma4:12b (8.0 GB); gpt-oss:20b (14 GB) |
| 24 GB | Up to about 31B | qwen3.5:27b (17 GB); qwen3.6:27b (18-19 GB); gemma4:31b (20 GB) |
| 48 GB | 30B-class at 8-bit, or with long context | qwen3.5:27b-q8_0 (30 GB); gemma4:31b-it-q8_0 (34 GB) |
| 80 GB | About 120B | gpt-oss:120b (65 GB) |
| 141 GB or more | 120B-class with room to spare | qwen3.5:122b (81 GB) |
A rule of thumb from those sizes: about 0.6-0.7 GB per billion parameters at 4-bit and about 1.1 GB at 8-bit, then add memory for context. Ollama defaults to a 4k context under 24 GiB of VRAM, 32k from 24 to 48 GiB and 256k at 48 GiB or more, and says agents, web search and coding tools “should be set to at least 64000 tokens” (Ollama docs).
Tags such as qwen3.5:35b-a3b (22 GB) and gemma4:26b (16-19 GB) are mixture-of-experts models: only 3-4 billion parameters work on each token, so they run faster than their size suggests, but the whole file still has to fit in memory.
Ollama, LM Studio, llama.cpp or vLLM?
| Runner | Best for | Runs on | License |
|---|---|---|---|
| Ollama | The easiest start: install, then pull a model from its library | NVIDIA compute capability 5.0+ with driver 550+, AMD with ROCm v7 on Linux, Apple Metal, Vulkan on Windows and Linux (GPU docs) | MIT |
| LM Studio | A desktop app: browse, download and chat with models without a terminal | Apple silicon Macs on macOS 14+, Windows x64 (AVX2) or ARM, Linux x64/ARM64 on Ubuntu 20.04+; 16 GB RAM recommended (requirements) | Not stated on the pages read |
| llama.cpp | Squeezing models onto modest or unusual hardware, with full control | CPU, Metal, CUDA, HIP, Vulkan, SYCL and MUSA builds (build guide) | MIT |
| vLLM | Serving many users or apps from data-center GPUs | Linux only, Python 3.11-3.14; NVIDIA compute capability 7.5+, AMD ROCm 6.3+, Intel Data Center and Arc GPUs (install docs) | Apache 2.0 |
Pick Ollama for one person on a PC, a Mac or a single server GPU. Pick LM Studio if you’d rather click than type; it runs MLX and llama.cpp underneath. Pick llama.cpp to tune every setting; its v1 release adds llama serve, an OpenAI-compatible server, and a built-in chat app. Pick vLLM when several people or apps share a GPU server.
LM Studio and llama.cpp both serve OpenAI-compatible endpoints (LM Studio’s examples use http://localhost:1234/v1; docs), so apps built for the OpenAI API connect by changing a base URL.
What is the best self-hosted AI platform?
These are the apps most people mean by a “self-hosted AI platform”: the part you open in a browser. All are on GitHub.
| App | What it’s for | Runs as | Users | License |
|---|---|---|---|---|
| Open WebUI | ChatGPT-style chat for Ollama and any OpenAI-compatible API; an :ollama image bundles Ollama |
Docker (example maps port 3000 to 8080) | Accounts | Open WebUI License, which “requires preserving the Open WebUI branding” |
| LibreChat | One interface for Claude, OpenAI, Google, Bedrock and custom endpoints, with agents and MCP tools | Docker | Multi-user with OAuth2, LDAP or email login, and an admin panel | MIT |
| AnythingLLM | Chat with your own documents; built-in local model engine (llama.cpp) | Desktop app (Mac, Windows, Linux) or Docker | Multi-user in Docker only | MIT |
| Dify | Build chatbots, document Q&A and workflows for others to use | Docker Compose 2.35.0+; at least 2 CPU cores and 4 GiB RAM | Teams | Dify Open Source License, “based on Apache 2.0 with additional conditions” |
| ComfyUI | Node-based image, video, audio and 3D generation | Desktop or server | Single user | GPL-3.0 |
How to pick: Open WebUI for one person or a family on Ollama; LibreChat for a team that wants several API providers behind company logins; AnythingLLM if the job is “ask questions about our files”; Dify if you’re building an AI tool for customers. ComfyUI says it can run large models “on as low as 4GB vram + 8GB ram” by offloading.
For automations, n8n’s self-hosted AI starter kit bundles n8n, Ollama, Qdrant and PostgreSQL; its README says it “is not fully optimized for production environments”. Our n8n hosting guide covers the production route.
Can you build a self-hosted AI assistant?
Yes, at two levels. A chat assistant is any of the apps above on top of a model: it answers questions, searches your documents and keeps history on your server. An agent assistant (Hermes Agent, OpenClaw, Agent Zero, OpenHands) goes further and takes actions: it reads email, runs commands and works on a schedule. That needs more care, because a mistake or a prompt injection can act on your accounts.
For a chat assistant, follow “Where to run it” below. For an agent, our self-hosted AI agents guide compares the agents, their memory needs and a safe setup, and OpenClaw with local models covers running an agent on Ollama.
Where to run it, and what it costs over 3 years
| Option | Good for | Example price | Watch out for |
|---|---|---|---|
| Your own PC or Mac | Learning, privacy, models up to your memory | Hardware you own, plus power | VRAM limits; keep it off the public internet |
| A CPU VPS | An always-on chat app calling an API; tiny local models | Hostinger KVM 1 $6.49/mo, KVM 2 $8.79/mo, KVM 4 (4 vCPU, 16 GB) $12.99/mo, each for 24 months paid upfront (Nov 2026); DigitalOcean 4 GiB Droplet $24/mo, billed hourly (Nov 2026) | Hostinger renews at $11.99/$14.99/$28.99; CPU-only servers are slow even for small models |
| Managed app hosting | The same apps without server upkeep | Elestio Ollama or Open WebUI: from $30/mo, billed hourly, “no commitment” (Nov 28, 2026) | Costs more per spec than a plain VPS |
| An hourly GPU | 20B-120B models, bursts of heavy use | RunPod RTX 4090 $0.34/hr Community, $0.89/hr Secure; H100 PCIe $1.99/hr Community (Oct 2026); Vast.ai RTX 4090 median $0.47/hr, offers from $0.14 (Nov 2026) | The meter runs while it’s on, plus storage |
| A serverless GPU | An API with spiky traffic | Modal L40S $1.9512/hr for the GPU, billed per second; $30/mo of free credits on Starter (Nov 2026) | Cold starts; CPU and memory billed on top |
Hetzner’s Cost-Optimized cloud plans, often the cheapest pick, showed “Currently not available” on its cloud page on November 28, 2026, so they’re left out of the totals.
Three-year totals
Server or GPU only, before tokens, power or GPU storage. Hostinger’s totals use its 24-month intro price, then 12 months at the renewal price.
| Setup | Arithmetic | 3-year total |
|---|---|---|
| Own computer, Ollama + Open WebUI | No new hardware | $0 plus power |
| Hostinger KVM 1, chat app + API | $155.76 + 12 × $11.99 | $299.64 |
| Hostinger KVM 2, chat app + API | $210.96 + 12 × $14.99 | $390.84 |
| Hostinger KVM 4, small CPU models | $311.76 + 12 × $28.99 | $659.64 |
| DigitalOcean 4 GiB Droplet | 36 × $24 | $864 |
| Elestio managed Open WebUI with Ollama | 36 × $30 (minimum) | $1,080 |
| RunPod RTX 4090 Community, 4 hours a day | 4 × 365 × 3 × $0.34 | $1,489.20 |
| Vast.ai RTX 4090 at the median, 4 hours a day | 4,380 hr × $0.47 | $2,058.60 |
| RunPod H100 PCIe Community, 24/7 | 36 × 730 × $1.99 | $52,297.20 |
The gap between the last row and the rest is the point: a private chat app is cheap, and running a big model around the clock is not.
Hosting Ollama on a server
Ollama runs on any Linux VPS, but on a CPU-only plan stick to small models and expect slow replies. Hostinger’s Ollama VPS template “comes pre-installed with Ollama, the Llama3 model, and Open WebUI”, reached at https://[your-vps-ip]:8080, and its guide says replies speed up with more CPU cores (template guide). Elestio’s managed Open WebUI “Includes Ollama’s default setup” (Elestio). For models above roughly 9B parameters, use a GPU: see how to rent a GPU and the cheapest cloud GPUs.
Is self-hosted AI cheaper than an API?
Usually not for the model itself. A worked example with the prices above:
- gpt-oss-120b on an 80 GB H100 from RunPod’s Community Cloud at $1.99/hr, around the clock: 730 × $1.99 = $1,452.70 a month.
- Together AI serves the same model at $0.15 per million input tokens and $0.60 per million output (Nov 2026). $1,452.70 buys about 9.7 billion input tokens ($1,452.70 ÷ $0.15), or about 2.4 billion output tokens.
- A 10-person team sending 20 million input and 5 million output tokens a month pays 20 × $0.15 + 5 × $0.60 = $6 a month. With a Hostinger KVM 2 running LibreChat or Open WebUI, that’s $390.84 + 36 × $6 = $606.84 over three years, against $52,297.20 for the H100.
Self-hosting the model comes out ahead when the data must not leave your control, when you already own the hardware, when you rent a GPU in short bursts and turn it off, or when you need a fine-tuned model no API serves. Mixing is normal: self-host the app and your data, and call an API for the heavy model. Compare model prices in our AI token cost calculator.
Is self-hosted AI safe and private?
Only as private as its weakest layer, and only as safe as its defaults.
| Setup | Where your prompts go |
|---|---|
| Local model on your machine | Nowhere. Ollama’s FAQ: “We don’t see your prompts or data when you run locally” (FAQ) |
| Self-hosted app with an API model | To the model provider, under its data policy |
| Model on a rented GPU | To a server you rent but don’t physically control. RunPod’s Community Cloud and Vast.ai use third-party hosts, so pick a data-center tier for sensitive data |
What listens on the network by default
| Tool | Default | What to do |
|---|---|---|
| Ollama | “binds 127.0.0.1 port 11434 by default”; its FAQ describes no login for the local API | Leave it on localhost. Changing OLLAMA_HOST to 0.0.0.0 exposes it to anyone who can reach the port |
| Anything in Docker | “the Docker daemon publishes ports to all host addresses”, which Docker calls “insecure by default” (Docker docs) | Publish as -p 127.0.0.1:3000:8080 and put a reverse proxy with HTTPS in front |
| Hostinger’s Ollama template | Open WebUI at https://[your-vps-ip]:8080; you create the account on first visit |
Create your account as soon as the server is up, then turn off open sign-ups |
| LM Studio | API examples at localhost:1234 |
Keep it local, or reach it over an SSH tunnel or VPN |
Then cover the basics: SSH keys instead of passwords, a firewall that allows only SSH and HTTPS, logins on every app, and backups of chats and documents, which are now your responsibility. Ubuntu Server installs unattended-upgrades by default and turns on automatic security updates “right after installation” (Ubuntu docs). Read the licenses too: Llama 4 is gated with a large-company clause, Open WebUI requires its branding, and Dify adds conditions to Apache 2.0.
Which to choose
- Curious, with a 16 GB laptop or an Apple silicon Mac: Ollama with Open WebUI, or LM Studio if you’d rather not use a terminal, running gpt-oss:20b or qwen3.5:9b. It costs nothing extra and nothing leaves the machine.
- A small team that wants a private, always-on chat app: a Hostinger KVM 2 (2 vCPU, 8 GB) with LibreChat or Open WebUI and an API model: $390.84 over three years plus tokens, the lowest 3-year total here for 8 GB. If you won’t pay 24 months upfront, a DigitalOcean 4 GiB Droplet is $24 a month, billed hourly.
- No one to run a server: Elestio’s managed Open WebUI with Ollama, from $30 a month, with updates and backups handled.
- You need a 20B-30B model on private data, a few hours at a time: a RunPod RTX 4090 at $0.34/hr (Community) or $0.89/hr (Secure Cloud for sensitive data), or Vast.ai if you’ll compare host reliability for offers below the $0.47 median. Delete the instance afterwards. See RunPod vs Vast.ai.
- An app or API with spiky traffic: Modal’s serverless GPUs, billed per second, with $30 a month of free credits to start.
- A 120B model for a whole team: price the API first. A 24/7 H100 only pays off at billions of tokens a month, or when the data may not leave your control. For more GPU options, see GPU cloud and the best GPU servers for AI.
FAQ
Can I run self-hosted AI without a GPU?
Yes, with limits. Small models (about 4B-9B parameters) run on a CPU with enough RAM, slowly. Apps that call an API, such as Open WebUI, LibreChat or n8n, need no GPU at all.
Ollama or LM Studio?
Both run models locally on Windows, Mac and Linux. Ollama is a command-line tool and server that suits a home server or a VPS; LM Studio is a desktop app with a model browser that also serves OpenAI-compatible endpoints to other apps.
Is there a free self-hosted AI?
The software is free: Ollama, llama.cpp, Open WebUI, LibreChat, AnythingLLM and gpt-oss, Qwen and Gemma models cost nothing to download. You pay only for the hardware, a server or a GPU by the hour.
Sources
- Ollama: context length (read 2026-11-28)
- Ollama: FAQ (read 2026-11-28)
- Ollama: GPU support (read 2026-11-28)
- Ollama library: gpt-oss (read 2026-11-28)
- Ollama library: qwen3.5 tags (read 2026-11-28)
- Ollama library: qwen3.6 (read 2026-11-28)
- Ollama library: gemma4 tags (read 2026-11-28)
- OpenAI: gpt-oss-20b model card (read 2026-11-28)
- Qwen: Qwen3.5-9B model card (read 2026-11-28)
- Google: Gemma 4 31B model card (read 2026-11-28)
- Meta: Llama 4 Scout model card (read 2026-11-28)
- DeepSeek: V4 Flash model card (read 2026-11-28)
- LM Studio: system requirements and OpenAI compatibility (read 2026-11-28)
- llama.cpp: README and build guide (read 2026-11-28)
- vLLM: GPU installation (read 2026-11-28)
- Open WebUI: GitHub (read 2026-11-28)
- LibreChat: GitHub (read 2026-11-28)
- AnythingLLM: GitHub (read 2026-11-28)
- Dify: GitHub (read 2026-11-28)
- ComfyUI: GitHub (read 2026-11-28)
- n8n: self-hosted AI starter kit (read 2026-11-28)
- Hostinger: VPS hosting plans (read 2026-11-28)
- Hostinger: how to use the Ollama VPS template (read 2026-11-28)
- Hetzner: cloud servers (read 2026-11-28)
- Elestio: Ollama and Open WebUI (read 2026-11-28)
- Docker: port publishing (read 2026-11-28)
- Ubuntu Server: automatic updates (read 2026-11-28)
- RunPod, Vast.ai, Modal and DigitalOcean prices, and Together AI’s gpt-oss-120b price: AskGPU price data (checked October-November 2026; see each tool page)