In development, activation emails are arriving with bad URL

(Jason May) #1

I’m running Discourse in development mode using foreman start which by default runs on port 5000.

When I create a new user account, the activation email contains a link with localhost:3000.

Those default emails should use the domain/port where the server is running, which might be localhost:5000 or something else if local domain routing is set up (I’m using Cutting & pasting the path is an inconvenience.

This might be in a config file somewhere, but it should sense this automatically.

(Kane York) #2

Try setting the DISCOURSE_HOSTNAME environment variable to discourse.local. It’ll need to be set for all of the processes, especially Sidekiq.

If that fails, copy discourse_quickstart.conf to discourse.conf and set hostname=discourse.local in there.