"Reset Password" email dashboard url

System Information
  • Strapi Version: 4.1.12
  • Operating System: Ubuntu 20.04
  • Database: SQLite
  • Node Version: 16.15.1
  • NPM Version: 8.11.0
  • Yarn Version: 1.22.19

Hi

I have Strapi running running on a server on port 8000 and have a nginx that makes it available on https://strapi.mydomain.com.

When I click the “Forgot password” on the login page and am getting the password recovery email, the link inside is http://localhost:8000/admin/auth/reset-password?code=.... But I want the link to be https://strapi.mydomain.com/admin/auth/....

I tried setting STRAPI_URL=https://strapi.mydomain.com in the .env file but that didn’t help.

Any ideas?

3 Likes

Hi Michel,

You need to give a value to “url” global variable, in your server.js file. the value should be an environment variable, and is generally composed by “HOST” and “PORT”, or another variable containing the whole url as you can see on the screenshot.

image