The solution to the ports is creating entries in a station where you can have the reverse proxy service, the entries must point to the stations of your internal network that you want.
First we must go to the Contracted Domain Service and create the type A DNS records that point to the Public IP of your house:
DNS - A - erp.my-domain.com to My Public IP
I have a Synology NAS where I can create Reverse Proxy entries, it is in Application Portal / Reverse Proxy:
Origin: https://erp.my-domain.com
Destination: https://192.168.0.100 (example internal IP)
In the client stations (192.168.0.100) you must indicate the DNS name that points to localhost or 127.0.0.1
$ nano /etc/hosts
# ERPNext
# 127.0.0.1 erp.my-domain.com
Anyway I do not stop having problems with Python packages with each update, as well as with macOS updates, with which I receive XCode compatibility errors.
Overall, I’m going to spend the time learning how to install Frappe and ERPNext on Docker to avoid these things.