what I used was this explained for those who do not have access to the dashboard :
If the dashboard was using a domain that you no longer control and you want to switch it to a new domain, change it via the dashboard as mentioned here or if the dashboard is not reachable anymore do the following:
Run those commands to update the database records manually, make sure to change example.com in both:
mysql -uroot -ppassword box -e "UPDATE settings SET value='example.com' WHERE name='admin_domain'"
mysql -uroot -ppassword box -e "UPDATE settings SET value='my.example.com' WHERE name='admin_fqdn'"
Add an A record manually in your DNS provider for my.example.com to your server's IP
Run the command systemctl restart box
In a few minutes, you should be able to reach https://my.example.com. You may have to purge the site from your browser's history to get over HSTS certificate issues.