Hello I’m new to N8n and was trying to locally run both N8n and Ollama from my Raspberry Pi 5. I was able to install ollama manually but needed to install docker for N8n to run. From there i was able to get the credentials to load using port 5678 (port 11434 wasn’t working) but now it wont load any of my models and
It’s most likely the endpoint you set in the ollama credential is wrong.
Since they are all in the Raspberry pi. They might be able to connect with each through internal internet. But you still need to check where they are open to each other.
Ask the AI to give you some CLI command to test in the Raspberry pi might solve this issue.
The video is great but unfortunately i don’t know how to view or set Environment variables on a raspberry pi 5. Do you happen to know how i could do that? Also sorry for the late reply got stuck in a blizzard and had to handle some stuff after.
@bwest14 For quick testing you can just hop into shell and execute something like export OLLAMA_HOST=http://localhost:11434 , and for more permanent write up when test gets successful just edit the .env file and restart your n8n container.
@markup I tried that and it wouldn’t connect i tried to map it to 11434 but received this error:
docker: Error response from daemon: failed to set up container networking: driver failed programming external connectivity on endpoint n8n (0caa9602f3d707a07fa02bc23aae2e2bc456009aaf02531f16a660c02a84b6c4): failed to bind host port 0.0.0.0:11434/tcp: address already in use
You are trying to assign port 11434 to n8n, which is already in use (for ollama). The default port for n8n is 5678. Change “-p 11434:11434” to “-p 5678:5678” in your “docker run” statement and access n8n with http://localhost:5678.
5678:5678 is what i used at the beginning but it still doesn’t allow me to see my models in n8n. I think i may be misunderstanding your last comment how would i change ollama’s base URL to http://host.docker.internal:11434 ?
H, then I’m running out of ideas. It seems ollama isn’t running.
First, check the status on your raspberry pi with: sudo systemctl status ollama
If it is not active, start ollama with: sudo systemctl start ollama
If it still doesn’t solve your problem, you probably need to provide your pi’s IP address in the ollama base URL.
Follow these steps:
Type hostname -I in your pi’s terminal. You should see a list of IP addresses. Note the one beginning with 192.168. (probably the first one).
In n8n, use this IP in your ollama credentials, for example:
FYI: I have n8n running on my raspberry pi 5, now installed ollama and successfully connected it to n8n with the base URL “http://host.docker.internal:11434“:
Ahhhh Maybe i messed up somewhere in initial set up. I used a curl command to install ollama and docker to install n8n how did you do your original setup?
Almost same here. I have n8n in a DDEV environment (which is docker bsed) and installed ollama as documented: curl -fsSL https://ollama.com/install.sh | sh
Then checked the version: ollama --version
And downloaded and ran llama3.2:1b for testing purposes: ollama run llama3.2:1b
Then quit the chat with /bye , switched to n8n and tested connection to ollama.