<!-- llms-explorer concept facts · https://llms-explorer.com/tree/llama-cpp-default-port-change-to-9931/ · pack 2026-10-05 · ~1604 tokens -->

# llama.cpp default port change to 9931

> PR 26508 "server: add notice for upcoming default port change 8080 --> 9931" was opened by a collaborator (ngxson) on 3 Aug 2026, approved by ggerganov the same day and merged as commit 0b14b87. It adds a notice only. The first title said 6631 and was corrected to 9931 in the same session.

Parent: [Mac local LLMs: Runtime selection and frontends](https://llms-explorer.com/tree/mac-local-llms-runtime-selection-and-frontends/) · 2 facets · 26 facts · page: https://llms-explorer.com/tree/llama-cpp-default-port-change-to-9931/

## Facts

- PR 26508 "server: add notice for upcoming default port change 8080 --> 9931" was opened by a collaborator (ngxson) on 3 Aug 2026, approved by ggerganov the same day and merged as commit 0b14b87. It adds a notice only. The first title said 6631 and was corrected to 9931 in the same session. — [source](https://github.com/ggml-org/llama.cpp/pull/26508)
- The PR text says "Part of #26116" (transitioning llama-server from an on-demand command to a daemon process) and "Port gonna change from 8080 to 9931 (leetspeak of GGML)". — [source](https://github.com/ggml-org/llama.cpp/pull/26508)
- Issue 26116 (opened 25 Jul 2026, ngxson) specifies: `llama serve -hf` starts a llama-server in router mode if none exists, reuses an existing one, and downloads missing models; its open question was "which port? port 9931 == ggml". — [source](https://github.com/ggml-org/llama.cpp/issues/26116)
- The maintainer's clarification on 23 Aug 2026: `llama-server` will work as-is; the change is to the `llama serve` command; the only change to llama-server will be that `--port` defaults to 9931; setting `LLAMA_ARG_PORT=8080` in the shell profile restores 8080 without an explicit `--port`. — [source](https://github.com/ggml-org/llama.cpp/issues/26116)
- Stated reason: 8080 is a generic port other apps may use; the change is for UX, not technical. — [source](https://github.com/ggml-org/llama.cpp/issues/26116)
- The server README on master (fetched 2026-10-04) still documents `--port PORT` as "default: 8080" (env LLAMA_ARG_PORT) and says the server listens on 127.0.0.1:8080 by default; all its curl examples use 8080. — [source](https://github.com/ggml-org/llama.cpp/blob/master/tools/server/README.md)
- 25 Jul 2026 issue 26116; 3 Aug 2026 notice PR 26508 merged; 11 Aug 2026 LlamaBarn 0.40.0 moved its own default to 9931 "following llama.cpp, which is preparing to switch its own default too". — [source](https://github.com/ggml-org/Llama-macOS/releases)
- By 22 Sep 2026 issue 26116 was labelled stale and unresolved. — [source](https://github.com/ggml-org/llama.cpp/issues/26116)
- Anyone reading the 0.40.0 LlamaBarn note or the server startup notice can wrongly assume llama-server already listens on 9931. The default in the fetched README is still 8080; probes, plists and health checks must pin `--port` explicitly. — [source](https://github.com/ggml-org/llama.cpp/blob/master/tools/server/README.md)
- Users who reached issue 26116 from the PR read "transitioning llama-server ... to a daemon process" as llama-server being replaced; the maintainer said that is not the case. — [source](https://github.com/ggml-org/llama.cpp/issues/26116)
- A commenter objected that 9931 is not IANA-registered (ports below 49152 should be registered for application-aware firewalls). The maintainer replied that many apps use unregistered ports and users can set `--port`. — [source](https://github.com/ggml-org/llama.cpp/issues/26116)
- Two ports now coexist on a Mac running both llama.app (9931) and a hand-started llama-server (8080); clients with a hardcoded base URL hit the wrong one (inferred). — source: `asserted`
- The LlamaBarn release note says llama.cpp is "preparing to switch its own default". The maintainer's comment says the change applies to the `llama serve` command and to llama-server's `--port` default. The README, as of the fetch, shows neither switched. Treat the plan as announced, not shipped. — [source](https://github.com/ggml-org/Llama-macOS/releases)
- Commenters (woof-dog, mcneiljt) pushed back on any move toward a daemon-only llama-server; the maintainer's answer limits scope to `llama serve`. — [source](https://github.com/ggml-org/llama.cpp/issues/26116)
- Which release will flip llama-server's default; no PR changing the default value itself was found in the issue search (search for "default port 8080" in titles returned only PR 26508). — source: `asserted`
- Whether `llama serve` shipped in a release with port 9931 was not checked against release notes. — source: `asserted`
- Merged PR 26508 (3 Aug 2026, commit 0b14b87) added a notice about the 8080 to 9931 default-port change; it did not change the default itself. — [source](https://github.com/ggml-org/llama.cpp/pull/26508)
- 9931 is described by the author as the leetspeak of GGML. — [source](https://github.com/ggml-org/llama.cpp/pull/26508)
- PR 26508 was approved by ggerganov and had 13 thumbs-up reactions. — [source](https://github.com/ggml-org/llama.cpp/pull/26508)
- Issue 26116 proposes `llama serve -hf` start or reuse a router-mode llama-server and auto-download uncached models. — [source](https://github.com/ggml-org/llama.cpp/issues/26116)
- Maintainer ngxson stated on 23 Aug 2026 that the only llama-server change is the `--port` default becoming 9931, and that LLAMA_ARG_PORT=8080 overrides it. — [source](https://github.com/ggml-org/llama.cpp/issues/26116)
- The stated rationale is that 8080 is generic and collides with other apps. — [source](https://github.com/ggml-org/llama.cpp/issues/26116)
- Issue 26116 carried the stale label from 22 Sep 2026. — [source](https://github.com/ggml-org/llama.cpp/issues/26116)
- The master server README fetched on 2026-10-04 still lists the default port as 8080. — [source](https://github.com/ggml-org/llama.cpp/blob/master/tools/server/README.md)
- Any service plist, health probe or client config for llama-server should pin `--port` or LLAMA_ARG_PORT so a later default flip does not break it (inferred). — source: `asserted`

## Corrections and disagreements

- CONTRADICTS: llama-macos-menu-bar-app.md line 53 ("Whether llama.cpp's own default port actually switched to 9931 was not confirmed"): it is now confirmed that a switch is announced via merged PR 26508 but not yet applied to llama-server in the README. — [source](https://github.com/ggml-org/llama.cpp/pull/26508)
