# Changing hostname

**URL:** <https://meta.discourse.org/t/changing-hostname/260954>\
**Category:** Self-hosting\
**Created:** [April 7, 2023, 4:20pm UTC](https://meta.discourse.org/t/changing-hostname/260954 "2023-04-07T16:20:24Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![ibahnasy](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ibahnasy/32/301452_2.png) [@ibahnasy](https://meta.discourse.org/u/ibahnasy)\
**Post date:** [April 7, 2023, 4:20pm UTC](https://meta.discourse.org/t/changing-hostname/260954/1 "2023-04-07T16:20:24Z")

</div>

I exported a bit old version of Discourse container and the Discourse docker files from a running instance and imported it on a different server.  
I need to change Discourse hostname to match the new server.

- Is there a way to make the new `DISCOURSE_HOSTNAME:` effective without a rebuild?
- If I must rebuild, will that fetch the latest version from `main` branch and override the current version I have? because I need run exactly the current version.

---

_[View the full topic](https://meta.discourse.org/t/changing-hostname/260954)._
