Confirmation email has activation link to LAN instead of Domain

Operating system

Linux

Joplin version

3.7.1

What issue do you have?

I'm setting up a Joplin Server in a Container on a QNAP NAS.
I can log in to the Joplin Server as user and as admin.
However, when logging in, it sends an email for Joplin account activation, and this email has an activation link; this link is to a local LAN IP address.
The QNAP does have an external domain, and when I login from a browser, it is to the external domain. The container does have APP_BASE_URL set with the complete external URL and port.
So, how come the Joplin Node.js code is insisting on using a local IP when building the activation email?
In my case, internet is via my router having 192.168.178.1, which forwards the used port to QNAP having 192.168.178.211, which has a QNAP Container in a separate subnet having 172.29.0.3.
The activation link points to 192.168.178.211, which responds with invalid domain error, which is correct because APP_BASE_URL points to the external domain.
How can I troubleshoot this problem?