---
title: How do I rename a Droplet or change its hostname?
description: To rename your Droplet, change the Droplet&#39;s name in the control panel, then change its hostname from the command line using `hostnamectl` or by …
product: Support
url: https://docs.digitalocean.com/support/how-do-i-rename-a-droplet-or-change-its-hostname/
last_updated: "2023-09-27"
---

> **For AI agents:** The documentation index is at [https://docs.digitalocean.com/llms.txt](https://docs.digitalocean.com/llms.txt). Markdown versions of pages use the same URL with `index.html.md` in place of the HTML page (for example, append `index.html.md` to the directory path instead of opening the HTML document).

# How do I rename a Droplet or change its hostname?

To rename your Droplet, you need to change the Droplet’s name in the control panel. This changes the Droplet’s display name in the control panel and updates its rDNS record, but it doesn’t automatically update the hostname in the Droplet’s operating system. To change its hostname, you can either use `hostnamectl` or edit `/etc/hostname` and `/etc/hosts` manually.

## Rename the Droplet

To rename the Droplet in the [DigitalOcean Control Panel](https://cloud.digitalocean.com?utm_source=docs-agent&utm_medium=md), log in and then click the Droplet you want to rename. In the Droplet detail window, click the name of the Droplet. Enter the new name in the entry field, then click the check mark to save it.

Alternatively, to rename the Droplet from the command line, use [`doctl compute droplet-action rename`](https://docs.digitalocean.com/reference/doctl/reference/compute/droplet-action/rename/index.html.md).

## Change the Droplet’s Hostname

To update the Droplet’s hostname, use the hostname utility `hostnamectl`:

```shell
hostnamectl set-hostname use_your_new_hostname
```

If `hostnamectl` is not available on your Droplet, you can instead edit the `/etc/hostname` and `/etc/hosts` files. Open both files with `sudo` privileges, then replace any instances of the Droplet’s old hostname with the new hostname. After you save the files, reboot the Droplet to make the changes take effect.

You can use the `hostname` command to display the Droplet’s current hostname and verify the change.

## Related Topics

[How do I fix a "system not initialized" error on multi-GPU Droplets?](https://docs.digitalocean.com/support/how-do-i-fix-a-system-not-initialized-error-on-multi-gpu-droplets/index.html.md): Make sure NVIDIA Fabric Manager is running and has the same version number as the GPU drivers.

[Why am I getting a Droplet autoscale pool error?](https://docs.digitalocean.com/support/why-am-i-getting-a-droplet-autoscale-pool-error/index.html.md): There may be an issue with the autoscale pool or Droplet configuration, the VPC network’s size, or resource limits on the team or datacenter.

[How to Troubleshoot Load Balancer Health Check Issues](https://docs.digitalocean.com/support/how-to-troubleshoot-load-balancer-health-check-issues/index.html.md): Health checks often fail due to firewalls or misconfigured backend server software.