# Can't see dask dashboard using docker on remote machine with reverse proxy

**URL:** https://dask.discourse.group/t/cant-see-dask-dashboard-using-docker-on-remote-machine-with-reverse-proxy/2425
**Category:** Distributed
**Tags:** dashboard, distributed
**Created:** [January 2, 2024, 6:30pm UTC](https://dask.discourse.group/t/cant-see-dask-dashboard-using-docker-on-remote-machine-with-reverse-proxy/2425 "2024-01-02T18:30:05Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![turbid\_butterfly](https://avatars.discourse-cdn.com/v4/letter/t/7cd45c/32.png) [@turbid\_butterfly](https://dask.discourse.group/u/turbid_butterfly)
#### Post date: [January 2, 2024, 6:30pm UTC](https://dask.discourse.group/t/cant-see-dask-dashboard-using-docker-on-remote-machine-with-reverse-proxy/2425/1 "2024-01-02T18:30:05Z")

</div>

I’m running dask on a digital ocean machine with docker containers.

The problem is that I cannot access the dask dashboard.

The setup:

```auto

> Docker-compose:
> 
> scheduler:
> image: ghcr.io/dask/dask:latest
> platform: linux/amd64
> hostname: scheduler
> ports:
> - "8786:8786"
> - "8788:8787"
> environment:
> - USE_MAMBA=true
> - EXTRA_CONDA_PACKAGES=xarray s3fs boto3 scipy matplotlib python-dotenv
> command: ["dask-scheduler"]
> 
> worker:
> image: ghcr.io/dask/dask:latest
> platform: linux/amd64
> command: ["dask-worker", "tcp://scheduler:8786"]
> environment:
> - USE_MAMBA=true
> - EXTRA_CONDA_PACKAGES=xarray s3fs boto3 scipy matplotlib python-dotenv
> deploy:
> replicas: 4
> 
> notebook:
> image: ghcr.io/dask/dask-notebook:latest
> platform: linux/amd64
> ports:
> - "8888:8888"
> environment:
> - USE_MAMBA=true
> - EXTRA_CONDA_PACKAGES=xarray s3fs boto3 scipy matplotlib python-dotenv
> - DASK_SCHEDULER_ADDRESS="tcp://scheduler:8786"
> - JUPYTER_TOKEN=$PASSWORD
> - CHOWN_EXTRA=/home/jovyan/seamod
> - CHOWN_EXTRA_OPTS=-R
> user: root
> volumes:
> - .:/home/jovyan/seamod
> working_dir: /home/jovyan/seamod
> restart: always
> depends_on:
> - caddy

```

Caddyfile has a reverse proxy set up:

```auto
dask.seamod.xxx {
  reverse_proxy scheduler:8786
...
}

jupyter.seamod.xxx {
  reverse_proxy jupyter:8888
}

```

I can access the jupyter server, but I cannot access the dashboard. The dashboard shows up blank, and I try to initialize it via:

```auto
cluster = LocalCluster()
c = Client(cluster)
c

```

### Client

```auto
Client-1735331d-a99c-11ee-8840-0242ac190007

| **Connection method:** Cluster object| **Cluster type:** distributed.LocalCluster|
| --- | --- |
| **Dashboard:** http://127.0.0.1:8787/status|

```

Any help would be greatly appreciated so I can move onto to troubleshooting how to manage memory within my workers…

Thank you!!!

---

<div class="post-metadata">

### Author: ![guillaumeeb](https://yyz1.discourse-cdn.com/flex035/user_avatar/dask.discourse.group/guillaumeeb/32/1613_2.png) [@guillaumeeb](https://dask.discourse.group/u/guillaumeeb)
#### Post date: [January 3, 2024, 5:23pm UTC](https://dask.discourse.group/t/cant-see-dask-dashboard-using-docker-on-remote-machine-with-reverse-proxy/2425/2 "2024-01-03T17:23:48Z")

</div>

Hi @turbid_butterfly, welcome to Dask Discourse!

> [@turbid\_butterfly](#):
>
> `reverse_proxy scheduler:8786`

Here you are setting a proxy for the Scheduler, but you didn’t print any line for the Dask Dahsboard on port 8788, is this normal?

> [@turbid\_butterfly](#):
>
> I try to initialize it via:
> 
> ```auto
> cluster = LocalCluster()
> c = Client(cluster)
> c
> 
> ```

I’m not sure what you are trying to do here, this would create a new Dask `LocalCluster` in the Jupyter notebook container, but what you want is to connect to the one you spawned in Docker containers, isn’t it?

---

<div class="post-metadata">

### Author: ![turbid\_butterfly](https://avatars.discourse-cdn.com/v4/letter/t/7cd45c/32.png) [@turbid\_butterfly](https://dask.discourse.group/u/turbid_butterfly)
#### Post date: [January 4, 2024, 10:56pm UTC](https://dask.discourse.group/t/cant-see-dask-dashboard-using-docker-on-remote-machine-with-reverse-proxy/2425/3 "2024-01-04T22:56:29Z")

</div>

Here you are setting a proxy for the Scheduler, but you didn’t print any line for the Dask Dahsboard on port 8788, is this normal? - I’m not sure?

…

Right, I want to connect to the one I’ve already spawned in the Docker container. I’ve also tried:  
Client(‘tcp://scheduler:8786’)

---

<div class="post-metadata">

### Author: ![guillaumeeb](https://yyz1.discourse-cdn.com/flex035/user_avatar/dask.discourse.group/guillaumeeb/32/1613_2.png) [@guillaumeeb](https://dask.discourse.group/u/guillaumeeb)
#### Post date: [January 5, 2024, 2:47pm UTC](https://dask.discourse.group/t/cant-see-dask-dashboard-using-docker-on-remote-machine-with-reverse-proxy/2425/4 "2024-01-05T14:47:24Z")

</div>

> [@turbid\_butterfly](#):
>
> port 8788, is this normal? - I’m not sure?

I’m not familiar with Digital Ocean setup, but if you want to access the Dashboard running inside a Docker container, you should probably add some proxy for it too. Considering the docker-compose setup, it should be available on the 8788 port.

> [@turbid\_butterfly](#):
>
> I’ve also tried:  
> Client(‘tcp://scheduler:8786’)

And what happens then?

---

<div class="post-metadata">

### Author: ![turbid\_butterfly](https://avatars.discourse-cdn.com/v4/letter/t/7cd45c/32.png) [@turbid\_butterfly](https://dask.discourse.group/u/turbid_butterfly)
#### Post date: [January 5, 2024, 5:18pm UTC](https://dask.discourse.group/t/cant-see-dask-dashboard-using-docker-on-remote-machine-with-reverse-proxy/2425/5 "2024-01-05T17:18:19Z")

</div>

[http://127.0.0.1:8787/status](http://127.0.0.1:8787/status)

If I’m running in Jupyter, it says “Unable to connect”:

 ![unabletoconnect_jupyter](https://canada1.discourse-cdn.com/flex035/uploads/dask/original/2X/e/e8a05fd6fb43514ff7ccda281e1009ab99b70c88.png)

I thought this reverse proxy was for the dashboard:

```auto
dask.seamod.xxx {
  reverse_proxy scheduler:8786
...
}

```

since it connects to the scheduler container…

---

<div class="post-metadata">

### Author: ![guillaumeeb](https://yyz1.discourse-cdn.com/flex035/user_avatar/dask.discourse.group/guillaumeeb/32/1613_2.png) [@guillaumeeb](https://dask.discourse.group/u/guillaumeeb)
#### Post date: [January 5, 2024, 5:35pm UTC](https://dask.discourse.group/t/cant-see-dask-dashboard-using-docker-on-remote-machine-with-reverse-proxy/2425/6 "2024-01-05T17:35:20Z")

</div>

So I assume the notebook your into is the one deployed from your docker-compose setup.

With the same docker-compose, you also started a Dask cluster with a Scheduler and 4 Workers.

In your notebook, you create another Dask cluster inside the notebook container (`LocalCluster` line), and you connect the client to it (since your passing the cluster object to the `Client`, I’m not sure the URL after is used at all). This cluster is not accessible from your local computer, you would need to use jupyter-server-proxy to see it, but I don’t think this is what you want.

> [@turbid\_butterfly](#):
>
> I thought this reverse proxy was for the dashboard:

It is for the connection between your Client and the Scheduler, the dashboard is on port 8787 by default. And you make it available on 8788 in your docker-compose setup.

I think you want to connect the Client to the already started cluster, so only something like:

```python
client = Client('tcp://scheduler:8786')

```

Then maybe the Dask Jupyter extension can connect to scheduler:8788, but this might be a bit more complicated looking at your setup. On what URL do you open the Jupyterlab?

---

<div class="post-metadata">

### Author: ![turbid\_butterfly](https://avatars.discourse-cdn.com/v4/letter/t/7cd45c/32.png) [@turbid\_butterfly](https://dask.discourse.group/u/turbid_butterfly)
#### Post date: [January 5, 2024, 6:03pm UTC](https://dask.discourse.group/t/cant-see-dask-dashboard-using-docker-on-remote-machine-with-reverse-proxy/2425/7 "2024-01-05T18:03:06Z")

</div>

The dashboard is on port 8787 on the jupyter container?

I open jupyter lab on [jupyter.seamod.xxx.com](http://jupyter.seamod.xxx.com), where xx is the domain name of my company that’s hosting the web service.

If I run:

```auto
  client = Client('tcp://scheduler:8787')   
  client

```

It times out:

```auto
OSError: Timed out trying to connect to tcp://scheduler:8787 after 30 s

```

---

<div class="post-metadata">

### Author: ![guillaumeeb](https://yyz1.discourse-cdn.com/flex035/user_avatar/dask.discourse.group/guillaumeeb/32/1613_2.png) [@guillaumeeb](https://dask.discourse.group/u/guillaumeeb)
#### Post date: [January 12, 2024, 8:56pm UTC](https://dask.discourse.group/t/cant-see-dask-dashboard-using-docker-on-remote-machine-with-reverse-proxy/2425/8 "2024-01-12T20:56:51Z")

</div>

> [@turbid\_butterfly](#):
>
> The dashboard is on port 8787 on the jupyter container?

Dashboard is on port 8787 on the scheduler container, but considering your docker compose, you make it available to 8788 from outside:

> [@turbid\_butterfly](#):
>
> ```auto
> scheduler:
> > image: ghcr.io/dask/dask:latest
> > platform: linux/amd64
> > hostname: scheduler
> > ports:
> > - "8786:8786"
> > - "8788:8787"
> 
> ```

> [@turbid\_butterfly](#):
>
> If I run:
> 
> ```auto
> client = Client('tcp://scheduler:8787')   
> client
> 
> ```

The Dashboard is a web application, it has to be opened in a browser. Client is meant to connect on port 8786 on the Scheduler.
