# Can only Docker Compose be used for multi node deployment?

**URL:** <https://forum.weaviate.io/t/can-only-docker-compose-be-used-for-multi-node-deployment/517>\
**Category:** Support\
**Tags:** bug\
**Created:** [August 10, 2023, 7:46am UTC](https://forum.weaviate.io/t/can-only-docker-compose-be-used-for-multi-node-deployment/517 "2023-08-10T07:46:32Z")\
**Posts on this page:** 1\
**Showing post:** 2

<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 14, 2023, 12:46pm UTC](https://forum.weaviate.io/t/can-only-docker-compose-be-used-for-multi-node-deployment/517/2 "2023-08-14T12:46:21Z")

</div>

Hi @codehelen ! Welcome to our community 🙂

This must be some networking issue along the way, as your docker is correct (see below)

A starting point is making sure that weaviate-node2-IP can communicate with weaviate-node1-IP on all specified ports.

A good example on how to run with ad-hoc containers (at the same docker host):

## First, create a docker attachable network

```auto
docker network create weaviate --atachable

```

_note that weaviate, above, can be whatever network name you want. Make sure to change it accordingly at the --network option, on both nodes, bellow_

## Run node 1

```auto
docker run --name weaviate-node1 \
-p 6080:8080 \
-p 6081:6081 \
-p 6082:6082 \
--network=weaviate \
-e "AUTHENTICATION_APIKEY_ENABLED=true" \
-e "AUTHENTICATION_APIKEY_ALLOWED_KEYS=A1iB0t_d4m0" \
-e "AUTHENTICATION_APIKEY_USERS=admin" \
-e "PERSISTENCE_DATA_PATH=/root/weaviate/data" \
-e "AUTHORIZATION_ADMINLIST_USERS=admin" \
-e "CLUSTER_HOSTNAME=weaviate-node1" \
-e "CLUSTER_GOSSIP_BIND_PORT=6081" \
-e "CLUSTER_DATA_BIND_PORT=6082" \
-d semitechnologies/weaviate:1.20.5

```

## Run node 2

```auto
docker run --name weaviate-node2 \
-p 7080:8080 \
-p 7081:7081 \
-p 7082:7082 \
--network=weaviate \
-e "AUTHENTICATION_APIKEY_ENABLED=true" \
-e "AUTHENTICATION_APIKEY_ALLOWED_KEYS=A1iB0t_d4m0" \
-e "AUTHENTICATION_APIKEY_USERS=admin" \
-e "PERSISTENCE_DATA_PATH=/root/weaviate/data" \
-e "AUTHORIZATION_ADMINLIST_USERS=admin" \
-e "CLUSTER_HOSTNAME=weaviate-node2" \
-e "CLUSTER_GOSSIP_BIND_PORT=7081" \
-e "CLUSTER_DATA_BIND_PORT=7082" \
-e "CLUSTER_JOIN=weaviate-node1:6081" \
-d semitechnologies/weaviate:1.20.5

```

Now you can check your two nodes up and running:

```auto
curl http://localhost:6080/v1/nodes -H "Authorization: Bearer A1iB0t_d4m0" | jq
  % Total % Received % Xferd Average Speed Time Time Time Current
                                 Dload Upload Total Spent Left Speed
100 290 100 290 0 0 184k 0 --:--:-- --:--:-- --:--:-- 283k
{
  "nodes": [
    {
      "gitHash": "f7c148e",
      "name": "weaviate-node1",
      "shards": null,
      "stats": {
        "objectCount": 0,
        "shardCount": 0
      },
      "status": "HEALTHY",
      "version": "1.20.5"
    },
    {
      "gitHash": "f7c148e",
      "name": "weaviate-node2",
      "shards": null,
      "stats": {
        "objectCount": 0,
        "shardCount": 0
      },
      "status": "HEALTHY",
      "version": "1.20.5"
    }
  ]
}

```

Let me know if this helps!

Thanks!

---

_[View the full topic](https://forum.weaviate.io/t/can-only-docker-compose-be-used-for-multi-node-deployment/517)._
