Can't change JWT secret on self-hosted Supabase instance #19560
Replies: 2 comments 1 reply
-
Same problem here. Starting up using Looking for it now multiple days. Dont get it. |
Beta Was this translation helpful? Give feedback.
-
I'm still in the testing phase of supabase so I have only been running things in a sparse manner with a single table. I updated my JWT_SECRET and it was not automatically picked up by the docker services. How I fixed this was by doing the following:
ALTER DATABASE postgres SET "app.settings.jwt_secret" TO "<your_secret_here>";
|
Beta Was this translation helpful? Give feedback.
-
I'm a bit confused. I changed the JWT_SECRET, ANON_KEY, SERVICE_ROLE_KEY in the .env file and restarted Supabase using Docker Compose as described in documentation:
However, the old JWT tokens (both anon and user's) are still valid. Do the .env variables only get used once to initialize the database and some internal states? Is there a way to update the JWT Secret?
Beta Was this translation helpful? Give feedback.
All reactions