Docs / Server Management / How to Change the Hostname of Your Server

How to Change the Hostname of Your Server

By Admin · Feb 25, 2026 · Updated Apr 24, 2026 · 537 views · 1 min read

The hostname identifies your server on the network. You can change it after deployment.

Temporary Change

hostname new-hostname

Permanent Change

hostnamectl set-hostname new-hostname

Then update /etc/hosts:

127.0.0.1 localhost
127.0.1.1 new-hostname

Verify

hostname
hostnamectl

Was this article helpful?