# Images lost when migrating to self-hosting

**URL:** https://meta.discourse.org/t/images-lost-when-migrating-to-self-hosting/52643
**Category:** Self-hosting
**Tags:** hosting
**Created:** [7 نوفمبر 2016، 9:37م UTC](https://meta.discourse.org/t/images-lost-when-migrating-to-self-hosting/52643 "2016-11-07T21:37:24Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![vicki](https://avatars.discourse-cdn.com/v4/letter/v/9e8a1a/32.png) [@vicki](https://meta.discourse.org/u/vicki)
#### Post date: [7 نوفمبر 2016، 9:37م UTC](https://meta.discourse.org/t/images-lost-when-migrating-to-self-hosting/52643/1 "2016-11-07T21:37:24Z")

</div>

I followed the instructions listed on [how to move your Discourse instance to a different server](https://meta.discourse.org/t/move-your-discourse-instance-to-a-different-server/15721) as we move our forum from being Discourse-hosted to self-hosted. However, when I load the self-hosted instance (at a test URL), all of the images are gone.

 ![](https://global.discourse-cdn.com/meta/original/3X/5/7/57a3d257f7cabb2fb81aec2bd0e6c62ef93e9a30.png)

This includes the logo and favicon images throughout the site.

Is there a way to migrate the images over from our Discourse-hosted version to the self-hosted instance? Or should I go about the migration in a different way?

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [7 نوفمبر 2016، 9:40م UTC](https://meta.discourse.org/t/images-lost-when-migrating-to-self-hosting/52643/2 "2016-11-07T21:40:05Z")

</div>

You need to remap the urls. Are you using the same hostname that you were using before? What about CDN? What’s the URL of the missing image? What’s the URL of the forum?

---

<div class="post-metadata">

### Author: ![vicki](https://avatars.discourse-cdn.com/v4/letter/v/9e8a1a/32.png) [@vicki](https://meta.discourse.org/u/vicki)
#### Post date: [7 نوفمبر 2016، 9:43م UTC](https://meta.discourse.org/t/images-lost-when-migrating-to-self-hosting/52643/3 "2016-11-07T21:43:38Z")

</div>

Right now, our Discourse-hosted forum is at [community.endlessm.com](http://community.endlessm.com) and the self-hosted instance is being tested at [discourse.dev.endlessm.com](http://discourse.dev.endlessm.com)

As an example, the broken image link is

“[https://cdn-standard2.discourse.org/uploads/default/original/1X/ab52b20f959c49df22586fb77f7c269e64bcf01e.png](https://cdn-standard2.discourse.org/uploads/default/original/1X/ab52b20f959c49df22586fb77f7c269e64bcf01e.png)” and on our current Discourse-hosted forum, the same image is at “[https://cdn-standard2.discourse.org/uploads/endless/original/1X/ab52b20f959c49df22586fb77f7c269e64bcf01e.png](https://cdn-standard2.discourse.org/uploads/endless/original/1X/ab52b20f959c49df22586fb77f7c269e64bcf01e.png)”

---

<div class="post-metadata">

### Author: ![vicki](https://avatars.discourse-cdn.com/v4/letter/v/9e8a1a/32.png) [@vicki](https://meta.discourse.org/u/vicki)
#### Post date: [7 نوفمبر 2016، 10:00م UTC](https://meta.discourse.org/t/images-lost-when-migrating-to-self-hosting/52643/4 "2016-11-07T22:00:08Z")

</div>

Was able to fix this! Ran  
\> ./launcher enter app  
\> rake posts:rebake

and the previously broken post images are now corrected!

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [7 نوفمبر 2016، 11:40م UTC](https://meta.discourse.org/t/images-lost-when-migrating-to-self-hosting/52643/5 "2016-11-07T23:40:14Z")

</div>


