# Auto-open browser window with Dash

**URL:** <https://community.plotly.com/t/auto-open-browser-window-with-dash/31948>\
**Category:** Dash Python\
**Created:** [November 27, 2019, 5:14pm UTC](https://community.plotly.com/t/auto-open-browser-window-with-dash/31948 "2019-11-27T17:14:34Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![wbrgss](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/wbrgss/32/3621_2.png) [@wbrgss](https://community.plotly.com/u/wbrgss)\
**Post date:** [November 27, 2019, 11:02pm UTC](https://community.plotly.com/t/auto-open-browser-window-with-dash/31948/2 "2019-11-27T23:02:51Z")

</div>

Hi @dhhagan,

Would something using the `webbrowser` module work?

E.g.

```auto
import dash
...

import webbrowser
from threading import Timer

app = dash.Dash( __name__ ) 

port = 5000 # or simply open on the default `8050` port

def open_browser():
	webbrowser.open_new("http://localhost:{}".format(port))

if __name__ == ' __main__':
    Timer(1, open_browser).start();
    app.run_server(debug=True, port=port)

```

(from [https://stackoverflow.com/a/54235461](https://stackoverflow.com/a/54235461))

---

_[View the full topic](https://community.plotly.com/t/auto-open-browser-window-with-dash/31948)._
