This guide applies to FreeBSD 12 and earlier.
When creating a new Vultr VPS, you can set the Server Hostname before deployment. If you skip this step or decide to rename your server later, you'll discover that changing the server hostname from the Customer Portal also performs a fresh reinstall of the entire server.
Follow this guide if you need to change the server hostname without reinstalling.
This guide uses olddog for the old hostname and newtricks for the new hostname.
Check the hostname with
$ hostname olddog
Change the hostname to newtricks using a text editor:
Test your change with
$ hostname newtricks
Your server hostname is changed and ready to use. This procedure does not change your DNS name, and you'll need to perform those steps at your domain registrar.