# Self-hosted LLM

> Canonical: https://skillalmanac.com/glossary/self-hosted-llm | Last verified: 2026-11-23 | Index status: not offered to search engines

A self-hosted LLM is a language model whose weights you run on hardware you control, such as your own computer, server or private cloud, instead of calling a vendor's hosted API.

Also called: self hosted LLM, private LLM, on-prem LLM, local LLM, host your own LLM, self-hosting an LLM, open source LLM, open-source LLMs.

## In plain language

Most people use an AI model by sending text to a company's servers. A self-hosted model works the other way: you download the model and run it on your own machine or your own servers. Your text stays with you, and you choose the model, but you also pay for the hardware, set it up and keep it running. Not every model can be downloaded. Only models whose makers release their weights can be hosted this way.

## Technical definition

Self-hosting means loading published model weights into an inference runtime on infrastructure you operate, for example a desktop tool such as Ollama or a server stack, and exposing it through a local or private API. Weights are usually downloaded from a model hub. Memory needed for weights, plus the cache that grows with context length, decides which models fit a given GPU or computer. Quantised weights trade some quality for a smaller footprint.

## How it shows up when you use agents

Claude Code, Codex, Cursor and Gemini CLI normally send your prompts to a vendor's servers. Self-hosting changes the destination: the agent or an application points at a model served on your machine or inside your network. Ollama's README describes running a model with `ollama run` followed by a model name, a local REST API on port 11434, and integrations that start agents against it.

The decision usually starts with three questions.

- **Does it fit?** Weights must fit in memory with room for the context. Check before downloading. See [Inference](/glossary/inference) and [Context window](/glossary/context-window).
- **Where do the weights come from?** Hugging Face describes its Hub as a place to host and download model checkpoints through its client library and integrated libraries. See [AI model](/glossary/ai-model).
- **What are you giving up?** IBM presents open models as a way to keep data inside your own network and to inspect and fine-tune them, while noting that infrastructure and rollout costs remain.

What breaks when this is misunderstood: people assume local means private by default. A local endpoint with no authentication, a committed token or a log file full of prompts can leak just as well. Run the secrets check on any project that gains a model endpoint. Quality also differs by model, so test on your own tasks. See [LLM benchmark](/glossary/llm-benchmark).

## Common confusions

- **Self-hosted versus open source.** Self-hosting is where you run the model. Open source describes licence and availability. Many models people self-host release weights under terms that differ from classic open-source licences, so read the licence.
- **Local versus private.** A model on your laptop keeps prompts off a vendor's servers. That is not the same as secure. Access control, logs and stored files still need care.
- **Self-hosted versus cloud-hosted open model.** You can run an open model on a rented server. You control the model choice, but a third party still runs the hardware. Ollama also offers cloud models, which are not local.
- **Myth.** Self-hosting is free. There are no licence fees for many open models, but hardware, power and maintenance cost money.

## Worked examples in this catalogue

### [local-model-sizing](https://skillalmanac.com/skills/skill-almanac/local-model-sizing)

Status: illustrative example from the item's own documentation, not executed for this page.

What you see: A calculation of whether an open-weight model will run on a given GPU, Mac or PC, using a script that computes the memory needed for the weights and related overhead.

Why it exercises the concept: Hardware fit is the first question in self-hosting. The skill turns it from a guess into arithmetic before you download anything.

### [hf-cli](https://skillalmanac.com/skills/huggingface/hf-cli)

Status: illustrative example from the item's own documentation, not executed for this page.

What you see: Instructions that let an agent use the hf command line tool to manage Hugging Face Hub models, datasets, repos and authentication from the shell.

Why it exercises the concept: Open weights usually come from a model hub. This skill lets a coding agent fetch and manage them from the terminal.

### [env-file-exposure-check](https://skillalmanac.com/skills/skill-almanac/env-file-exposure-check)

Status: illustrative example from the item's own documentation, not executed for this page.

What you see: A report of committed environment files and secret-shaped values in a project folder, listing file, line and a masked value.

Why it exercises the concept: Self-hosting often adds an endpoint, tokens and a config file. This check catches the mistake of committing them.

### [Claude Code](https://skillalmanac.com/tools/claude-code)

```
ollama launch claude
```

Status: illustrative example from the item's own documentation, not executed for this page.

What you see: Ollama's README lists this command as a way to start a supported integration with a model served through Ollama.

Why it exercises the concept: It shows a coding agent talking to a model you run yourself rather than to a hosted one. Check Ollama's current documentation for supported models first.

## Related terms

- [Inference](https://skillalmanac.com/glossary/inference.md)
- [AI model](https://skillalmanac.com/glossary/ai-model.md)
- [Large language model (LLM)](https://skillalmanac.com/glossary/large-language-model.md)
- [Edge AI](https://skillalmanac.com/glossary/edge-ai.md)
- [Sovereign AI](https://skillalmanac.com/glossary/sovereign-ai.md)
- [Context window](https://skillalmanac.com/glossary/context-window.md)
- [MLX (Apple)](https://skillalmanac.com/glossary/mlx.md)

## Sources

- [Ollama README](https://github.com/ollama/ollama/blob/main/README.md), Ollama (accessed 2026-11-23)
- [The Model Hub](https://huggingface.co/docs/hub/en/models-the-hub), Hugging Face (accessed 2026-11-23)
- [What are open source LLMs?](https://www.ibm.com/think/topics/open-source-llms), IBM (accessed 2026-11-23)

Definitions are written by Skill Almanac from the sources above and checked against them on 2026-11-23. [Glossary index](https://skillalmanac.com/glossary.md).
