Skip to main content
You can configure private registries in .npmrc or bunfig.toml. Both work; we recommend bunfig.toml for its Bun-specific options. To configure a registry for a particular npm scope:
bunfig.toml

Your bunfig.toml can reference environment variables. Bun automatically loads environment variables from .env.local, .env.[NODE_ENV], and .env. See Environment variables.
bunfig.toml

See bun install.