What exactly happens when "bench setup add-domain" command is used?

I have used this command in the past to assign a FQDN (domain name) to the primary site (site1.local) of an installation. I also used LetsEncrypt to give the site a security certificate.

Those things show up in the “site_config.json” file.

I now need to rename the site to another new domain name since the old URL is going to be sold and used in a different company now.

How can I clean the domain name references out of my erpnext installation so I can add a different name now?

That is why I am asking what exactly happens when the “bench setup add-domain” command is used. If anyone can tell me what gyrations the system goes through when that command is used, then I may be able to track down all previous refereneces to the old name and remove them.

What parts of the system are affected by the command?

As part of the conditions of the sale of the URL, I have to be able to clean all references to it out of my current system.

Are there any frappe bench programmers here that can give me some clues how the command works?

Or anyone with some knowledge around replacing a domain name in erpnext?

Thanks in advance


Hi again :smile:

bench setup add-domain code is here > bench/config/site_config.py

I guess it just command to config site_config.json file.

Thank you again!

This is the second use case in less than a week where I need to try to alter the domain name given to a erpnext server. This one is so they can sell off the URL and the first one is to cover running a second server asl a cloned image and not being able to run 2 servers with the same name.

A bit late tonight for me to mess with it, but I will be on this in the morning.

Thanks again. :grin: