From 22709d4aa59f6192359c1678d9a8f123ada99fbd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E0=A4=95=E0=A4=BE=E0=A4=B0=E0=A4=A4=E0=A5=8B=E0=A4=AB?= =?UTF-8?q?=E0=A5=8D=E0=A4=AB=E0=A5=87=E0=A4=B2=E0=A4=B8=E0=A5=8D=E0=A4=95?= =?UTF-8?q?=E0=A5=8D=E0=A4=B0=E0=A4=BF=E0=A4=AA=E0=A5=8D=E0=A4=9F=E2=84=A2?= Date: Thu, 6 Feb 2025 12:55:19 +0100 Subject: [PATCH] For Mac users running OLLAMA locally (#29) Co-authored-by: Mark Susol --- README.md | 20 ++++++++++++++++++-- docker-compose.yml | 3 ++- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 6823d09..9c2766d 100644 --- a/README.md +++ b/README.md @@ -78,8 +78,24 @@ cd self-hosted-ai-starter-kit docker compose up ``` -After you followed the quick start set-up below, change the Ollama credentials -by using `http://host.docker.internal:11434/` as the host. +##### For Mac users running OLLAMA locally + +If you're running OLLAMA locally on your Mac (not in Docker), you need to modify the OLLAMA_HOST environment variable +in the n8n service configuration. Update the x-n8n section in your Docker Compose file as follows: + +```yaml +x-n8n: &service-n8n + # ... other configurations ... + environment: + # ... other environment variables ... + - OLLAMA_HOST=host.docker.internal:11434 +``` + +Additionally, after you see "Editor is now accessible via: ": + +1. Head to +2. Click on "Local Ollama service" +3. Change the base URL to "http://host.docker.internal:11434/" #### For everyone else diff --git a/docker-compose.yml b/docker-compose.yml index 0bb3207..6aae070 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -19,6 +19,7 @@ x-n8n: &service-n8n - N8N_PERSONALIZATION_ENABLED=false - N8N_ENCRYPTION_KEY - N8N_USER_MANAGEMENT_JWT_SECRET + - OLLAMA_HOST=ollama:11434 links: - postgres @@ -41,7 +42,7 @@ x-init-ollama: &init-ollama entrypoint: /bin/sh command: - "-c" - - "sleep 3; OLLAMA_HOST=ollama:11434 ollama pull llama3.2" + - "sleep 3; ollama pull llama3.2" services: postgres: