# JupyterDash in a notebook which is running on a remote server

**URL:** https://community.plotly.com/t/jupyterdash-in-a-notebook-which-is-running-on-a-remote-server/68308
**Category:** Dash Python
**Created:** [September 26, 2022, 9:19am UTC](https://community.plotly.com/t/jupyterdash-in-a-notebook-which-is-running-on-a-remote-server/68308 "2022-09-26T09:19:36Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![majid](https://avatars.discourse-cdn.com/v4/letter/m/13edae/32.png) [@majid](https://community.plotly.com/u/majid)
#### Post date: [September 26, 2022, 9:19am UTC](https://community.plotly.com/t/jupyterdash-in-a-notebook-which-is-running-on-a-remote-server/68308/1 "2022-09-26T09:19:36Z")

</div>

Hi,

I want to run JupyterDash in a Jupyter notebook running on a remote server (I use `ssh -L 1234:localhost:1234` and can see the notebook on my browser at [http://localhost:1234](http://localhost:1234)).

Following the tutorial, I set up the app as

```auto
from dash import html
import dash_bio as dashbio
from jupyter_dash import JupyterDash

# JupyterDash.infer_jupyter_proxy_config()

app = JupyterDash( __name__ )

with open('seqs.fasta', 'r') as f:
    data = f.read()
app.layout = html.Div([dashbio.AlignmentChart(id="AlignmentChart", data=data)])

app.run_server(mode="external", port=4321, debug=True)

```

This gives the link `Dash app running on http://127.0.0.1:4321/` which does not work as I am not on the remote server. Also, I tried activating the jupyter\_server\_proxy and uncommenting the `JupyterDash.infer_jupyter_proxy_config()` line above. In that case, the link would be  
`Dash app running on http://localhost:1234/proxy/4321/`  
which does not work either.

The only suboptimal solution I found was to run another ssh with option `-L 4321:localhost:4321` and see the app under [http://127.0.0.1:4321/](http://127.0.0.1:4321/).

Obviously, this does not work if you want to use the app in “inline” mode. What’s the correct way of running a JupyterDash app in inline mode on a remote notebook?

Thanks!

---

<div class="post-metadata">

### Author: ![1356617750](https://avatars.discourse-cdn.com/v4/letter/1/848f3c/32.png) [@1356617750](https://community.plotly.com/u/1356617750)
#### Post date: [November 4, 2022, 7:59am UTC](https://community.plotly.com/t/jupyterdash-in-a-notebook-which-is-running-on-a-remote-server/68308/2 "2022-11-04T07:59:33Z")

</div>

I think it is difficult .jupyter server is in tornado but dash is flask. I use \_thread.start\_new\_thread to create the dash application.Then use the Iframe to show my dash app. 😂

---

<div class="post-metadata">

### Author: ![majid](https://avatars.discourse-cdn.com/v4/letter/m/13edae/32.png) [@majid](https://community.plotly.com/u/majid)
#### Post date: [November 4, 2022, 1:54pm UTC](https://community.plotly.com/t/jupyterdash-in-a-notebook-which-is-running-on-a-remote-server/68308/3 "2022-11-04T13:54:18Z")

</div>

Thanks for your reply.  
Can you please share a minimal (pseudo) code for doing that?

---

<div class="post-metadata">

### Author: ![mail8](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/mail8/32/31560_2.png) [@mail8](https://community.plotly.com/u/mail8)
#### Post date: [June 28, 2023, 5:22pm UTC](https://community.plotly.com/t/jupyterdash-in-a-notebook-which-is-running-on-a-remote-server/68308/4 "2023-06-28T17:22:29Z")

</div>

Same problem. JupyterDash should setup a proxy automatically. Same problem also with e.g. Gradio.
