Hangar¶
A self-hosted home for your arsenal of models.
Hangar keeps your machine learning models and datasets on your own storage, with full version history, and serves them to the tools you already use:
- Hugging Face clients. Set
HF_ENDPOINTandhuggingface_hub, thehfCLI,transformers,diffusers,sentence-transformers,datasetsand vLLM work unchanged. - git.
git cloneandgit push, with git-lfs. - Ollama.
ollama pull hangar.example.com/org/model:Q4_K_Mfor any GGUF Repo. - LM Studio.
hangar lmstudio install org/model:Q4_K_M. - Datasets.
load_dataset, pandas and Polars overhf://, DuckDB over HTTPS, and a Dataset Viewer in the browser.
Pull models and datasets from huggingface.co once, including only the quantisation, Config or Split you want and any code they depend on, then load them from fast local storage as often as you like. Upload models that exist nowhere else. Browse everything you have, and everything you could pull, in one place.

To try the web UI without installing anything, open the demo. It runs on sample data, and nothing you do there is saved.
Quickstart¶
docker run -d --name hangar -p 8080:8080 -v hangar:/var/lib/hangar \
-e HANGAR_SERVER_PUBLIC_URL=http://localhost:8080 \
ghcr.io/hangar-hub/hangar:latest
docker logs hangar # prints the generated admin password and Instance key once
Open http://localhost:8080, sign in as hangar-admin, and pull hf-internal-testing/tiny-random-bert from Discover. Then point your Python tools at Hangar:
export HF_ENDPOINT=http://localhost:8080
export HF_TOKEN=hgr_... # create one under Settings, Tokens
python -c "from transformers import AutoModel; AutoModel.from_pretrained('hf-internal-testing/tiny-random-bert')"
Next: Get started covers Docker, Compose, Helm and the binary, your first sign-in and your first Pull.
What it runs on¶
Hangar runs as one container on a laptop or homelab, with SQLite and a local folder. It scales out to stateless replicas over Postgres and S3-compatible storage, with separate web and worker processes. It exports traces, metrics and logs with OpenTelemetry, and supports local accounts and OIDC sign-in. See Scaling.
What it is not¶
Hangar stores and serves files; it does not run models. Spaces, the Inference API, SSH git and Xet downloads are out of scope. It accepts Xet uploads, so huggingface_hub with hf_xet installed works with no setup, but it stores whole files and serves them over plain HTTP.
Licence¶
Hangar is source-available under the Elastic License 2.0. You can use, change and self-host it, including inside your company. You can't offer it to others as a hosted or managed service, or remove licence notices.