---
number: 32635
slug: 32635-use-a-custom-npm-registry-for-edge-function-dependencies
published: 2025-01-07
discussion: https://github.com/orgs/supabase/discussions/32635
labels:
  - edge functions
page: https://supabase.com/changelog/32635-use-a-custom-npm-registry-for-edge-function-dependencies
---

# Use a custom NPM registry for Edge Function dependencies

Some organizations require using all modules from a private NPM registry for security and compliance reasons. Edge Functions now supports configuring a private registry to load all NPM modules using the `NPM_CONFIG_REGISTRY` environment variable.

You can define a private registry in the project's `.env` file or directly specify it when running the deploy command:

```bash
NPM_CONFIG_REGISTRY=https://custom-registry/ supabase functions deploy my-function

```

You will need Supabase CLI  version 2.2.8 or higher to use this feature.

Note that Edge Functions also supports [importing private NPM packages](https://supabase.com/docs/guides/functions/import-maps#importing-from-private-registries) (which can be published on any registry).

Check the [Managing dependencies](https://supabase.com/docs/guides/functions/import-maps#using-a-custom-npm-registry) guide to learn more about how to configure and use external dependencies in your Edge Functions.
