OK, for various reasons (including coronavirus) I have moved our backup server to my home and I don’t have a static IP. I’m probably going down a bit of a rabbit hole here but I came across the Virtualmin command-line interface for changing domain details. Seems promising.
So I tried
virtualmin modify-domain --domain main_domain.com --newdomain nredomain.dydns.com
but is said
‘Virtual server imain_domain.com does not exist.’
Which is odd because that’s definitely the main domain, its the one it says I should be using when I do to the servers IP in a browser.
So then i did ‘virtualmin list-domains’ and the main domain is not there ;(. So I guess modify-domain does not apply to the main domain.
So is there a way of changing the main domain using the virtualmin CLI?
I know this is only part of the puzzle but I can probably write a script that uses this command-line program to set the IP also.
Ben