Meaning of hostname returned by V4 client.get_meta()

client = weaviate.connect_to_local(
    host = "localhost",
    port = 8077,
    headers = {
        "X-OpenAI-Api-Key": openai_key,  #  for generative queries

will yield the following info for my case:

  "hostname": "http://[::]:8080",
  "modules": {
    "generative-openai": {
      "documentationHref": "",
      "name": "Generative Search - OpenAI"
    "qna-openai": {
      "documentationHref": "",
      "name": "OpenAI Question & Answering Module"
    "text2vec-openai": {
      "documentationHref": "",
      "name": "OpenAI Module"
  "version": "1.23.7"

Why is the hostname referred as being on port 8080 while in my case I am connecting to a server on port 8077 ?


This is the IP and port specs where the Weaviate is bind to.

The default configuration is (you can see that in the docker compose command section), which means it will receive connection from all origins.

If you are running docker, on that very same commandparametr you also specify at which ports Weaviate will be listening too:

    - --host
    - --port
    - '8080'
    - --scheme
    - http

In the other parameter, ports you are probably mapping the host port 8077 to the container port 8080:

    - 8080:8080
    - 50051:50051

Let me know if that helps :slight_smile:

1 Like

Well that would actually be:

    - 8077:8080
    - 50051:50051

but yes you are correct. This is indeed the explanation.

Still I am not sure I quite understand the reason to return the internal container port and not the actual host port. Not a big problem though.


1 Like

This is because Weaviate is indeed running in port 8080.

Docker can map other ports, that Weavaviate is unaware of.

So if you have your application running also in docker, it will use port 8080 to communicate with Weaviate on an internal network, not the mapped port.

1 Like

In this context this makes a lot of sense. Thank you