# Flag option to open the browser when Hugo server

**URL:** https://discourse.gohugo.io/t/flag-option-to-open-the-browser-when-hugo-server/37068
**Category:** support
**Created:** [February 8, 2022, 8:37pm UTC](https://discourse.gohugo.io/t/flag-option-to-open-the-browser-when-hugo-server/37068 "2022-02-08T20:37:00Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Polarhardboiled](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/polarhardboiled/32/22623_2.png) [@Polarhardboiled](https://discourse.gohugo.io/u/Polarhardboiled)
#### Post date: [February 8, 2022, 8:37pm UTC](https://discourse.gohugo.io/t/flag-option-to-open-the-browser-when-hugo-server/37068/1 "2022-02-08T20:37:00Z")

</div>

Is there an config option or flag to get the browser opening automatically at launch when hugo serve ?  
something like `hugo server -v --open` and go directly to the url `localhost:1313`

---

<div class="post-metadata">

### Author: ![jmooring](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/jmooring/32/4214_2.png) [@jmooring](https://discourse.gohugo.io/u/jmooring)
#### Post date: [February 8, 2022, 10:09pm UTC](https://discourse.gohugo.io/t/flag-option-to-open-the-browser-when-hugo-server/37068/2 "2022-02-08T22:09:21Z")

</div>

```bash
alias foo='google-chrome http://localhost:1313/ && hugo server'
foo

```

---

<div class="post-metadata">

### Author: ![alexandros](https://avatars.discourse-cdn.com/v4/letter/a/ecc23a/32.png) [@alexandros](https://discourse.gohugo.io/u/alexandros)
#### Post date: [February 9, 2022, 4:06am UTC](https://discourse.gohugo.io/t/flag-option-to-open-the-browser-when-hugo-server/37068/3 "2022-02-09T04:06:34Z")

</div>

On macOS

```auto
open http://localhost:1313/ && hugo server

```

---

<div class="post-metadata">

### Author: ![parsiya](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/parsiya/32/1218_2.png) [@parsiya](https://discourse.gohugo.io/u/parsiya)
#### Post date: [February 9, 2022, 3:53pm UTC](https://discourse.gohugo.io/t/flag-option-to-open-the-browser-when-hugo-server/37068/4 "2022-02-09T15:53:23Z")

</div>

Make sure to run the server with the `--navigateToChanged ` flag, too. When you open the browser, this will automagically show you the last page that was modified. Pretty useful to see what you’re working on without extra clicks.
