I guess these may be good places to start exploring
https://frappeframework.com/docs/user/en/bench/guides/lets-encrypt-ssl-setup