# Auto refreshing browser with docker

**URL:** https://zola.discourse.group/t/auto-refreshing-browser-with-docker/773
**Category:** Support
**Created:** [February 9, 2021, 7:52pm UTC](https://zola.discourse.group/t/auto-refreshing-browser-with-docker/773 "2021-02-09T19:52:58Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![jmzagorski](https://avatars.discourse-cdn.com/v4/letter/j/7ba0ec/32.png) [@jmzagorski](https://zola.discourse.group/u/jmzagorski)
#### Post date: [February 9, 2021, 7:52pm UTC](https://zola.discourse.group/t/auto-refreshing-browser-with-docker/773/1 "2021-02-09T19:52:58Z")

</div>

I read over the docker documentation at [Installation | Zola](https://www.getzola.org/documentation/getting-started/installation/#docker). Everything works except the browser auto refresh on save. It does not seem like a zola issue because zola is updating on every save and when I manually refresh the browser i see the changes, but I was hoping someone may have found the solution to this (i spent a good hour searching). I am using the docker-compose file below. I am running v0.13 in WSL2. Auto refresh is working outside of docker on my windows and WSL2 installation. I would be happy to provide any other information if it helps. Thank you!

```
version: "2.4"

services:
  docs:
    working_dir: /docs
    image: balthek/zola:0.13.0
    container_name: zola_workspace
    command: serve --interface 0.0.0.0 --port 8080 --base-url localhost
    volumes:
      - ./docs:/docs
    ports:
      - "8080:8080"
```

---

<div class="post-metadata">

### Author: ![Roman](https://avatars.discourse-cdn.com/v4/letter/r/ed8c4c/32.png) [@Roman](https://zola.discourse.group/u/Roman)
#### Post date: [February 10, 2021, 9:56am UTC](https://zola.discourse.group/t/auto-refreshing-browser-with-docker/773/2 "2021-02-10T09:56:48Z")

</div>

just a guess:  
Zola updates your browser throught the js-script mapped to 1024 port, try to expose 1024 port to your docker image too

---

<div class="post-metadata">

### Author: ![jmzagorski](https://avatars.discourse-cdn.com/v4/letter/j/7ba0ec/32.png) [@jmzagorski](https://zola.discourse.group/u/jmzagorski)
#### Post date: [February 10, 2021, 11:42am UTC](https://zola.discourse.group/t/auto-refreshing-browser-with-docker/773/3 "2021-02-10T11:42:32Z")

</div>

Amazing, that worked! I thought that may be the issue, but the only other port I could find was 35729 from livereload.js, which was being remapped in zola anyway. However, now that you point out that port I see it clear as day in the code under `self.live_reload = get_available_port(port_to_avoid);` Guess I should have looked harder in zola! I think it may be beneficial to mention this in the docker documentation section. Would you want to create a PR for it since you found the answer? Or would you want me to do it, and I will give you full credit of course!

---

<div class="post-metadata">

### Author: ![Roman](https://avatars.discourse-cdn.com/v4/letter/r/ed8c4c/32.png) [@Roman](https://zola.discourse.group/u/Roman)
#### Post date: [February 10, 2021, 11:57am UTC](https://zola.discourse.group/t/auto-refreshing-browser-with-docker/773/4 "2021-02-10T11:57:58Z")

</div>

you may create a PR, but I 'm not confident that the case related to zola or it’s more about docker usage specific

---

<div class="post-metadata">

### Author: ![jmzagorski](https://avatars.discourse-cdn.com/v4/letter/j/7ba0ec/32.png) [@jmzagorski](https://zola.discourse.group/u/jmzagorski)
#### Post date: [February 10, 2021, 12:03pm UTC](https://zola.discourse.group/t/auto-refreshing-browser-with-docker/773/5 "2021-02-10T12:03:26Z")

</div>

I will look into it a bit and probably end up opening an issue with the repository owner to get his thoughts before creating a PR. Also, it looks like the port may not be 1024 if it is in use already so I wonder if it would be beneficial to output the live reload port when serving. Thanks again!
