# Uploads Path Should Update When URL Changes in app.yml During Container Rebuild

**URL:** https://meta.discourse.org/t/uploads-path-should-update-when-url-changes-in-app-yml-during-container-rebuild/315364
**Category:** Self-hosting
**Tags:** uploads
**Created:** [July 8, 2024, 5:09am UTC](https://meta.discourse.org/t/uploads-path-should-update-when-url-changes-in-app-yml-during-container-rebuild/315364 "2024-07-08T05:09:53Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![tumbleweed](https://avatars.discourse-cdn.com/v4/letter/t/43a26b/32.png) [@tumbleweed](https://meta.discourse.org/u/tumbleweed)
#### Post date: [July 8, 2024, 5:09am UTC](https://meta.discourse.org/t/uploads-path-should-update-when-url-changes-in-app-yml-during-container-rebuild/315364/1 "2024-07-08T05:09:53Z")

</div>

When Discourse is restored from a backup, it automatically updates the paths for all uploaded content to match the current site URL. However, if the site’s DNS settings are changed and app.yml is modified and the container is rebuilt, this update does not occur. This results in all uploads being inaccessible after the rebuild. The simplest workaround I’ve found is to backup and restore the site, but should this check be included in the container rebuild process?

---

<div class="post-metadata">

### Author: ![RGJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rgj/32/523185_2.png) [@RGJ](https://meta.discourse.org/u/RGJ)
#### Post date: [July 8, 2024, 10:07am UTC](https://meta.discourse.org/t/uploads-path-should-update-when-url-changes-in-app-yml-during-container-rebuild/315364/2 "2024-07-08T10:07:29Z")

</div>

The correct process that should be followed can be found here

> [@Change the domain name or rename your Discourse](https://meta.discourse.org/t/change-the-domain-name-or-rename-your-discourse/16098):
>
> bookmark This guide explains how-to change the domain name of your Discourse site, and includes information about setting up DNS changes, editing configuration files, updating site settings, and correcting social logins and post content to reflect your new domain name. warning This guide is for self-hosted Discourse instances that were installed using our [installation guide on GitHub](https://github.com/discourse/discourse/blob/main/docs/INSTALL-cloud.md). If you are [hosted by Discourse](https://www.discourse.org/pricing), please see [Configure your domain name for hosted Discourse](https://meta.discourse.org/t/configure-your-domain-name-for-hosted-discourse/21827) for specific …

Maybe that topic needs to be linked in a comment in the template.

---

<div class="post-metadata">

### Author: ![tumbleweed](https://avatars.discourse-cdn.com/v4/letter/t/43a26b/32.png) [@tumbleweed](https://meta.discourse.org/u/tumbleweed)
#### Post date: [July 9, 2024, 6:21am UTC](https://meta.discourse.org/t/uploads-path-should-update-when-url-changes-in-app-yml-during-container-rebuild/315364/3 "2024-07-09T06:21:03Z")

</div>

Okay, thanks very much!

---

<div class="post-metadata">

### Author: ![nat](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nat/32/235063_2.png) [@nat](https://meta.discourse.org/u/nat)
#### Post date: [July 13, 2024, 12:00am UTC](https://meta.discourse.org/t/uploads-path-should-update-when-url-changes-in-app-yml-during-container-rebuild/315364/4 "2024-07-13T00:00:26Z")

</div>

This topic was automatically closed after 3 days. New replies are no longer allowed.
