Changing Domain

This article assumes you used either Azure deployment or BTCPay Docker deployment.

Let's assume I used Azure. After initially deploying, I get an invalid certificate (this is normal during setup):


To get a valid certificate, I need to change my server address from to

Setting up your DNS record

First, I bought my domain name from a registar. (I use because they are awesome.)

Once I got the domain name, I can access it in the Domains menu:


So I click on my new domain, then go to the DNS Records menu, then I click Add:


Here I want to make sure will resolve to the same IP address as We call this a CNAME record.

So I fill out:

Type: "CNAME",
Name: "tothemoon",
Hostname: "" !! DO NOT FORGET THE '.' !!

Then I click 'Create'. (Note that if you want to point directly to an IP address instead, you would use a type A record.)

Congratulations! Now let's set it up on the other side, the BTCPayServer host.

From your browser

  • Visit

  • Log in as an administrator, which is typically the first account created on the server.

  • Enter new hostname and click 'Update'.


I wait a bit and go to - Success!


From the command line

I connect to my server via:


I enter the Password I chose during the Azure Wizard setup.

sudo su -