By Annie Vane · Local · Mac and PC · Guide · Docs-only · Checked October 25, 2026
Prices are in US dollars. Hosting prices were checked on each provider's own pricing page on December 2, 2026. Mac and Framework prices are the US store prices listed in our guides to those machines, checked December 2, 2026. Electricity is the US average residential price for September 2026 from the Energy Information Administration. Tool versions were checked on October 25, 2026. Prices are before sales tax.
For a five-person team, self-hosting costs about $34 a month on an $899 Mac mini, $142 on a rented US GPU, or $1.12 on a managed API. It is worth it for data control, not to save money. A self-hosted LLM is an AI model you run on hardware you control instead of a provider's cloud, so your prompts and documents never leave your premises. In 2026 it is easier than ever: free tools such as Ollama and LM Studio run open models like Qwen3.8, Gemma 4 and OpenAI's gpt-oss on an $899 Mac mini or a gaming PC, and vLLM serves a whole team from one GPU server. It is rarely cheaper than an API for a small business, though. This guide covers when self-hosting is worth it, the tools, the models, hardware with US prices, real running costs and how to keep it secure, plus LLM hosting providers compared if you would rather rent.
For the full guide, see Local AI vs Cloud AI: Real Speeds, Real Costs and an Honest Quality Check.
Key facts
- Worth it when: data must stay in-house, you run it all day, or a smaller open model does the job.
- Tools: Ollama, LM Studio and Jan for one machine; vLLM or SGLang for a team; Open WebUI for staff logins.
- Models: Qwen3.8-27B, Gemma 4 and gpt-oss, all Apache 2.0.
- Memory: about 0.5-0.6GB per billion parameters at 4-bit, plus headroom.
- Hardware: Mac mini from $899 (16GB); Mac Studio M5 Max with 64GB $3,499; Framework Desktop with 128GB $3,449 (out of stock when checked).
- Running cost: a Mac mini at full load uses about 1.3 cents an hour in electricity at the US average residential price of 18.17 cents per kWh (September 2026).
- Renting instead: gpt-oss-20b from $0.07 per million input tokens; GPU servers in AWS US East from $0.526 an hour.
- Security: about 175,000 Ollama servers have been found exposed on the internet. Keep yours private.



