Have you set up SSL correctly? If you prefer to do it manually, the following links might help you:
The simplest method is to use the ERPNext quick install script:
Keep in mind that the automatically created SSL certificate will expire every three months. You should set up a cron job to renew it automatically.
Login as root or a user with superuser privileges, run crontab -e and enter:
# renew letsencrypt certificates on 1st monday of every month and get an email if it gets executed
MAILTO="myname@email.com"
0 0 1 1-12 * [ "$(date '+\%a')" = "Mon" ] && sudo service nginx stop && /opt/certbot-auto renew && sudo service nginx start