as a string
"@myorg1" = "https://usertitle:password@registry.myorg.com/"
as an object with username/password
you can reference environment variables
"@myorg2" = { username = "myusername", password = "$npm_pass", url = "https://registry.myorg.com/" }
as an object with token
"@myorg3" = { token = "$npm_token", url = "https://registry.myorg.com/" }
* * *
Your `bunfig.toml` can reference environment variables. Bun automatically loads environment variables from `.env.local`, `.env.[NODE_ENV]`, and `.env`. See [Docs > Environment variables](../../../runtime/environment-variables/index.md) for more information.
bunfig.toml
[install.scopes] "@myorg3" = { token = "$npm_token", url = "https://registry.myorg.com/" }
* * *
See [Docs > Package manager](../../../pm/cli/install/index.md) for complete documentation of Bun’s package manager.
Was this page helpful?
[Suggest edits](https://github.com/oven-sh/bun/edit/main/docs/guides/install/registry-scope.mdx)[Raise issue](<https://github.com/oven-sh/bun/issues/new?title=Issue on docs&body=Path: /guides/install/registry-scope>)
[
Override the default npm registry for bun install
Previous
](../custom-registry/index.md)[
Using bun install with an Azure Artifacts npm registry
Next
](../azure-artifacts/index.md)