[GH-ISSUE #4088] Colons in hostname cause an error on Windows #2539

Open
opened 2026-04-12 12:51:52 -05:00 by GiteaMirror · 2 comments
Owner

Originally created by @jmorganca on GitHub (May 1, 2024).
Original GitHub issue: https://github.com/ollama/ollama/issues/4088

What is the issue?

Including a colon in the hostname such as localhost:6000/my/model causes an error on windows:

$ ollama create -f ../models/Modelfile localhost:3000/library/tmp
transferring model data
reading model metadata
creating template layer
using already created layer sha256:4fed7364ee3e0c7cb4fe0880148bfdfcd1b630981efa0802a6b62ee52e7da97e
using already created layer sha256:fa8235e5b48faca34e3ca98cf4f694ef08bd216d28b58071a1f85b1d50cb814d
using already created layer sha256:d47ab88b61ba20ed39a1b205a7d5a8e201dcf09107e6b05f128778c32baa4a69
using already created layer sha256:e14c21df1d1c6baff291558d0da327e5aabe4d4e7dd97bc1bf173e535f2ab210
using already created layer sha256:cb4e88e025cabd86f873cd94972dc82cfd883336b2294882a5c28af996a4db92
writing manifest
Error: mkdir C:\Users\jmorg\.ollama\models\manifests\localhost:3000: The directory name is invalid.

OS

Windows

GPU

No response

CPU

No response

Ollama version

No response

Originally created by @jmorganca on GitHub (May 1, 2024). Original GitHub issue: https://github.com/ollama/ollama/issues/4088 ### What is the issue? Including a colon in the hostname such as `localhost:6000/my/model` causes an error on windows: ``` $ ollama create -f ../models/Modelfile localhost:3000/library/tmp transferring model data reading model metadata creating template layer using already created layer sha256:4fed7364ee3e0c7cb4fe0880148bfdfcd1b630981efa0802a6b62ee52e7da97e using already created layer sha256:fa8235e5b48faca34e3ca98cf4f694ef08bd216d28b58071a1f85b1d50cb814d using already created layer sha256:d47ab88b61ba20ed39a1b205a7d5a8e201dcf09107e6b05f128778c32baa4a69 using already created layer sha256:e14c21df1d1c6baff291558d0da327e5aabe4d4e7dd97bc1bf173e535f2ab210 using already created layer sha256:cb4e88e025cabd86f873cd94972dc82cfd883336b2294882a5c28af996a4db92 writing manifest Error: mkdir C:\Users\jmorg\.ollama\models\manifests\localhost:3000: The directory name is invalid. ``` ### OS Windows ### GPU _No response_ ### CPU _No response_ ### Ollama version _No response_
GiteaMirror added the bugwindows labels 2026-04-12 12:51:52 -05:00
Author
Owner

@bmizerany commented on GitHub (May 1, 2024):

What should this resolve to in a filepath? I propose host%port/..

<!-- gh-comment-id:2088992393 --> @bmizerany commented on GitHub (May 1, 2024): What should this resolve to in a filepath? I propose `host%port/..`
Author
Owner

@jmorganca commented on GitHub (May 1, 2024):

That seems like a great choice

<!-- gh-comment-id:2089025465 --> @jmorganca commented on GitHub (May 1, 2024): That seems like a great choice
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#2539