auth icon indicating copy to clipboard operation
auth copied to clipboard

how to set GOTRUE_MAILER_EXTERNAL_HOSTS

Open malko opened this issue 9 months ago • 4 comments

Trying to self host latest supabase version I can't send mail with the following error:

{"level":"info","msg":"Request received external host in X-Forwarded-Host or Host headers, but the values have not been added to GOTRUE_MAILER_EXTERNAL_HOSTS and will not be used. To suppress this message add the host, or sanitize the headers before the request reaches Auth.","time":"2025-03-27T00:50:35Z","x_forwarded_host":"mysupabase.hostname","x_forwarded_proto":"http"}

I tried to set the GOTRUE_MAILER_EXTERNAL_HOSTS env var inside the docker-compose.yml but still get this error whatever the value i'm passing in.

Can we please have some guidance on how to set this variable correctly to have invite mails sent ?

Originally posted by @malko in #1228

malko avatar Mar 27 '25 00:03 malko

According to my experience GOTRUE_MAILER_EXTERNAL_HOSTS is correct.

Just make sure to only keep host name in the filed value, http schema should be removed.

alex-guoba avatar Apr 22 '25 11:04 alex-guoba

@malko I get the same thing when I log in with social networks

rindev0901 avatar May 12 '25 02:05 rindev0901

Anybody managed to solve this? I am having same problem and tried same resolutions

tturekbspl avatar Jul 24 '25 13:07 tturekbspl

Anybody managed to solve this? I am having same problem and tried same resolutions

my mistake was configuring the following base url for the gate way which led to that

rindev0901 avatar Jul 24 '25 13:07 rindev0901