<p>Not sure how this would affect your docker set up, but <a href="https://github.com/craftcms/cms/issues/3559" rel="nofollow noreferrer">this thread</a> discourages the use of <code>@web</code> in your Base URL field. </p>

<p>As the thread and @marten-brosch suggested, set the <code>DEFAULT_SITE_URL</code> in your <code>.env</code> file and use this variable in the Base URL field in the CP. For me, the live preview wasn't working because my site is secured with SSL but my <code>DEFAULT_SITE_URL</code> wasn't prefixed with "https:"</p>

CC BY-SA 4.0
2019-10-06T23:45:54.577Z
2019-10-14T23:50:59.457Z
2019-10-14T23:50:59.457Z
atc
<p>I needed to set the base-url to <strong>@web</strong> in:</p>

<pre><code>Settings &gt; Websites &gt; "your Website" &gt; base-url 
</code></pre>

<p>This helps on my local docker-environment. Make sure, that your DEFAULT_SITE_URL="domain.something" is set in your .env file and that you are using the latest 3.2.x version.</p>

CC BY-SA 4.0
2019-09-08T15:22:21.747Z
Late reply, but that actually did the trick.
Ignism
CC BY-SA 4.0
2019-09-09T17:53:23.827Z
Cool, nice to hear :)
Marten Brosch
CC BY-SA 4.0
2019-08-26T13:31:57.207Z
2019-08-26T13:37:47.483Z
2019-08-26T13:37:47.483Z
Marten Brosch
<p>I am using docker for my local webdev and am new to Craft CMS.</p>

<p>Currently I have a simple setup running, however, my Live-Preview does not seem to work and throws the "Template not found" error.
Yet, when I surf to the same location in my browser all seems dandy and fine.</p>

<p>I'm sure I'm overlooking something simple, but can't seem to find it.</p>

CC BY-SA 4.0
2019-08-22T16:01:47.843Z
What might be adding to the problem is that I am running my container at localhost:8080 (instead of 80). I ran into another error when saving a new name for my website. It would not accept the current base url in my environment variable, localhost:8080
Ignism
<templating><live-preview>
"Template not found" in live-preview
# "Template not found" in live-preview

(Asked by: username_0 on 2019-08-22)

I am using docker for my local webdev and am new to Craft CMS.

Currently I have a simple setup running, however, my Live-Preview does not seem to work and throws the "Template not found" error.
Yet, when I surf to the same location in my browser all seems dandy and fine.

I'm sure I'm overlooking something simple, but can't seem to find it.

**Tags:** templating, live-preview
> **Comments:**
> **username_0**: What might be adding to the problem is that I am running my container at localhost:8080 (instead of 80). I ran into another error when saving a new name for my website. It would not accept the current base url in my environment variable, localhost:8080  

---

## 2 answers

### Answer by username_1 on 2019-10-06. Score: 2

Not sure how this would affect your docker set up, but [this thread](https://github.com/craftcms/cms/issues/3559) discourages the use of `@web` in your Base URL field.

As the thread and @marten-brosch suggested, set the `DEFAULT_SITE_URL` in your `.env` file and use this variable in the Base URL field in the CP. For me, the live preview wasn't working because my site is secured with SSL but my `DEFAULT_SITE_URL` wasn't prefixed with "https:"


---

### Answer by username_2 on 2019-08-26. Score: 2

I needed to set the base-url to @web in:
Settings > Websites > "your Website" > base-url 

This helps on my local docker-environment. Make sure, that your DEFAULT_SITE_URL="domain.something" is set in your .env file and that you are using the latest 3.2.x version.

> **Comments:**
> **username_0**: Late reply, but that actually did the trick.  
> **username_2**: Cool, nice to hear :)  

---

