Private, self-hosted model and dataset hub

A self-hosted home for your arsenal of models.

Hangar is a self-hosted model and dataset hub, compatible with the Hugging Face Hub API, git, Ollama and LM Studio. Pull from huggingface.co once, keep full version history on your own model storage, and serve your models, LLMs and datasets to the tools you already use, even offline.

Free to self-host. Source-available under the Elastic License 2.0.

# Point any Hugging Face client at Hangar
$ export HF_ENDPOINT=https://hangar.example.com
$ hf download Qwen/Qwen3-0.6B

# Or pull one quant straight into Ollama
$ ollama pull hangar.example.com/unsloth/Qwen3-0.6B-GGUF:Q4_K_M

# Or clone a Repo, LFS files and all
$ git clone https://hangar.example.com/Qwen/Qwen3-0.6B
  • huggingface_hub
  • transformers
  • datasets
  • git
  • Ollama
  • LM Studio
  • vLLM
  • DuckDB

Why Hangar

Model files are big, and everyone needs them

  • Every machine downloads the same gigabytes

    Laptops, CI runners and Kubernetes Pods each fetch the same weights from huggingface.co. With Hangar you pull a model once, and every client loads it from a shared model cache on your own network.

  • Upstream is out of your hands

    Repos get deleted, gated or rewritten. A Mirror keeps the Commits you pulled, so pinned Revisions keep working.

  • Every tool fetches its own copy

    Hugging Face libraries, Ollama and LM Studio each download from the internet separately. Hangar gives them one source on your network, and doubles as a private Ollama registry.

  • Some networks can't reach the internet at all

    An air-gapped Instance pulls from another Hangar Instance that can. Hugging Face does not sell the Hub on-premises, so this is how you run one.

The web UI

Browse everything you have, and everything you could pull

Model cards, files, GGUF metadata and dataset rows, with filters for format, task, quantisation and size. Search huggingface.co from the same place, with what is already in your Arsenal marked.

The Models list in Hangar's web UI, with filters for format, task, quantisation and size

No install needed to look around: the demo runs on sample data, and nothing you do there is saved.

How it works

Pull once. Load from your own storage as often as you like.

  1. Discover

    Search huggingface.co, or another Hangar Instance, from the web UI or the hangar CLI. What is already in your Arsenal is marked.

  2. Pull

    Fetch a whole Repo, or only the quantisation, Config or Split you want, with any code it depends on. Pulls run as background Jobs, inside pull windows if your bandwidth needs them.

  3. Serve

    A Mirror keeps the upstream Repo ID and Commit SHAs, so pinned Revisions keep working. Clients load from fast local storage, even on an air-gapped network.

Operate

From a laptop to a cluster

Start with one container and grow into a highly available deployment without changing how clients connect.

Start small

1 container · SQLite · a local folder

Run Hangar on a laptop, a homelab or a single VM with Docker, Docker Compose or one binary for Linux, macOS or Windows.

Scale out

Replicas · Postgres · S3-compatible storage

Run stateless replicas with separate web and worker processes, installed with the Helm chart. See Scaling.

  • Sign in with your identity provider

    Local accounts and OIDC, with guides for Keycloak, Authentik, Microsoft Entra ID, Google, Okta, GitLab and UniFi Identity.

  • Organisations, Roles and Tokens

    Share Repos with read, write and admin Roles, and give each client a scoped Token with an optional expiry.

  • Security scans

    Hangar scans the tip of every branch, tag and pull request for malware in pickle files, which can run code when loaded, and you choose what to block.

  • OpenTelemetry built in

    Traces, metrics and logs, with ready-made Grafana and Kibana dashboards.

  • Webhooks and Collections

    React to pushes and Pulls with webhooks, and curate ordered Collections of Repos for your Organisation.

  • Import what you already have

    Bring an existing Hugging Face cache into Hangar, and back up and restore an Instance when you need to.

Quickstart

Start with one command

Run the container, then sign in. Compose, Helm and binary installs are in Get started.

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 cp hangar:/var/lib/hangar/secrets.yaml - | tar -xO | grep bootstrap_admin_password
  1. docker cp prints the admin password Hangar generated on first start.
  2. Open http://localhost:8080, sign in as hangar-admin, and pull a model from Discover.
  3. Set HF_ENDPOINT and HF_TOKEN, and load it with the tools you already use.

Questions

Frequently asked questions

Is Hangar a model registry?

It covers the storage and serving side of one. Hangar is a self-hosted model and dataset hub: every Repo is a git repository with branches, tags and Commits, and clients load files through the Hugging Face Hub API, git, Ollama or LM Studio. For experiment tracking and model lineage, pair it with MLflow: MLflow records runs and model versions, and Hangar stores and serves the files.

Is Hangar a private Hugging Face Hub?

Yes. Hangar serves the Hugging Face Hub API from your own servers and storage, so models and datasets stay on your network. Set HF_ENDPOINT to your Instance and huggingface_hub, transformers and datasets use it in place of huggingface.co. Private Repos are visible only to the Users and Organisations you give access.

Is Hangar a cache or proxy for Hugging Face models?

It does more than cache. Each Pull keeps a Mirror of the Repo with its git history and the upstream Commit SHAs, and you can upload models that exist nowhere else. With Pull-through on, it also works as a caching proxy for huggingface.co, and as a self-hosted alternative to public mirrors such as hf-mirror.com. Clients load everything from your own storage.

Does Hangar run models?

No. Hangar is a model storage server, not an inference server: it stores and serves files. Run models with the tools you already use, such as transformers, vLLM, Ollama or LM Studio, and point them at Hangar for the weights. Spaces and the Inference API are out of scope.

Do I need to change my code?

No. Set HF_ENDPOINT to your Instance and HF_TOKEN to a Token you create in Hangar. huggingface_hub, the hf CLI, transformers, diffusers, sentence-transformers, datasets and vLLM then work unchanged.

Can Hangar run offline or air-gapped, with no internet access?

Yes. Hangar runs as an air-gapped model and dataset hub: an Instance with no internet access pulls from another Hangar Instance that has it, as its Upstream. You can also import an existing Hugging Face cache, and clients load what they already downloaded with HF_HUB_OFFLINE=1.

Does Hangar scan models for malware?

Yes, for the formats that can run code. Pickle, PyTorch, joblib and NumPy files can run code when they are loaded, so a malicious model can hide malware in them. Hangar lists the imports of every such file at the tip of each branch, tag and pull request, marks unsafe and suspicious files, and can refuse to serve them. Prefer safetensors, which cannot run code.

Does it work with hf_xet?

Yes for uploads. Hangar accepts Xet uploads, so huggingface_hub with hf_xet installed works with no setup. It stores whole files and serves them over plain HTTP.

Is Hangar open source?

No, Hangar is source-available. The code is public on GitHub under the Elastic License 2.0, and you can read it, change it and self-host it for free, including inside your company. The licence is not OSI-approved open source because it stops others from offering Hangar as a hosted or managed service.

What does it cost?

Nothing. 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.

More answers, on upgrades, data, versions and getting help, are in the FAQ.

Give your models a home

Install Hangar in a few minutes, or look around the demo first.