https://registry.npmjs.org. You can configure a different default registry or use per-scope registries for private packages — in both bunfig.toml and .npmrc.
Default registry
Set a custom default registry inbunfig.toml:
Scoped registries
Route packages under a specific@scope to a different registry:
Private registries
GitHub Packages
Verdaccio (self-hosted)
Azure Artifacts
.npmrc compatibility
Bun also reads.npmrc files, so existing npm configurations work without changes.
Set the default registry
Set a scoped registry
Authentication
_authToken, username, _password, _auth, email.
We recommend migrating
.npmrc to bunfig.toml for access to Bun-specific configuration options.Logging in
To authenticate with a registry interactively, usebunx npm login: