# Cannot Add Tenancy to Weaviate Class

**URL:** <https://forum.weaviate.io/t/cannot-add-tenancy-to-weaviate-class/496>\
**Category:** Support\
**Created:** [August 8, 2023, 4:49pm UTC](https://forum.weaviate.io/t/cannot-add-tenancy-to-weaviate-class/496 "2023-08-08T16:49:30Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![JLiz2803](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/jliz2803/32/342_2.png) [@JLiz2803](https://forum.weaviate.io/u/JLiz2803)\
**Post date:** [August 8, 2023, 4:49pm UTC](https://forum.weaviate.io/t/cannot-add-tenancy-to-weaviate-class/496/1 "2023-08-08T16:49:30Z")

</div>

I have a local instance of weaviate running on my machine. I am trying to enable multi-tenancy [by following this guidance](https://weaviate.io/developers/weaviate/manage-data/multi-tenancy) and by utilizing this code:

```auto
client.schema.create_class({
    'class': 'MultiTenancyClass',
    'multiTenancyConfig': {'enabled': True}
})

client.schema.add_class_tenants(
  class_name='MultiTenancyClass', # The class to which the tenants will be added
  tenants=[Tenant(name='tenantA'), Tenant(name='tenantB')]
)

```

However, I keep getting this error:

> weaviate.exceptions.UnexpectedStatusCodeException: Add classes tenants! Unexpected status code: 404, with response body: {‘code’: 404, ‘message’: ‘path /v1/schema/MultiTenancyClass/tenants was not found’}.

Is it not possible to add multi-tenancy to a local instance of weaviate?

---

<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:** [August 8, 2023, 6:26pm UTC](https://forum.weaviate.io/t/cannot-add-tenancy-to-weaviate-class/496/2 "2023-08-08T18:26:05Z")

</div>

Hi @JLiz2803 ! Welcome to our Community! 🤗

Yes, you can use the multitenancy feature locally!

Please, notice that this feature will only work for **Weaviate 1.20 onwards**.

What version are you running?

if case you don’t know, you can get that information from:

[http://localhost:8080/v1/meta](http://localhost:8080/v1/meta)

**Ps:** I have [added a tooltip to the doc](https://github.com/weaviate/weaviate-io/pull/1037) in order to make it clear 😉

---

<div class="post-metadata">

**Author:** ![JLiz2803](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/jliz2803/32/342_2.png) [@JLiz2803](https://forum.weaviate.io/u/JLiz2803)\
**Post date:** [August 10, 2023, 5:31am UTC](https://forum.weaviate.io/t/cannot-add-tenancy-to-weaviate-class/496/3 "2023-08-10T05:31:56Z")

</div>

HI @DudaNogueira thank you for responding. It looks like for me Weviate is running at the following ports  
Python 43618 username 6u IPv4 0x101755eca5beaecf 0t0 TCP localhost:63995-\>localhost:6666 (CLOSED)  
weaviate- 43622 username 6u IPv6 0x101755eca60a05e7 0t0 TCP \*:63980 (LISTEN)  
weaviate- 43622 username 8u IPv6 0x101755eca609dde7 0t0 TCP \*:6060 (LISTEN)  
weaviate- 43622 username 13u IPv6 0x101755eca418e5e7 0t0 TCP \*:63981 (LISTEN)  
weaviate- 43622 username 15u IPv4 0x101755eca65b69ef 0t0 TCP localhost:6666 (LISTEN)  
weaviate- 43622 username 54u IPv6 0x101755eca675bde7 0t0 TCP \*:50051 (LISTEN)

so I tried going to [http://localhost:6060/v1/meta](http://localhost:6060/v1/meta), however it gave me a 404, and my logs show this message “Serving weaviate at [http://127.0.0.1:6666](http://127.0.0.1:6666)” but port 6666 returns a page not found

---

<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:** [August 11, 2023, 1:14am UTC](https://forum.weaviate.io/t/cannot-add-tenancy-to-weaviate-class/496/4 "2023-08-11T01:14:12Z")

</div>

How are you running Weaviate?

Here we have a great tool to help you create a docker-compose:

> **[Docker Compose | Weaviate - vector database](https://weaviate.io/developers/weaviate/installation/docker-compose)**
>
> Configurator

---

<div class="post-metadata">

**Author:** ![JLiz2803](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/jliz2803/32/342_2.png) [@JLiz2803](https://forum.weaviate.io/u/JLiz2803)\
**Post date:** [August 11, 2023, 6:00am UTC](https://forum.weaviate.io/t/cannot-add-tenancy-to-weaviate-class/496/5 "2023-08-11T06:00:33Z")

</div>

I am executing this line of code

```auto
    client = weaviate.Client(
        embedded_options=weaviate.embedded.EmbeddedOptions(),
    )

```

Which spawns this message in my logs

> Started /Users/jimlizzi/.cache/weaviate-embedded: process ID 45591
> 
> {“action”:“startup”,“default\_vectorizer\_module”:“none”,“level”:“info”,“msg”:“the default vectorizer modules is set to "none", as a result all new schema classes without an explicit vectorizer setting, will use this vectorizer”,“time”:“2023-08-09T22:31:24-07:00”}
> 
> {“action”:“startup”,“auto\_schema\_enabled”:true,“level”:“info”,“msg”:“auto schema enabled setting is set to "true"”,“time”:“2023-08-09T22:31:24-07:00”}
> 
> {“action”:“hnsw\_vector\_cache\_prefill”,“count”:3000,“index\_id”:“myclass\_wb5Qt3iG5fl4”,“level”:“info”,“limit”:1000000000000,“msg”:“prefilled vector cache”,“time”:“2023-08-09T22:31:25-07:00”,“took”:93142}
> 
> {“action”:“grpc\_startup”,“level”:“info”,“msg”:“grpc server listening at [::]:50051”,“time”:“2023-08-09T22:31:25-07:00”}  
> {“action”:“restapi\_management”,“level”:“info”,“msg”:“Serving weaviate at [http://127.0.0.1:6666](http://127.0.0.1:6666)”,“time”:“2023-08-09T22:31:25-07:00”}

---

<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:** [August 11, 2023, 10:32pm UTC](https://forum.weaviate.io/t/cannot-add-tenancy-to-weaviate-class/496/6 "2023-08-11T22:32:50Z")

</div>

Oh, I see.

For some reasons, [Chrome (and other browsers) doesn’t like port 6666](https://medium.com/@msinha2801/why-are-some-ports-considered-unsafe-restricted-c3c22d0596c0), and mark it as unsafe.

Edit: On top of that, the embedding option is by [default installing Weaviate 1.9.12](https://github.com/weaviate/weaviate-python-client/blob/f5a6864901d57c27764270dc009545cce31539bf/weaviate/embedded.py#L32C1-L32C1) as of now.

You can specify a different port (and/or specific version) for it to bind, like so:

```python
client = weaviate.Client(
    embedded_options=weaviate.embedded.EmbeddedOptions(
        port=8080, version="1.20.5"
      )
)

```

Also, if you request it using curl, insomnia, postman, etc, you’ll be able to request at the port you want:

> :~/dev/weaviate/$ curl [http://127.0.0.1:6666/v1/meta](http://127.0.0.1:6666/v1/meta)  
> {“hostname”:“[http://127.0.0.1:6666](http://127.0.0.1:6666)”,“modules”:{“generative-openai”:{“documentationHref”:“[https://beta.openai.com/docs/api-reference/completions",“name”:"Generative](https://beta.openai.com/docs/api-reference/completions%22,%22name%22:%22Generative) Search - OpenAI”},“qna-openai”:{“documentationHref”:“[https://beta.openai.com/docs/api-reference/completions",“name”:"OpenAI](https://beta.openai.com/docs/api-reference/completions%22,%22name%22:%22OpenAI) Question & Answering Module”},“ref2vec-centroid”:{},“text2vec-cohere”:{“documentationHref”:“[https://docs.cohere.ai/embedding-wiki/",“name”:"Cohere](https://docs.cohere.ai/embedding-wiki/%22,%22name%22:%22Cohere) Module”},“text2vec-huggingface”:{“documentationHref”:“[API Reference](https://huggingface.co/docs/api-inference/detailed_parameters#feature-extraction-task%22,%22name%22:%22Hugging) Face Module”},“text2vec-openai”:{“documentationHref”:“[https://beta.openai.com/docs/guides/embeddings/what-are-embeddings",“name”:"OpenAI](https://beta.openai.com/docs/guides/embeddings/what-are-embeddings%22,%22name%22:%22OpenAI) Module”}},“version”:“1.19.12”}

### But please, bear in mind that Weaviate Embedded is marked as Experimental as of now

Here is a link to it’s doc:

> **[Embedded Weaviate | Weaviate Documentation](https://docs.weaviate.io/deploy/installation-guides/embedded)**
>
> Embedded Weaviate is experimental software. APIs and parameters may change.

If you want to start playing around with Weaviate, the docker install is great way for that:

> **[Docker | Weaviate Documentation](https://docs.weaviate.io/deploy/installation-guides/docker-installation)**
>
> Weaviate supports deployment with Docker.

Let me know if this helps or if you have any troubles to start playing around with Weaviate!

Thanks!

---

<div class="post-metadata">

**Author:** ![JLiz2803](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/jliz2803/32/342_2.png) [@JLiz2803](https://forum.weaviate.io/u/JLiz2803)\
**Post date:** [August 15, 2023, 9:47pm UTC](https://forum.weaviate.io/t/cannot-add-tenancy-to-weaviate-class/496/7 "2023-08-15T21:47:16Z")

</div>

Thank you @DudaNogueira the embeddings options, `port=8080, version="1.20.5"`, solved my issue and I can now utilize multi tenancy within my application.
