-
Notifications
You must be signed in to change notification settings - Fork 339
Description
Describe the bug
When starting Supabase with npx supabase start, custom Auth email templates configured via auth.email.template.* sometimes fall back to the built-in default templates.
This happens if Auth (GoTrue) starts before Kong’s template endpoint (:8088) is ready. Auth logs connection errors, loads default templates, and continues using them even after Kong becomes healthy. Custom templates are only applied after manually restarting the Auth container.
To Reproduce
- Configure custom email templates using
auth.email.template.*withcontent_pathinsupabase/config.toml - Run
npx supabase start - Trigger a signup confirmation email
- Observe that the default Supabase confirmation email is sent
- Restart the Auth container:
docker restart supabase_auth_<project> - Trigger the signup email again
- Observe that the custom email template is now used
Expected behavior
Auth should:
- Retry loading email templates once Kong becomes available, or
- Wait for Kong’s template endpoint to be reachable before initializing templates, or
- Reload templates dynamically instead of caching fallback defaults permanently
Custom email templates should be applied consistently after startup.
Screenshots
Not applicable. Issue reproduced via logs and Mailpit HTML email inspection.
System information
-
Ticket ID: not available (issue occurs during startup, not a CLI command failure)
-
Version of OS: Linux
-
Version of CLI:
2.70.5 -
Version of Docker: Docker Engine 25.x
-
Versions of services: output of
npx supabase serviceskong, auth, db, rest, realtime, storage, studio, inbucket, analytics, edge-runtime
Additional context
Relevant Auth startup logs:
{"error":"templatemailer: template type \"confirmation\": Get \"http://supabase_kong_<project>:8088/email/confirmation.html\": dial tcp 172.18.0.5:8088: connect: connection refused","event":"templatemailer_template_body_http_error","level":"error","mail_type":"confirmation","time":"2025-12-29T00:26:28Z"}
Later in the same run:
supabase_kong_<project>is healthywget http://supabase_kong_<project>:8088/email/confirmation.htmlworks from inside both Kong and Auth containers- Emails are still sent using default templates
Workaround
docker restart supabase_auth_<project>