# \[Question\] Getting Weaviate and Ollama working together running locally

**URL:** <https://forum.weaviate.io/t/question-getting-weaviate-and-ollama-working-together-running-locally/9818>\
**Category:** Support\
**Tags:** technical\
**Created:** [January 19, 2025, 8:51pm UTC](https://forum.weaviate.io/t/question-getting-weaviate-and-ollama-working-together-running-locally/9818 "2025-01-19T20:51:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![PaulJPhilp](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/pauljphilp/32/3397_2.png) [@PaulJPhilp](https://forum.weaviate.io/u/PaulJPhilp)\
**Post date:** [January 19, 2025, 8:51pm UTC](https://forum.weaviate.io/t/question-getting-weaviate-and-ollama-working-together-running-locally/9818/1 "2025-01-19T20:51:34Z")

</div>

I have been trying to get weaviate and ollama working together on my local machine. I have yet to get weaviate to successfully connect to ollama at all. Does anyone any tips?

Here is my docker-compose.yml file:

```auto
version: "3.7"
services:
  weaviate:
    image: cr.weaviate.io/semitechnologies/weaviate:1.28.2
    ports:
      - 8080:8080
      - 50051:50051
    environment:
      ENABLE_MODULES: text2vec-ollama
      OLLAMA_URL: http://ollama:11434
      TEXT2VEC_OLLAMA_BASE_URL: http://ollama:11434
      TEXT2VEC_OLLAMA_MODEL: nomic-embed-text
      WEAVIATE_HOST: 0.0.0.0
      QUERY_DEFAULTS_LIMIT: 25
      AUTHENTICATION_ANONYMOUS_ACCESS_ENABLED: true
      PERSISTENCE_DATA_PATH: /var/lib/weaviate
      DEFAULT_VECTORIZER_MODULE: text2vec-ollama
      CLUSTER_HOSTNAME: node1
    volumes:
      - weaviate_data:/var/lib/weaviate
    depends_on:
      - ollama

  ollama:
    image: ollama/ollama:latest
    ports:
      - 11434:11434
    volumes:
      - ollama_data:/root/.ollama

volumes:
  weaviate_data:
  ollama_data:

```

And the error I get when doing an insert:  
} else {  
318 | return Promise.reject(new WeaviateUnexpectedStatusCodeError(res.status, err));  
^  
WeaviateUnexpectedStatusCodeError: The request to Weaviate failed with status code: 500 and message: {“error”:[{“message”:“vectorize target vector default: update vector: send POST request: Post "[http://localhost:11434/api/embed\](http://localhost:11434/api/embed%5C)”: dial tcp [::1]:11434: connect: connection refused"}]}  
code: 500,

---

<div class="post-metadata">

**Author:** ![DudaNogueira](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/dudanogueira/32/7846_2.png) [@DudaNogueira](https://forum.weaviate.io/u/DudaNogueira)\
**Post date:** [January 24, 2025, 7:50pm UTC](https://forum.weaviate.io/t/question-getting-weaviate-and-ollama-working-together-running-locally/9818/2 "2025-01-24T19:50:59Z")

</div>

hi @PaulJPhilp !!

Welcome to our community 🤗

There isn’t a variables such as `TEXT2VEC_OLLAMA_BASE_URL` or `TEXT2VEC_OLLAMA_MODEL`

Do you remember where you saw those?

That configuration is defined per collection, as documented here:

> **[Text Embeddings | Weaviate](https://weaviate.io/developers/weaviate/model-providers/ollama/embeddings)**
>
> Ollama Embedding Provider

In your case, you will need to use:

```python
api_endpoint="http://ollama:11434",

```

Let me know if that helps!

---

<div class="post-metadata">

**Author:** ![CalebMontgomery](https://avatars.discourse-cdn.com/v4/letter/c/73ab20/32.png) [@CalebMontgomery](https://forum.weaviate.io/u/CalebMontgomery)\
**Post date:** [February 4, 2025, 6:01am UTC](https://forum.weaviate.io/t/question-getting-weaviate-and-ollama-working-together-running-locally/9818/3 "2025-02-04T06:01:45Z")

</div>

Thank you so much for sharing it helped me.
