your-papa/obsidian-Smart2Brain

add external Ollama IP connection

Closed this issue · 5 comments

Feature Area

Settings

Painpoint

I was able to setup Ollama on my local server (separate from my laptop) and even added it in settings successfully. However, I can't setup the "setup" spot to point the "Run on your machine" to my server's IP. Can we add a feature to allow the IP that was successfully added earlier?

smart_to_brain_settings
smart_to_brain_setup

Describe your idea

I want to use Ollama on my network

Alternatives

No response

Additional Context

No response

This should work it more seems like to me that the origins are not set on the ollama instance on your server. Are you running the ollama docker image?

This should work it more seems like to me that the origins are not set on the ollama instance on your server. Are you running the ollama docker image?

I am running Ollama in a docker image and can hit it from my laptop on the same IP and PORT using other tools.

Do I need to do something regarding "origins" or CORS on the Ollama side?

Yes, take a look at #71. You need to set the OLLAMA_ORIGINS environment variable on your remote server before running Ollama.

To add the origins env var add this to your docker run command: -e OLLAMA_ORIGINS='app://obsidian.md*'

You guys were right! I was setting the env var in .bashrc and /etc/environment to no avail. But this worked:
docker run -d -v /local/models/textgen:/root/.ollama -e OLLAMA_ORIGINS='app://obsidian.md*' -p 11434:11434 --name ollama-4-obsidian ollama/ollama

Obviously that is a little specific to my setup but there you go for the next person!