Search code examples
pythonnginxerpnextfrappe

Welcome emails sent by Frappe framework are missing the port number


When using Frappe framework and changing the Nginx port from 80 to 8002 to avoid conflicts, I get broken URLs in all emails sent by the system. The port was changed using bench set-nginx-port 8002. The ports 80 and 8000 are already busy in the VPS.

While I access the system using hostname:port_number, I get all emails as hostname/the-rest-of-url.

The same issue was reported on frappe.io and GitHub, but it's unclear how to solve it.

How can I solve this? Thank you in advance!


Solution

  • Open site_config.json and write "hostname":"http://<your_hostname>:<your-port-number>". For example:

    {
     "db_name": "your_db_name",
     "db_password": "your_db_password",
     "db_type": "your_db_type",
     "hostname": "http://your_host_name:port_number"
    }