{
  "slug": "hf-jobs-exposes-container-ports-through-the-jobs-proxy-25c667fa5951",
  "title": "hf jobs exposes container ports through the jobs proxy",
  "tools": [
    "hf"
  ],
  "tags": [
    "agent"
  ],
  "introduced_at": "2026-06-11T10:07:51.000Z",
  "announced_at": "2026-06-11T10:07:51.000Z",
  "effective_at": null,
  "date_basis": "source-publication",
  "status": "unknown",
  "how": {
    "incantation": "When a repository development server runs in an HF Job, pass its port with `--expose` or `expose` when creating the job. Use the returned `expose_urls` to reach it; accessing the URL requires an HF token with read access to the job's namespace.",
    "examples": [
      "hf jobs run --expose 8000 python:3.12 python -m http.server 8000",
      "from huggingface_hub import run_job\njob = run_job(image=\"python:3.12\", command=[\"python\", \"-m\", \"http.server\", \"8000\"], expose=[8000])\njob.status.expose_urls"
    ],
    "gotchas": [
      "Version: v1.19.0",
      "--expose INTEGER: Container port to expose through the jobs proxy; repeat the flag to expose multiple ports. URL access requires an HF token with read access to the job's namespace.",
      "image (required): Docker image for the job; example uses `python:3.12`.",
      "command (required): Command to run in the job; example starts Python's HTTP server on port 8000.",
      "expose: List of container ports to expose through the proxy, e.g. `[8000]`.",
      "JobStatus.expose_urls: List of public URLs for exposed ports; `None` when no port is exposed. Each URL uses `https://<job_id>--<port>.hf.jobs`. Access requires an HF token with read access to the job's namespace.",
      "Prerequisite: The machine must be logged in to run and manage Jobs.",
      "Prerequisite: Jobs are available to Pro users and Team or Enterprise organizations.",
      "Prerequisite: Accessing an exposed URL requires an HF token with read access to the Job's namespace.",
      "Exposed ports require an HF token with read access to the job's namespace.",
      "Works on `hf jobs run`, `hf jobs uv run`, and their scheduled variants."
    ]
  },
  "why_it_matters": "Run a repository development server in a Hugging Face Job and make its port reachable for review.",
  "sources": [
    "https://github.com/huggingface/huggingface_hub/releases/tag/v1.19.0",
    "https://huggingface.co/docs/huggingface_hub/v1.19.0/en/guides/jobs",
    "https://huggingface.co/docs/huggingface_hub/v1.19.0/en/package_reference/jobs"
  ],
  "rank": 0.98025,
  "judge": {
    "publish": true,
    "judge_model": "codex-cli/gpt-6-luna+typesafe/jev-1.13.0",
    "prompt_version": "extract-v7+enrich-v2+judge-v2x3+jev-publish-v1"
  },
  "review_state": "approved",
  "provenance": {
    "run_id": "wave2b-20261017",
    "verdict_id": "wave2b-20261017:wave2b-20261017-c5141ca5a50fea07-2:gate",
    "evidence_hash": "bf16c0b37b4b30a03a0aa7a94f75ba481fea0afdc9c555610e8c55ae5a4bb937"
  },
  "review": {
    "draft_hash": "6682ee9d85fabd85733201841cecbc19c3ce5aa46e9aa0355ab1da3ab1aa1ed1",
    "reviewer": "publication-gate",
    "reviewed_at": "2026-10-07T00:00:00.000Z",
    "decision": "wave2b-20261017:gate",
    "reason": "3 of 3 judge runs approved with p_yes >= 0.9 (mean 0.98 >= 0.9; 2 needed) and Jev gave 0.75 (>= 0.6 needed)."
  }
}
