is changing an environment variable require redeployment?
Answered
Ghost ant posted this in #help-forum
Ghost antOP
Do I have to trigger deploy when changing/add an environment variable?
Answered by joulev
on vercel: yes
if you self-host via
if you self-host via
next start
: yes if that's a NEXT_PUBLIC
variable, likely no otherwise8 Replies
on vercel: yes
if you self-host via
if you self-host via
next start
: yes if that's a NEXT_PUBLIC
variable, likely no otherwiseAnswer
but to be 100% sure, it's best to always redeploy on env var change if possible
Ghost antOP
I have to redeploy
But when redeploying can I check the “use existing building cache†checkbox? Or the building cache doesn’t include the environment variables?
yes
you can check the use existing cache
it's not related to env vars
though of course, if it somehows falls into some obscure edge case and your site still misbehaves, you can redeploy again with cache disabled. i doubt this can ever happen though