Workers - Work across multiple accounts with Wrangler auth profiles
- Announced
- Tags
- Workers
- Severity
- info, set by
reef/rss-rule-v1 - Source
- https://developers.cloudflare.com/changelog/post/2026-07-02-wrangler-auth-profiles/
<p><a href="https://developers.cloudflare.com/workers/wrangler/">Wrangler CLI</a> now supports auth profiles: named logins that you scope to specific Cloudflare accounts and switch between automatically, based on the directory you are working in.</p> <p>A profile is a named OAuth login bound to a directory. Commands run in that directory, and its subdirectories, use the matching account — so you can move between accounts without re-running <code>wrangler login</code>.</p> <p>Use profiles to keep a separate login for each client when working at an agency, or to separate staging and production into different accounts. Pair a profile with an <code>account_id</code> in your <a href="https://developers.cloudflare.com/workers/wrangler/configuration/">Wrangler configuration file</a> so a command cannot reach the wrong account.</p> <figure class="nb-code-figure" data-nb-lang="sh"><pre class="astro-code astro-code-themes github-light github-dark nb-shiki-c6xiwz" tabindex="0" data-language="sh" data-nb-lang="sh"><code><span class="line"><span class="nb-shiki-21nrsd"># Create a profile for each account, choosing which accounts it can reach</span></span> <span class="line"><span class="nb-shiki-1t8gfj">wrangler</span><span class="nb-shiki-mdbnqw"> auth</span><span class="nb-shiki-mdbnqw"> create</span><span class="nb-shiki-mdbnqw"> client-a</span></span> <span class="line"><span class="nb-shiki-1t8gfj">wrangler</span><span class="nb-shiki-mdbnqw"> auth</span><span class="nb-shiki-mdbnqw"> activate</span><span class="nb-shiki-mdbnqw"> client-a</span><span class="nb-shiki-mdbnqw"> ~/clients/client-a</span></span> <span class="line"></span> <span class="line"><span class="nb-shiki-1t8gfj">wrangler</span><span class="nb-shiki-mdbnqw"> auth</span><span class="nb-shiki-mdbnqw"> create</span><span class="nb-shiki-mdbnqw"> client-b</span></span> <span class="line"><span class="nb-shiki-1t8gfj">wrangler</span><span class="nb-shiki-mdbnqw"> auth</span><span class="nb-shiki-mdbnqw"> activate</span><span class="nb-shiki-mdbnqw"> client-b</span><span class="nb-shiki-mdbnqw"> ~/clients/client-b</span></span></code></pre></figure> <p>Use the <code>--profile</code> flag to run a single command with a specific profile:</p> <figure class="nb-code-figure" data-nb-lang="sh"><pre class="astro-code astro-code-themes github-light github-dark nb-shiki-c6xiwz" tabindex="0" data-language="sh" data-nb-lang="sh"><code><span class="line"><span class="nb-shiki-1t8gfj">wrangler</span><span class="nb-shiki-mdbnqw"> deploy</span><span class="nb-shiki-dzsirb"> --profile</span><span class="nb-shiki-mdbnqw"> personal</span></span></code></pre></figure> <p>In CI and other automated environments, <code>CLOUDFLARE_API_TOKEN</code> still takes precedence over all profiles.</p> <p>For setup, the resolution order, and the full command reference, refer to <a href="https://developers.cloudflare.com/workers/wrangler/profiles/">Authentication profiles</a>.</p>
The text above is the source's. reef added the severity, the dates it could read from the text, and the endpoints and scopes named in code.