# 如何在重启 EC2 实例后更新 IP 主机名？

**URL:** <https://meta.discourse.org/t/how-to-update-ip-hostname-after-restart-ec2-instance/115852>\
**Category:** Support\
**Created:** [2019年四月24日 13:17 UTC](https://meta.discourse.org/t/how-to-update-ip-hostname-after-restart-ec2-instance/115852 "2019-04-24T13:17:36Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![syahir10\_syahir](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/syahir10_syahir/32/139183_2.png) [@syahir10\_syahir](https://meta.discourse.org/u/syahir10_syahir)\
**Post date:** [2019年四月24日 13:17 UTC](https://meta.discourse.org/t/how-to-update-ip-hostname-after-restart-ec2-instance/115852/1 "2019-04-24T13:17:36Z")

</div>

Hi, i am upgrading the ec2 instance, and i have seen I haven’t comfigured elastic ip when creater instance, since after restart, the ip will get chance, my question is, how could i update the new ip on my discourse? So it wont get offline?

---

<div class="post-metadata">

**Author:** ![Stephen](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/stephen/32/95011_2.png) [@Stephen](https://meta.discourse.org/u/Stephen)\
**Post date:** [2019年四月24日 14:11 UTC](https://meta.discourse.org/t/how-to-update-ip-hostname-after-restart-ec2-instance/115852/2 "2019-04-24T14:11:31Z")

</div>

The dynamic addresses aren’t really intended for publishing. You can configure an [Elastic IP](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html) and point DNS at that.

---

<div class="post-metadata">

**Author:** ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)\
**Post date:** [2019年四月24日 14:21 UTC](https://meta.discourse.org/t/how-to-update-ip-hostname-after-restart-ec2-instance/115852/3 "2019-04-24T14:21:58Z")

</div>

Like @Stephen said, you should go ahead and set up elastic ip, but whatever you do, you just need to update your DNS with the new ip number.

---

<div class="post-metadata">

**Author:** ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)\
**Post date:** [2022年八月1日 17:47 UTC](https://meta.discourse.org/t/how-to-update-ip-hostname-after-restart-ec2-instance/115852/4 "2022-08-01T17:47:09Z")

</div>



---

<div class="post-metadata">

**Author:** ![Stephen](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/stephen/32/95011_2.png) [@Stephen](https://meta.discourse.org/u/Stephen)\
**Post date:** [2022年八月1日 18:56 UTC](https://meta.discourse.org/t/how-to-update-ip-hostname-after-restart-ec2-instance/115852/5 "2022-08-01T18:56:20Z")

</div>


