# Renaming DO droplet and Ubuntu hostname

**URL:** https://meta.discourse.org/t/renaming-do-droplet-and-ubuntu-hostname/191237
**Category:** Support
**Created:** [May 21, 2021, 9:01pm UTC](https://meta.discourse.org/t/renaming-do-droplet-and-ubuntu-hostname/191237 "2021-05-21T21:01:22Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Jonathan5](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jonathan5/32/197134_2.png) [@Jonathan5](https://meta.discourse.org/u/Jonathan5)
#### Post date: [May 21, 2021, 9:01pm UTC](https://meta.discourse.org/t/renaming-do-droplet-and-ubuntu-hostname/191237/1 "2021-05-21T21:01:22Z")

</div>

My Digital Ocean droplet has a long name including “…1vcpu-1gb-…”. Now that I’ve resized the droplet from its humble beginnings, that’s no longer accurate. I’d like just to call it “Discourse”. Apart from changing it on the Digital Ocean web interface, what else do I need to do?

I think I’d also need to

1. `sudo hostnamectl set-hostname Discourse`
2. `sudo nano /etc/hosts` to edit the first line to say `127.0.1.1 oldname newname` (i.e. `127.0.1.1 ...1vcpu-1gb-... Discourse`).

Anything else? Thanks.

---

<div class="post-metadata">

### Author: ![Jonathan5](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jonathan5/32/197134_2.png) [@Jonathan5](https://meta.discourse.org/u/Jonathan5)
#### Post date: [May 27, 2021, 12:48pm UTC](https://meta.discourse.org/t/renaming-do-droplet-and-ubuntu-hostname/191237/2 "2021-05-27T12:48:45Z")

</div>

Just a quick update - I did the above, and nothing else, and don’t seem to have broken anything 🙂

---

<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: [May 27, 2021, 3:37pm UTC](https://meta.discourse.org/t/renaming-do-droplet-and-ubuntu-hostname/191237/3 "2021-05-27T15:37:31Z")

</div>

That should be fine. The most “proper” thing to do is to make the droplet name your hostname so that reverse ip lookups work. The machine’s notion of its hostname doesn’t matter much if you’re running just discourse.

---

<div class="post-metadata">

### Author: ![Jonathan5](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jonathan5/32/197134_2.png) [@Jonathan5](https://meta.discourse.org/u/Jonathan5)
#### Post date: [May 27, 2021, 3:57pm UTC](https://meta.discourse.org/t/renaming-do-droplet-and-ubuntu-hostname/191237/4 "2021-05-27T15:57:52Z")

</div>

Thanks. I’ve ended up making my hostname the same as my droplet name - “Discourse” - (ie the other way round) so hopefully that has the same effect 🙂

---

<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: [June 26, 2021, 3:58pm UTC](https://meta.discourse.org/t/renaming-do-droplet-and-ubuntu-hostname/191237/5 "2021-06-26T15:58:38Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
