[GH-ISSUE #11020] Listens only on ipv6 #33027

Closed
opened 2026-04-22 15:10:41 -05:00 by GiteaMirror · 7 comments
Owner

Originally created by @alexeyvolkoff on GitHub (Jun 8, 2025).
Original GitHub issue: https://github.com/ollama/ollama/issues/11020

What is the issue?

Can not make it listen on 0.0.0.0.
Anything I pass to OLLAMA_HOST results to listening on [::]:11434*

Relevant log output

 sudo systemctl stop ollama
 OLLAMA_DEBUG=1 OLLAMA_HOST=0.0.0.0:11434 /usr/local/bin/ollama serve
time=2025-06-08T18:05:23.898+02:00 level=INFO source=routes.go:1234 msg="server config" env="map[CUDA_VISIBLE_DEVICES: GPU_DEVICE_ORDINAL: HIP_VISIBLE_DEVICES: HSA_OVERRIDE_GFX_VERSION: HTTPS_PROXY: HTTP_PROXY: NO_PROXY: OLLAMA_CONTEXT_LENGTH:4096 OLLAMA_DEBUG:DEBUG OLLAMA_FLASH_ATTENTION:false OLLAMA_GPU_OVERHEAD:0 OLLAMA_HOST:http://0.0.0.0:11434 OLLAMA_INTEL_GPU:false OLLAMA_KEEP_ALIVE:5m0s OLLAMA_KV_CACHE_TYPE: OLLAMA_LLM_LIBRARY: OLLAMA_LOAD_TIMEOUT:5m0s OLLAMA_MAX_LOADED_MODELS:0 OLLAMA_MAX_QUEUE:512 OLLAMA_MODELS:/home/alexey/.ollama/models OLLAMA_MULTIUSER_CACHE:false OLLAMA_NEW_ENGINE:false OLLAMA_NOHISTORY:false OLLAMA_NOPRUNE:false OLLAMA_NUM_PARALLEL:0 OLLAMA_ORIGINS:[http://localhost https://localhost http://localhost:* https://localhost:* http://127.0.0.1 https://127.0.0.1 http://127.0.0.1:* https://127.0.0.1:* http://0.0.0.0 https://0.0.0.0 http://0.0.0.0:* https://0.0.0.0:* app://* file://* tauri://* vscode-webview://* vscode-file://*] OLLAMA_SCHED_SPREAD:false ROCR_VISIBLE_DEVICES: http_proxy: https_proxy: no_proxy:]"
time=2025-06-08T18:05:23.901+02:00 level=INFO source=images.go:479 msg="total blobs: 0"
time=2025-06-08T18:05:23.901+02:00 level=INFO source=images.go:486 msg="total unused blobs removed: 0"
time=2025-06-08T18:05:23.902+02:00 level=INFO source=routes.go:1287 msg="Listening on **[::]:11434** (version 0.9.0)"

OS

No response

GPU

No response

CPU

No response

Ollama version

No response

Originally created by @alexeyvolkoff on GitHub (Jun 8, 2025). Original GitHub issue: https://github.com/ollama/ollama/issues/11020 ### What is the issue? Can not make it listen on 0.0.0.0. Anything I pass to OLLAMA_HOST results to listening on [::]:11434* ### Relevant log output ```shell sudo systemctl stop ollama OLLAMA_DEBUG=1 OLLAMA_HOST=0.0.0.0:11434 /usr/local/bin/ollama serve time=2025-06-08T18:05:23.898+02:00 level=INFO source=routes.go:1234 msg="server config" env="map[CUDA_VISIBLE_DEVICES: GPU_DEVICE_ORDINAL: HIP_VISIBLE_DEVICES: HSA_OVERRIDE_GFX_VERSION: HTTPS_PROXY: HTTP_PROXY: NO_PROXY: OLLAMA_CONTEXT_LENGTH:4096 OLLAMA_DEBUG:DEBUG OLLAMA_FLASH_ATTENTION:false OLLAMA_GPU_OVERHEAD:0 OLLAMA_HOST:http://0.0.0.0:11434 OLLAMA_INTEL_GPU:false OLLAMA_KEEP_ALIVE:5m0s OLLAMA_KV_CACHE_TYPE: OLLAMA_LLM_LIBRARY: OLLAMA_LOAD_TIMEOUT:5m0s OLLAMA_MAX_LOADED_MODELS:0 OLLAMA_MAX_QUEUE:512 OLLAMA_MODELS:/home/alexey/.ollama/models OLLAMA_MULTIUSER_CACHE:false OLLAMA_NEW_ENGINE:false OLLAMA_NOHISTORY:false OLLAMA_NOPRUNE:false OLLAMA_NUM_PARALLEL:0 OLLAMA_ORIGINS:[http://localhost https://localhost http://localhost:* https://localhost:* http://127.0.0.1 https://127.0.0.1 http://127.0.0.1:* https://127.0.0.1:* http://0.0.0.0 https://0.0.0.0 http://0.0.0.0:* https://0.0.0.0:* app://* file://* tauri://* vscode-webview://* vscode-file://*] OLLAMA_SCHED_SPREAD:false ROCR_VISIBLE_DEVICES: http_proxy: https_proxy: no_proxy:]" time=2025-06-08T18:05:23.901+02:00 level=INFO source=images.go:479 msg="total blobs: 0" time=2025-06-08T18:05:23.901+02:00 level=INFO source=images.go:486 msg="total unused blobs removed: 0" time=2025-06-08T18:05:23.902+02:00 level=INFO source=routes.go:1287 msg="Listening on **[::]:11434** (version 0.9.0)" ``` ### OS _No response_ ### GPU _No response_ ### CPU _No response_ ### Ollama version _No response_
GiteaMirror added the bug label 2026-04-22 15:10:41 -05:00
Author
Owner

@rick-github commented on GitHub (Jun 8, 2025):

[::] usually also means 0.0.0.0 - it's shorthand for "all interfaces". What does the following show:

sudo lsof -i :11434
<!-- gh-comment-id:2954161714 --> @rick-github commented on GitHub (Jun 8, 2025): `[::]` usually also means `0.0.0.0` - it's shorthand for "all interfaces". What does the following show: ``` sudo lsof -i :11434 ```
Author
Owner

@alexeyvolkoff commented on GitHub (Jun 8, 2025):

sudo lsof -i :11434
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
ollama 109179 ollama 3u IPv6 1877516 0t0 TCP *:11434 (LISTEN)

<!-- gh-comment-id:2954163265 --> @alexeyvolkoff commented on GitHub (Jun 8, 2025): sudo lsof -i :11434 COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME ollama 109179 ollama 3u IPv6 1877516 0t0 TCP *:11434 (LISTEN)
Author
Owner

@alexeyvolkoff commented on GitHub (Jun 8, 2025):

netstat -tpln
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN -
tcp 0 0 127.0.0.53:53 0.0.0.0:* LISTEN -
tcp 0 0 0.0.0.0:3001 0.0.0.0:* LISTEN -
tcp 0 0 172.17.0.1:5357 0.0.0.0:* LISTEN -
tcp 0 0 10.255.255.254:53 0.0.0.0:* LISTEN -
tcp 0 0 172.20.64.111:5357 0.0.0.0:* LISTEN -
tcp 0 0 172.18.0.1:5357 0.0.0.0:* LISTEN -
tcp 0 0 127.0.0.1:45841 0.0.0.0:* LISTEN -
tcp 0 0 10.255.255.254:5357 0.0.0.0:* LISTEN -
tcp6 0 0 fe80::215:5dff:fe5:5357 :::* LISTEN -
tcp6 0 0 :::80 :::* LISTEN -
tcp6 0 0 :::3001 :::* LISTEN -
tcp6 0 0 fe80::42:cdff:fe4e:5357 :::* LISTEN -
tcp6 0 0 :::11434 :::* LISTEN -
tcp6 0 0 fe80::6c2a:5aff:fe:5357 :::* LISTEN -

<!-- gh-comment-id:2954163602 --> @alexeyvolkoff commented on GitHub (Jun 8, 2025): netstat -tpln (Not all processes could be identified, non-owned process info will not be shown, you would have to be root to see it all.) Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN - tcp 0 0 127.0.0.53:53 0.0.0.0:* LISTEN - tcp 0 0 0.0.0.0:3001 0.0.0.0:* LISTEN - tcp 0 0 172.17.0.1:5357 0.0.0.0:* LISTEN - tcp 0 0 10.255.255.254:53 0.0.0.0:* LISTEN - tcp 0 0 172.20.64.111:5357 0.0.0.0:* LISTEN - tcp 0 0 172.18.0.1:5357 0.0.0.0:* LISTEN - tcp 0 0 127.0.0.1:45841 0.0.0.0:* LISTEN - tcp 0 0 10.255.255.254:5357 0.0.0.0:* LISTEN - tcp6 0 0 fe80::215:5dff:fe5:5357 :::* LISTEN - tcp6 0 0 :::80 :::* LISTEN - tcp6 0 0 :::3001 :::* LISTEN - tcp6 0 0 fe80::42:cdff:fe4e:5357 :::* LISTEN - tcp6 0 0 :::11434 :::* LISTEN - tcp6 0 0 fe80::6c2a:5aff:fe:5357 :::* LISTEN -
Author
Owner

@rick-github commented on GitHub (Jun 8, 2025):

What does the following return:

curl 127.0.0.1:11434/api/version
<!-- gh-comment-id:2954165449 --> @rick-github commented on GitHub (Jun 8, 2025): What does the following return: ``` curl 127.0.0.1:11434/api/version ```
Author
Owner

@alexeyvolkoff commented on GitHub (Jun 8, 2025):

curl 127.0.0.1:11434/api/version
{"version":"0.9.0"}
and even
curl 172.17.0.1:11434/api/version
{"version":"0.9.0"}
hm.. so it should work for stuff running in Docker?

<!-- gh-comment-id:2954167431 --> @alexeyvolkoff commented on GitHub (Jun 8, 2025): curl 127.0.0.1:11434/api/version {"version":"0.9.0"} and even curl 172.17.0.1:11434/api/version {"version":"0.9.0"} hm.. so it should work for stuff running in Docker?
Author
Owner

@rick-github commented on GitHub (Jun 8, 2025):

Yep.

<!-- gh-comment-id:2954173254 --> @rick-github commented on GitHub (Jun 8, 2025): Yep.
Author
Owner

@alexeyvolkoff commented on GitHub (Jun 8, 2025):

And it works. Though it's a little confusing :)

<!-- gh-comment-id:2954178429 --> @alexeyvolkoff commented on GitHub (Jun 8, 2025): And it works. Though it's a little confusing :)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#33027