llama.cpp connection refused after update — the port moved
llama.cpp v0.7.0 (2026-10-15) moved llama-server's default port from 8080 to 9931. Connection refused in 1 ms? Add --port 8080 or repoint clients to 9931, and pin it: a default port is an API.
llama.cpp connection refused after update? The default port moved. llama-server v0.7.0 (released 2026-10-15) binds 9931, not 8080. Every tutorial, systemd unit, cron job and bookmark that says 8080 stopped working on upgrade day. The refusal is instant and silent: curl gives up in 1 ms and nothing logs a hint.
the new default in v0.7.0. Your client still knocks on 8080; nobody is home there.
The whole bug, on the wire:
$ curl -sv http://127.0.0.1:8080/health* connect to 127.0.0.1 port 8080 from 127.0.0.1 port 60306 failed: Connection refused* Failed to connect to 127.0.0.1:8080 after 1 ms: Could not connect to server$ ./llama-server --versionversion: 0.7.0-dev (build 11669, commit 620d2225c)$ ./llama-server -m /root/t.gguf0.00.041.442 I srv llama_server: listening on http://127.0.0.1:9931$ curl -s http://127.0.0.1:9931/health{"status":"ok"}
Why is llama.cpp connection refused after the update?
- The silent renumber. v0.7.0 binds 9931. A 1 ms refusal means nobody is home on that port, not a slow server.
- The server died before it was ready. Upgrades move flags; a bad
-mpath or renamed argument kills startup. The boot log prints the bind line and the fatal line. - Wrong interface. It binds
127.0.0.1by default. From another machine, refused even on the right port: needs--host 0.0.0.0and a thought about who can now reach your model. - A stale llama-server squatting the socket. The old binary holds 8080, or the new boot lost the race with "address already in use".
ss -tlnpsettles it.
| Symptom | Real cause | Fix |
|---|---|---|
| refused on 8080, instant (1 ms) | default moved to 9931 in v0.7.0 | --port 8080, or move clients to 9931 |
| server exits before becoming ready | flag or model path broke on upgrade | read the boot log; fix -m / renamed flags |
| refused from other machines only | bound to 127.0.0.1 | --host 0.0.0.0 + firewall check |
| refused on 9931 too | stale process holds the socket | ss -tlnp, kill the old binary, start again |
How do I get 8080 back?
./llama-server -m ./model.gguf --port 8080curl -s http://127.0.0.1:8080/health{"status":"ok"}
Under systemd, pin it in the unit: ExecStart=/opt/llama.cpp/llama-server -m /models/model.gguf --port 8080 --host 127.0.0.1. Audit today with grep -rn "8080" ~/.config/systemd ~/scripts 2>/dev/null — every hit is a future outage.
--port in every unit, script and compose file, read Highlights for the word "default" before an upgrade, and keep the boot log. The same release also refactored the chat session API.both sockets, as ss saw them
LISTEN 0 0 127.0.0.1:9931 0.0.0.0:* users:(("llama-server",pid=190,fd=3)) # default boot
LISTEN 0 0 127.0.0.1:8080 0.0.0.0:* users:(("llama-server",pid=105,fd=3)) # after --port 8080- last tested 2026-10-20, clean 1-vCPU / 1 GiB microVM
- binary: prebuilt b11669, the commit that bumped the version to 0.7.0 (banner reads 0.7.0-dev; the release tag ships no binaries)
- v0.7.0 released 2026-10-15; also shipped a faster MoE cache, speculative decoding and a models manager
- boot log: model loaded at 0.00.041.420, listening at 0.00.041.442 — about 41 ms from process start