Why does one need a hostname for its VPS?
The hostname of the VPS is basically its name, when it comes to resolving it through the internet. The installed CyberPanel resolves from the VPS’s IP allowing the user to access it freely. However it is not secured and as such, it is vulnerable. Choosing a hostname for the VPS will allow for the installation of a SSL certificate, thus allowing secured connection to the hosting panel.
The best practice is to set the hostname as a subdomain of the main domain. For example, if the main domain in your panel is example.com, the subdomain can be hostname.example.com. After CyberPanel is installed hostname.example.com can be created within it. Pointing hosting in the top level domain’s DNS zone to the panel’s IP will allow for the installation of SSL, from the panel itself. It issues Let’s Encrypt’s free SSL. After that CyberPanel will be accessible through https://hostname.example.com:8090. More on how to create the subdomain and issue SSL can be found here.
Furthermore, following several simple steps, the port 8090 can be closed and all requests will be handled through the hostname itself on SSL port 443. That will make accessing the panel really hard, without knowing the hostname value. More about how to disable port 8090 can be found here.
The hostname can be easily set during the VPS purchase: