[GH-ISSUE #2616] Change Bind IP address #63582

Closed
opened 2026-05-03 14:16:19 -05:00 by GiteaMirror · 5 comments
Owner

Originally created by @Jacoub on GitHub (Feb 20, 2024).
Original GitHub issue: https://github.com/ollama/ollama/issues/2616

Tried changing bind localhost:11434 to IP:11434 to server requests from Ollama WEBUI running on a separate docker host

Originally created by @Jacoub on GitHub (Feb 20, 2024). Original GitHub issue: https://github.com/ollama/ollama/issues/2616 Tried changing bind localhost:11434 to IP:11434 to server requests from Ollama WEBUI running on a separate docker host
Author
Owner

@Jacoub commented on GitHub (Feb 20, 2024):

unable to change bind localhost:11434 to IP:11434 to server requests from Ollama WEBUI running on a separate docker host

<!-- gh-comment-id:1954448926 --> @Jacoub commented on GitHub (Feb 20, 2024): unable to change bind localhost:11434 to IP:11434 to server requests from Ollama WEBUI running on a separate docker host
Author
Owner

@jmorganca commented on GitHub (Feb 20, 2024):

Hi there, if you're looking to expose Ollama on the network, make sure to use OLLAMA_HOST=0.0.0.0:11434 or similar. Let me know if this doesn't help!

<!-- gh-comment-id:1954858107 --> @jmorganca commented on GitHub (Feb 20, 2024): Hi there, if you're looking to expose Ollama on the network, make sure to use `OLLAMA_HOST=0.0.0.0:11434` or similar. Let me know if this doesn't help!
Author
Owner

@cemox commented on GitHub (May 29, 2024):

I did this, but it did not work for me. I added OLLAMA_HOST=0.0.0.0:11434 to config file by using systemctl edit ollama.service. I still cannot access to it with the private ip (i.e. 192.168.1.111).

Both 127.0.0.1 and 0.0.0.0 return "ollama is running". What am I doing wrong?

<!-- gh-comment-id:2136995817 --> @cemox commented on GitHub (May 29, 2024): I did this, but it did not work for me. I added `OLLAMA_HOST=0.0.0.0:11434` to config file by using `systemctl edit ollama.service`. I still cannot access to it with the private ip (i.e. 192.168.1.111). Both 127.0.0.1 and 0.0.0.0 return "ollama is running". What am I doing wrong?
Author
Owner

@Huetarded commented on GitHub (May 31, 2024):

I'm having the same issue here - It's working fine locally (localhost/127.0.0.1), but I cannot figure out how to bind it to 192.168.x.x IP address for accessing it within the local network.

<!-- gh-comment-id:2143045438 --> @Huetarded commented on GitHub (May 31, 2024): I'm having the same issue here - It's working fine locally (localhost/127.0.0.1), but I cannot figure out how to bind it to 192.168.x.x IP address for accessing it within the local network.
Author
Owner

@beegweeg commented on GitHub (Feb 28, 2025):

I got access to the local network using
sudo nano /etc/systemd/system/ollama.service
add another environment line:
Environment="OLLAMA_HOST=0.0.0.0:11434"

sudo systemctl daemon-reload
sudo systemctl restart ollama.service

My ollama.service file

[Unit]
Description=Ollama Service
After=network-online.target

[Service]
ExecStart=/usr/local/bin/ollama serve
User=ollama
Group=ollama
Restart=always
RestartSec=3
Environment="OLLAMA_HOST=0.0.0.0:11434"
Environment="PATH=/usr/local/cuda-12.2/bin:......>

[Install]
WantedBy=default.target
<!-- gh-comment-id:2689929550 --> @beegweeg commented on GitHub (Feb 28, 2025): I got access to the local network using `sudo nano /etc/systemd/system/ollama.service` add another environment line: `Environment="OLLAMA_HOST=0.0.0.0:11434"` ``` sudo systemctl daemon-reload sudo systemctl restart ollama.service ``` My ollama.service file ``` [Unit] Description=Ollama Service After=network-online.target [Service] ExecStart=/usr/local/bin/ollama serve User=ollama Group=ollama Restart=always RestartSec=3 Environment="OLLAMA_HOST=0.0.0.0:11434" Environment="PATH=/usr/local/cuda-12.2/bin:......> [Install] WantedBy=default.target ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#63582