# Confluent cli and Confluent Docker

**URL:** <https://forum.confluent.io/t/confluent-cli-and-confluent-docker/2482>\
**Category:** Clients\
**Created:** [11 August 2021 10:56 UTC](https://forum.confluent.io/t/confluent-cli-and-confluent-docker/2482 "2021-08-11T10:56:24Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![steinrr](https://avatars.discourse-cdn.com/v4/letter/s/ee7513/32.png) [@steinrr](https://forum.confluent.io/u/steinrr)\
**Post date:** [11 August 2021 10:56 UTC](https://forum.confluent.io/t/confluent-cli-and-confluent-docker/2482/1 "2021-08-11T10:56:24Z")

</div>

I am running Confluent according to step 1 in these instructions:

[https://docs.confluent.io/platform/current/quickstart/ce-docker-quickstart.html](https://docs.confluent.io/platform/current/quickstart/ce-docker-quickstart.html)

Works fine and I can open the web console.

I would like to use Confluent cli to interact with it, and have installed this “outside docker” in a folder on the same computer running docker.

How can I connect the confluent cli client to the Confluent instance running in the Docker container?

---

<div class="post-metadata">

**Author:** ![mmuehlbeyer](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.confluent.io/mmuehlbeyer/32/1088_2.png) [@mmuehlbeyer](https://forum.confluent.io/u/mmuehlbeyer)\
**Post date:** [11 August 2021 11:23 UTC](https://forum.confluent.io/t/confluent-cli-and-confluent-docker/2482/2 "2021-08-11T11:23:07Z")

</div>

there should be a hidden directory  
_.confluent_ in your home directory  
create `java.config` file there with the following:

```auto
bootstrap.servers={{ BROKER_ENDPOINT }}
security.protocol=SASL_SSL
sasl.jaas.config=org.apache.kafka.common.security.plain.PlainLoginModule required username='{{ CLUSTER_API_KEY }}' password='{{ CLUSTER_API_SECRET }}';
sasl.mechanism=PLAIN
client.dns.lookup=use_all_dns_ips
acks=all

```

for reference  
[https://docs.confluent.io/platform/current/tutorials/examples/clients/docs/confluent-cli.html](https://docs.confluent.io/platform/current/tutorials/examples/clients/docs/confluent-cli.html)

---

<div class="post-metadata">

**Author:** ![steinrr](https://avatars.discourse-cdn.com/v4/letter/s/ee7513/32.png) [@steinrr](https://forum.confluent.io/u/steinrr)\
**Post date:** [12 August 2021 05:06 UTC](https://forum.confluent.io/t/confluent-cli-and-confluent-docker/2482/3 "2021-08-12T05:06:50Z")

</div>

I am trying to use “confluent login” to log in to my cluster, but then I am asked for username and password. Where can I find the username and password to use?

I must also provide the --url parameter which points to “Metadata service URL. Must set flag or CONFLUENT\_MDS\_URL.” Where can I find this URL? Is it the broker URL/port?

```auto
broker /etc/confluent/docker/run Up 0.0.0.0:9092->9092/tcp,:::9092->9092/tcp,                                        
                                                           0.0.0.0:9101->9101/tcp,:::9101->9101/tcp

```

---

<div class="post-metadata">

**Author:** ![mmuehlbeyer](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.confluent.io/mmuehlbeyer/32/1088_2.png) [@mmuehlbeyer](https://forum.confluent.io/u/mmuehlbeyer)\
**Post date:** [12 August 2021 06:50 UTC](https://forum.confluent.io/t/confluent-cli-and-confluent-docker/2482/4 "2021-08-12T06:50:02Z")

</div>

no it’s not the brokers URL

as you said above your configuration was done as described in the quickstart documentation

afaik there is no MDS configured at all and no need to use confluent login.

what would you like to do with the cluster?  
produce some data?  
check the config?

---

<div class="post-metadata">

**Author:** ![steinrr](https://avatars.discourse-cdn.com/v4/letter/s/ee7513/32.png) [@steinrr](https://forum.confluent.io/u/steinrr)\
**Post date:** [12 August 2021 20:49 UTC](https://forum.confluent.io/t/confluent-cli-and-confluent-docker/2482/5 "2021-08-12T20:49:56Z")

</div>

I am trying to follow this tutorial, and it uses confluent cli and not the web interface:

[https://docs.confluent.io/platform/current/connect/quickstart.html](https://docs.confluent.io/platform/current/connect/quickstart.html)

---

<div class="post-metadata">

**Author:** ![mmuehlbeyer](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.confluent.io/mmuehlbeyer/32/1088_2.png) [@mmuehlbeyer](https://forum.confluent.io/u/mmuehlbeyer)\
**Post date:** [13 August 2021 06:11 UTC](https://forum.confluent.io/t/confluent-cli-and-confluent-docker/2482/6 "2021-08-13T06:11:51Z")

</div>

> [@steinrr](#):
>
> I am trying to follow this tutorial, and it uses confluent cli and not the web interface:

I see but in your first post you mentioned you’re trying to connect with cli from outside docker and that your setup ist docker-based.

> [@steinrr](#):
>
> I am running Confluent according to step 1 in these instructions:
> 
> [https://docs.confluent.io/platform/current/quickstart/ce-docker-quickstart.html](https://docs.confluent.io/platform/current/quickstart/ce-docker-quickstart.html)

so would please clarify what you try to do?  
`confluent local` works, afaik, only with a local installation as described in  
the mentioned quickstart.
