Question
Closed · Answered

Will a running service pick up a new API key after I update it?

Jen

I'd like to understand when environment variable updates take effect. If I change an API key in the Agent's settings, will new tasks and already-running scripts or development servers all switch to the new value?

If a restart is needed, can I restart just the relevant service rather than the whole sandbox? I'd like to avoid processes continuing to use the old key after I revoke it.

Report
Kelly
Team

An already-running script or development server does not automatically replace the environment variable it received at startup when you save a new API key in Buda Agent settings. A newly started Agent task reads the current settings; an old process may still hold the previous value or a cached client connection. Do not revoke the old key before checking which processes depend on it.

I would rotate in this order: save the new value under Agent Settings → Environment variables; start a new test task and verify a call succeeds; stop and restart each relevant server or script using its normal process controls; check a request from the restarted process; then revoke the old key and watch for authentication errors. For a service you started yourself, restarting that process is usually enough; you need not reboot the whole sandbox solely to update its environment. Also check scheduled tasks, background processes and connection pools that might retain old credentials. Do not print the full key to a terminal or chat just to test it.

The environment variable guide shows where to edit settings. Is this a third-party service key used by your Agent, or Buda's managed Agent identity credential? The latter should not be manually rotated as an ordinary variable. The Chinese discussion covers the same sequence.

Report

Your reply

Sign in to join the discussion. Reading is always open; you only need an account to post.

Sign in