Where Does Netlify CLI Store Config and Tokens?
Netlify CLI global config and per site linked state, split between home and project.
Last updated
The Netlify CLI splits state in two. Global auth tokens and preferences live in a config.json under ~/.netlify in your home. Per site links, deploy state and function state live in a .netlify folder inside each project directory instead.
That split decides backups. The home file migrates your identity, while each project's link must travel with its repo or be recreated with netlify link. Tokens in the global file deserve credential handling, since they deploy to your sites from anywhere.
Where Netlify CLI stores this, by platform
~/.netlify/config.json
Holds config.json with the auth token plus telemetry state. Copy with no netlify commands running. Project .netlify folders stay inside each repo and are safe to delete and re link.
~/.netlify/config.json
Same path and split as Linux. The global file plus per project links copy cleanly between the two platforms with no path adjustments.
%USERPROFILE%\.netlify\config.json
Same role as on Unix for the Windows CLI builds. Keep the token file out of synced folders unless you accept deploy credentials roaming with your profile.
Frequently asked questions
how do i move netlify cli auth to a new computer
Copy ~/.netlify/config.json to the new machine, then re link each site with netlify link. Global auth travels in the file while site links live per project, so both steps matter for a working setup.
can netlify cli auth without a config file
Yes. NETLIFY_AUTH_TOKEN outranks the config file, which suits CI jobs and shared runners. Keep the file for interactive use and tokens in the environment where logs might leak.
Notice an outdated path? Let us know.