[GH-ISSUE #11482] how to configure remote host in javascript ollama.chat ? #7582

Closed
opened 2026-04-12 19:40:25 -05:00 by GiteaMirror · 1 comment
Owner

Originally created by @doyoungim999 on GitHub (Jul 21, 2025).
Original GitHub issue: https://github.com/ollama/ollama/issues/11482

What is the issue?

Hi,
I want to access remote OLLAMA_HOST from javascript client program.

  1. I set up OLLAMA_HOST in my linux and run my javascript. However it is not looking for the OLLAMA_HOST.
  2. I want to add baseUrl in my javascript program. However baseUrl does not working.
    What is the parameter in ollama.chat ?
    My source :
    import ollama from 'ollama'

const response = await ollama.chat({
model: 'gemma3n',
baseUrl: 'http://115.71.42.30:11434',
messages: [{ role: 'user', content: 'tell me about Han kang?' }],
})
console.log(response.message.content)

Relevant log output


OS

No response

GPU

No response

CPU

No response

Ollama version

ollama version is 0.9.6

Originally created by @doyoungim999 on GitHub (Jul 21, 2025). Original GitHub issue: https://github.com/ollama/ollama/issues/11482 ### What is the issue? Hi, I want to access remote OLLAMA_HOST from javascript client program. 1. I set up OLLAMA_HOST in my linux and run my javascript. However it is not looking for the OLLAMA_HOST. 2. I want to add baseUrl in my javascript program. However baseUrl does not working. What is the parameter in ollama.chat ? My source : import ollama from 'ollama' const response = await ollama.chat({ model: 'gemma3n', baseUrl: 'http://115.71.42.30:11434', messages: [{ role: 'user', content: 'tell me about Han kang?' }], }) console.log(response.message.content) ### Relevant log output ```shell ``` ### OS _No response_ ### GPU _No response_ ### CPU _No response_ ### Ollama version ollama version is 0.9.6
GiteaMirror added the bug label 2026-04-12 19:40:25 -05:00
Author
Owner

@rick-github commented on GitHub (Jul 21, 2025):

https://github.com/ollama/ollama-js/blob/main/README.md#custom-client

<!-- gh-comment-id:3095890532 --> @rick-github commented on GitHub (Jul 21, 2025): https://github.com/ollama/ollama-js/blob/main/README.md#custom-client
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#7582