What is a self-hosted LLM?
A large language model is the engine inside tools like ChatGPT. Most people use one through a provider's app or API, which means every prompt travels to that provider's servers. Self-hosting means downloading an open-weight model, one whose files are published for anyone to run, and running it on a machine you control: a laptop, a Mac mini in the office, a GPU server in a cupboard or a server you rent.
You cannot self-host ChatGPT, Claude or Gemini; those models are never released. You can self-host strong open alternatives, including OpenAI's own gpt-oss models, released under the Apache 2.0 license in August 2025.
Should you self-host an LLM?
Self-host when client confidentiality, a contract or regulation rules out sending data to a cloud AI provider; when you will run the model constantly, for example classifying every incoming document; or when a smaller model is good enough for the job and you want a fixed cost.
Do not self-host when you need the best reasoning available, your use is occasional, or no one in the business wants to look after a server. A business plan from OpenAI, Anthropic, Google or Microsoft, with training switched off and a data processing agreement in place, is simpler and usually cheaper. Our AI agent cost guide compares the routes.
Which tools do you use to self-host an LLM?
| Tool | What it is for | License | Version (checked October 25, 2026) |
|---|---|---|---|
| LM Studio | Desktop app to find, run and serve models; headless mode (llmster) for servers | Free for work; proprietary | 0.4.26 |
| Ollama | Command-line runner that other apps plug into; one machine or small server | MIT | 0.40.11 |
| Jan | Simple offline chat app with a local API | Apache 2.0 | 0.8.7 |
| llama.cpp | The engine under many of these; its llama-server is OpenAI-compatible | MIT | Build b11876 |
| vLLM | High-throughput server for many users on GPUs | Apache 2.0 | 0.32.0 |
| SGLang | High-performance serving for production workloads | Apache 2.0 | 0.5.22 |
| Open WebUI | ChatGPT-style web front end with staff accounts, roles and groups | Open WebUI license (branding clause from 50 users) | 0.12.4 (0.13.4 by November 23) |
| LocalAI | OpenAI-compatible API that runs without a GPU | MIT | 4.9.0 |
Hugging Face's Text Generation Inference was archived in March 2026 and is in maintenance mode, so do not start a new project on it. For one person on a Mac, start with LM Studio or Ollama; our Ollama vs LM Studio vs Jan comparison helps you choose. For a team, a GPU server running vLLM with Open WebUI in front is the common pattern.
Which open models are worth self-hosting?
| Model | Size | License | Memory needed (approx.) |
|---|---|---|---|
| OpenAI gpt-oss-20b | 21B total, 3.6B active | Apache 2.0 | Runs within 16GB |
| Qwen3.8-27B | 27B dense, 262K context | Apache 2.0 | 17.6GB at 4-bit (measured) |
| Google Gemma 4 26B A4B | 25.2B total, 3.8B active | Apache 2.0 | About 16GB at 4-bit |
| Google Gemma 4 31B | 30.7B dense | Apache 2.0 | About 19GB at 4-bit |
| OpenAI gpt-oss-120b | 117B total, 5.1B active | Apache 2.0 | One 80GB GPU |
| Mistral Small 4 | 119B total, 6.5B active | Apache 2.0 | Two GPUs in Mistral's example |
| DeepSeek V4 Flash | 304B | MIT | 90.9GB at 2-bit (measured on a 128GB machine) |
| Meta Llama 4 Scout | 109B total, 17B active | Llama 4 Community License | One H100 at 4-bit |
"Active" parameters matter for speed: a mixture-of-experts model such as gpt-oss-20b only uses 3.6 billion of its 21 billion parameters for each word, so it runs fast, but it still needs memory for all of them. Gemma 4 moved to the Apache 2.0 license, which makes it as easy to use commercially as Qwen and gpt-oss.
How much memory do you need?
A model's weights need about 2GB per billion parameters at full 16-bit precision. Quantization shrinks that: about 1GB per billion at 8-bit and 0.5 to 0.6GB at 4-bit, which is the usual choice. Add room for the conversation (the context), the operating system and your other apps. If you are choosing a machine, my guide to which Mac or mini PC to buy for local AI compares 12 of them.
- 16GB: gpt-oss-20b, or 8-9B models with room to spare.
- 32GB: the 26-31B class (Qwen3.8-27B, Gemma 4), the sweet spot for business writing.
- 64-128GB: two models at once, long documents, or gpt-oss-120b on 96GB or more.
- Bandwidth decides speed. Two machines with the same memory can differ several times in speed because of how fast that memory is.
On a Mac, the processor and graphics share one pool of memory, so a Mac with 64GB can load models a PC would need a very expensive graphics card for. Our guide to running a local LLM on a Mac goes deeper.
What hardware should you buy?
| Machine | Memory | US price (December 2, 2026) | Notes |
|---|---|---|---|
| Mac mini M6 | 16GB (up to 32GB) | From $899 | 4 W idle, 70 W flat out; ideal for one person |
| Mac mini M5 Pro | 24GB (up to 64GB) | From $1,699 | Quiet office server for a small team |
| Mac Studio M5 Max | 36GB or 64GB (up to 128GB) | $2,499 / $3,499 | Fast memory (up to 614GB/s) |
| Mac Studio M5 Ultra | 96GB (up to 512GB) | See Apple's Mac Studio page | 1.2TB/s; the biggest models on one desk |
| Framework Desktop (AMD Ryzen AI Max+ 395) | 64GB / 128GB | $1,959 / $3,449 | 128GB version out of stock when checked |
| PC with NVIDIA RTX 5090 | 32GB on the card | Card launched at $1,999; street prices vary widely | Fastest for models that fit; 575 W card |
| NVIDIA DGX Spark | 128GB | Launched at $3,999 | Runs models up to 200B parameters |
Apple changes its range often, so check the current lineup in Apple's US store before you buy. Graphics card prices rose sharply in September 2026 because of memory shortages, so compare several US retailers.
How fast is a self-hosted LLM?
For gpt-oss-20b, a fast mixture-of-experts model, an RTX 5090 generates about 282 tokens a second, an M3 Ultra about 116 and an M4 Max about 92, according to the llama.cpp project's benchmark thread (published August 2025, not re-run). All are far faster than anyone reads. Dense 27-31B models run several times slower, and the more people share one machine, the slower each gets, which is where vLLM's batching earns its keep. NVIDIA's DGX Spark trades speed for memory: LMSYS measured about 50 tokens a second on gpt-oss-20b under Ollama.
Can you rent a GPU instead?
| Provider | Example | Price | Where |
|---|---|---|---|
| AWS | g6.xlarge (NVIDIA L4, 24GB) | $0.80 an hour | US East, N. Virginia (us-east-1) |
| AWS | g5.xlarge (NVIDIA A10G, 24GB) | $1.01 an hour | US East, N. Virginia |
| Hetzner | GEX45 (RTX PRO 4000 Blackwell, 24GB) | See Hetzner pricing (billed in euros) | Helsinki |
| Scaleway | L4-1-24G | See Scaleway pricing (billed in euros) | Paris |
| RunPod | RTX 5090 / H100 PCIe | $1.39 / $2.89 an hour | Region varies |
| Lambda | H100 PCIe | $3.79 an hour | 14 regions, including Germany |
Renting gives you a private model without buying hardware, and you can switch it off when idle. Check the provider's region and contract before you send personal data.
LLM hosting providers compared (US, 2026)
You do not need to own hardware to run an open-weight model privately. There are four kinds of LLM hosting: GPU clouds that rent you a server by the hour, managed services that run the model and bill per token, the big clouds that do both, and European hosts. I checked each provider's own pricing page on December 2, 2026, and its region pages on October 25, 2026. Prices are in US dollars as each provider lists them, before sales tax. Where a provider bills only in euros or shows no public dollar price, the table says "see" its pricing page instead of giving a number.
| Provider | Type | Cheapest GPU or per-token price | Best for |
|---|---|---|---|
| RunPod | GPU cloud | RTX A5000 $0.27 an hour | Cheap hourly GPUs for testing |
| Lambda | GPU cloud | V100 $0.79 an hour; H100 PCIe $3.79 | Large single GPUs by the hour |
| Hugging Face Inference Endpoints | Managed endpoint | NVIDIA T4 on AWS $0.50 an hour | Deploying a Hub model without managing servers |
| Together AI | Managed, per token | gpt-oss-120b $0.15 in / $0.60 out per million tokens | Wide choice of open models |
| Fireworks AI | Managed, per token | gpt-oss-120b $0.15 / $0.60 per million | Fast serving of open and fine-tuned models |
| Groq | Managed, per token | gpt-oss-20b $0.17 / $0.36 per million | Very fast replies |
| AWS Bedrock | Big cloud, per token | gpt-oss-20b in US East (N. Virginia) $0.07 / $0.30 per million | A per-token bill with US in-region processing |
| AWS EC2 | Big cloud, GPU server | g4dn.xlarge (NVIDIA T4, 16GB) $0.526 an hour | Your own model server in the US |
| Microsoft Azure | Big cloud, GPU server | NC4as T4 v3, Linux, $0.526 an hour | Firms already on Azure |
| Google Vertex AI | Big cloud, per token | gpt-oss-20b $0.07 / $0.25 per million | Google Cloud users who accept US processing |
| Hetzner | EU dedicated GPU server | GEX45 (24GB): see Hetzner pricing (billed in euros) | Lowest fixed bill for 24/7 use; servers in Helsinki |
| OVHcloud | EU GPU cloud and per-token API | L4 $1.00 an hour; L40S $1.80 (OVHcloud US, excl. taxes). AI Endpoints gpt-oss-20b: see OVHcloud pricing | Billing in dollars on the US site, EU hosting available |
| Scaleway | EU GPU cloud | L4-1-24G: see Scaleway pricing (billed in euros) | Hourly L4 servers in France |
| Nscale | GPU cloud and per-token API | gpt-oss-20b: see Nscale pricing (not in its public serverless list) | Low token prices; ask where it runs |
| Civo | GPU cloud | A100 40GB $1.09 an hour | An A100 by the hour |
Two things stand out. Hetzner and Scaleway list prices in euros only, and Nscale's public serverless list no longer shows gpt-oss-20b, so the table points to their pricing pages instead of a dollar figure. I left Vast.ai out because its pricing page shows no fixed prices.
Is self-hosting cheaper than an API?
Usually not, once you count the hardware. The electricity is cheap: at the US average residential price of 18.17 cents per kWh in September 2026 (Energy Information Administration, Electric Power Monthly, released November 24, 2026), a Mac mini M6 flat out costs about 1.3 cents an hour (0.07 kW x $0.1817) and an RTX 5090 card about 10 cents an hour (0.575 kW x $0.1817). Commercial customers averaged 14.27 cents in the same month, and prices vary by state: 13.33 cents in Louisiana and 30.86 cents in California, for example.
Our arithmetic: generating one million output tokens (roughly 750,000 words) with gpt-oss-20b on an RTX 5090 takes about an hour and costs about 10 cents in electricity for the card (0.575 kW x 1 hour x $0.1817 = $0.104). Cheap hosted models such as OpenAI's gpt-6-luna and Anthropic's Claude Haiku 5.5 charge $0.50 for the same million output tokens, and Groq charges $0.36 for gpt-oss-20b itself. The saving is about 26 to 40 cents per million tokens ($0.36 - $0.104 = $0.256; $0.50 - $0.104 = $0.396), so paying back the $1,999 card alone takes about 5 to 8 billion tokens ($1,999 / $0.396 = 5.05 billion; $1,999 / $0.256 = 7.8 billion), before you count your time.
So self-host for control, privacy or a fixed predictable cost, not to save money on a small workload.
Self-host on your own server vs rented GPU vs managed API
Here is one job priced three ways. A five-person team sends 40 requests each per working day, with about 1,500 tokens in and 500 tokens out per request. Over 22 working days that is 4,400 requests: 6.6 million input tokens and 2.2 million output tokens a month. The model is gpt-oss-20b in every case. Prices are as of December 2, 2026.
Your own server: about $34 a month
A Mac mini M6 with 16GB costs $899 at Apple's US store, before sales tax. Spread over three years, that is $899 / 36 = $24.97 a month. Electricity at the worst case of 70 W flat out, all month: 0.07 kW x 730 hours = 51.1 kWh, x $0.1817 = $9.28. Total: $24.97 + $9.28 = about $34 a month, with $899 paid up front. The real power bill is lower, because it idles at about 4 W.
Wins when the data must not leave your premises, or use is heavy and steady. You also need someone to look after it. For a larger team, see the small office setup.
Rented GPU: about $142 a month
An AWS g6.xlarge in US East (N. Virginia), with one 24GB NVIDIA L4, costs $0.8048 an hour on demand with Linux. Run for office hours only: 8 hours x 22 days = 176 hours, x $0.8048 = $141.64, about $142. Left on all month it is 730 hours x $0.8048 = $587.50. Storage and data transfer are extra. A Hetzner GEX45 in Helsinki is a fixed alternative for running 24/7; it is billed in euros, so see Hetzner pricing.
Wins when you need a model, a fine-tune or settings that no API offers, or a contract asks for a single-tenant server, without buying hardware.
Managed API: about $1.12 a month
AWS Bedrock in US East (N. Virginia) charges $0.07 per million input tokens and $0.30 per million output tokens for gpt-oss-20b. So 6.6 x $0.07 = $0.46, plus 2.2 x $0.30 = $0.66. Total $0.462 + $0.66 = $1.12 a month.
Wins when use is light or uneven, which covers most small firms. At this volume the API costs under 1% of a rented GPU in office hours ($1.12 / $141.64 = 0.8%).
Privacy and data residency
Running the model on your own machine keeps your prompts and files off third-party servers. If you handle customers' personal data, check the privacy laws that apply to you. For UK and EU rules, see aiagents.org.uk.
Mixing routes with a self-hosted LLM gateway
You do not have to pick one route. A gateway is a small server you run in front of your models. LiteLLM's AI Gateway, open source under the MIT license, gives your apps one OpenAI-compatible address for over 100 providers. It issues each team its own key with a budget and tracks spend. You can send confidential work to your own server and everything else to a hosted API.
How do you keep a self-hosted LLM secure?
The biggest risk is accidentally putting your model on the internet. Cisco Talos found 1,139 Ollama servers exposed online in 2025, about one in five serving models with no authentication. A 2026 study by SentinelOne and Censys found about 175,000 exposed Ollama hosts in 130 countries, around half able to run code or call other services.
- Keep it on localhost. Ollama listens on 127.0.0.1:11434 by default; setting OLLAMA_HOST=0.0.0.0 exposes it to the network.
- Put something in front. For office access, use a VPN or a reverse proxy with logins (Open WebUI provides accounts and roles).
- Use API keys where offered (llama-server and vLLM support --api-key), but vLLM's own documentation warns not to rely on the key alone.
- Firewall and rate limits on any server, and never open the model port on your router.
- Treat tools as the bigger risk. Once the model can use tools through MCP, the tools are what can do damage. See LM Studio plugins and MCP for safe settings.
A simple setup for a small office
For five to fifteen people who want a private assistant for drafting and document questions:
- Hardware: a Mac mini M5 Pro or Mac Studio with 64GB, in the office, on a UPS.
- Model server: LM Studio in headless mode or Ollama, running a 26-31B model such as Qwen3.8-27B or Gemma 4.
- Front end: Open WebUI, so each person has a login and chats stay separated. Its branding clause only applies once you pass 50 users.
- Access: office network or VPN only. Nothing exposed to the internet.
- Automation: point a workflow tool such as n8n at the same server for scheduled jobs. That turns it into an agent; see how to build an AI agent.
- Paperwork: a short DPIA, an acceptable-use note for staff and a named person who applies updates.
Frequently asked questions
What is a self-hosted LLM?
A large language model you run on hardware you control, in your office, at home or on a rented server, instead of sending prompts to a provider such as OpenAI or Anthropic. You download an open-weight model and run it with software such as Ollama, LM Studio, llama.cpp or vLLM.
Is self-hosting an LLM cheaper than using an API?
Rarely, for a small business. Hosted open models are cheaper still: gpt-oss-20b costs $0.17 per million input tokens and $0.36 per million output tokens on Groq, and $0.07 and $0.30 on AWS Bedrock in US East, while capable hardware costs from about $899 to several thousand dollars. Self-hosting pays off with heavy, steady use, or when the data must not leave your premises.
What is the best self-hosted LLM?
There is no single best. In October 2026 strong Apache 2.0 options include Qwen3.8-27B, Gemma 4 (26B A4B and 31B) and OpenAI's gpt-oss-20b and gpt-oss-120b. Pick the largest model that fits your memory with room to spare, and test it on your own tasks.
Can I run ChatGPT locally?
Not ChatGPT itself, which only runs on OpenAI's servers. OpenAI's open-weight models, gpt-oss-20b and gpt-oss-120b, can be run locally under the Apache 2.0 license; gpt-oss-20b runs within 16GB of memory.
How much RAM do I need to run an LLM?
Roughly 0.5 to 0.6GB per billion parameters at 4-bit quantization, plus room for the conversation and your other apps. In practice, 16GB runs gpt-oss-20b, about 18GB runs Qwen3.8-27B at 4-bit, and gpt-oss-120b needs about 80GB.
Does self-hosting keep my data private?
Mostly. Running the model on your own machine keeps prompts and files off third-party servers, but you still have to secure the machine. If you handle customers' personal data, check the privacy laws that apply to you. For UK and EU rules, see aiagents.org.uk.
What is the best LLM hosting provider for a US business?
There is no single best. If you want a managed per-token bill with a US region, AWS is the simplest choice: Bedrock serves gpt-oss in US East (N. Virginia), and EC2 rents a g4dn.xlarge GPU server there from $0.526 an hour. For a fixed monthly bill, Hetzner's GEX45 GPU server in Helsinki is priced in euros, so see Hetzner pricing. Check the region and the contract before you send personal data.
How much does it cost to host your own LLM?
In my worked example for a five-person team, about $34 a month for an $899 Mac mini spread over three years plus electricity at full load, or about $142 a month for an NVIDIA L4 server in AWS US East used in office hours. The same work through a managed API running gpt-oss-20b in US East costs about $1.12 a month.
What is a self-hosted LLM gateway?
A server you run between your apps and your models, giving them one OpenAI-compatible address. LiteLLM's open-source gateway supports over 100 providers, gives each team its own key and budget, and tracks spend, so private work can go to your own server and the rest to a hosted API.
Related: Set up the most popular model runner with the Ollama guide.
This week: OVHcloud released Olala mini, a 7B Apache 2.0 model with 1B active parameters that runs on an 8GB machine, and Open WebUI 0.13.4 added Tether; both are covered in Local AI this week: Inkling 2 Mini, NariQ and Olala mini (November 17 to 23, 2026).
Next: set up the software with the LM Studio guide.
Self-hosting is one of three routes to keeping your data out of other people's data centers; the private AI guide compares it with running a model on your own Mac and with no-retention cloud contracts.
Sources
- OpenAI, Introducing gpt-oss (August 5, 2025) - gpt-oss-20b and 120b, Apache 2.0
- Hugging Face, Qwen3.8-27B model card - size, license, context
- Hugging Face, Gemma 4 31B model card - sizes and Apache 2.0 license
- Hugging Face, Optimizing LLMs for speed and memory - memory per parameter
- Apple, Buy Mac mini (US store) - US prices, December 2, 2026
- Framework, Framework Desktop DIY Edition (US store) - US prices, December 2, 2026
- llama.cpp, Performance of gpt-oss-20b (discussion #15396, August 2025) - tokens per second
- LMSYS, NVIDIA DGX Spark review (October 13, 2025) - DGX Spark speed
- AWS, EC2 on-demand prices, US East (N. Virginia), Linux - g4dn.xlarge $0.526, g5.xlarge $1.006 and g6.xlarge $0.8048 an hour, December 2, 2026
- Hetzner, GEX45 announcement (September 1, 2026) - price and location
- U.S. Energy Information Administration, Electric Power Monthly, Table 5.6.A - US average residential price 18.17 cents per kWh and commercial 14.27 cents, September 2026 data, released November 24, 2026
- SecurityWeek, 175,000 exposed Ollama hosts (January 30, 2026) - exposure research
- Cisco, Detecting exposed LLM servers (September 1, 2025) - 1,139 exposed servers
- vLLM, Security - API key limits
- AWS, Amazon Bedrock pricing - gpt-oss-20b in US East $0.07 / $0.30 per million tokens (AWS price list, published December 1, 2026)
- Lambda, On-demand instances - regions
- Groq, Supported models - gpt-oss prices ($0.17 / $0.36 per million for gpt-oss-20b), December 2, 2026
- Apple, Buy Mac Studio (US store) - US prices, December 2, 2026
- NVIDIA, GeForce RTX 5090 - starting at $1,999
- RunPod, GPU cloud pricing - RTX A5000 $0.27, RTX 5090 $1.39 and H100 PCIe $2.89 an hour, December 2, 2026
- Lambda, AI cloud pricing - V100 $0.79 and H100 PCIe $3.79 an hour, December 2, 2026
- Hugging Face, Pricing - Inference Endpoints, NVIDIA T4 on AWS $0.50 an hour, December 2, 2026
- Together AI, Pricing - gpt-oss-120b $0.15 / $0.60 per million tokens, December 2, 2026
- Fireworks AI, Pricing - gpt-oss-120b $0.15 / $0.60 per million tokens, December 2, 2026
- Microsoft Azure, Linux virtual machines pricing - NC4as T4 v3, East US, $0.526 an hour (Azure Retail Prices API, December 2, 2026)
- Google Cloud, Partner models pricing - gpt-oss-20b $0.07 / $0.25 per million tokens
- Hetzner, GPU servers - GEX45 is priced in euros only
- OVHcloud US, Public Cloud pricing - L4 $1.00 and L40S $1.80 an hour, excluding taxes, December 2, 2026
- Scaleway, GPU Instances pricing - priced in euros only
- Nscale, Serverless models - public serverless list, December 2, 2026
- Civo, Pricing - A100 40GB $1.09 an hour, December 2, 2026
This page is reviewed monthly. Prices were last checked on December 2, 2026 and tool versions on October 25, 2026. Your next step: check the current US price of the machine or rented GPU you are considering before you commit.

