cli icon indicating copy to clipboard operation
cli copied to clipboard

self-hosting using a nexus proxy on air-gapped box

Open ahadda5 opened this issue 1 year ago • 4 comments

Describe the bug

CLI supabase bin is hardcorded to call public.ecr.aws.
In a linux ubuntu box with no direct internet access, where it only has access to a sonatype nexus server.

To Reproduce

Steps to reproduce the behavior, please provide code snippets or a repository:

  1. Ensure the nexus repo is setup . This is added to the registry of the .npmrc config file. Also ensure the nexus repo has all the libraries/folders that mirrors github.
    registry=https://your-nexus-repo strict-ssl=false
  2. Install supabase using npm(or pnpm) Make sure you ignore scripts as the postintall is also hardcoded to call github.
    npm install supabase --ignore-scripts
  3. Replace the hardcoded github.com value in postinstall.js to your-nexus-repo.
  4. Rerun the npm install supabase. This time the postinstall.js will use the nexus.
  5. Run > supabase start
  6. supbase bin will still try to reach out to "https://public.ecr.aws/v2/"

Is there perhaps a env variable supabase bin can use ?

Screenshots

If applicable, add screenshots to help explain your problem.

System information

  • OS: Ubuntu 22.4
  • Browser (if applies) [e.g. chrome, safari]
  • Version of supabase-js: 10.9.0
  • Version of Node.js: v22.12.0

Additional context

Add any other context about the problem here.

ahadda5 avatar Oct 13 '25 08:10 ahadda5

Pretty sure it's not what you want exactly, but if it's of any urgency you can quickly change this line of code here and rebuild the cli

// Defaults to Supabase public ECR for faster image pull
const defaultRegistry = "public.ecr.aws"

Here's what I got with a dummy Nexus value, I assume this is the functionality you're looking for

➜ cli git:(develop) ✗ ./supabase-test start
Starting database... failed to pull docker image: Error response from daemon: pull access denied for your-nexus-repo/supabase/postgres, repository does not exist or may require 'docker login': denied: requested access to the resource is denied Retrying after 4s: your-nexus-repo/supabase/postgres:17.6.1.021

peekknuf avatar Oct 13 '25 10:10 peekknuf

Moved over from supabase repo.

Hallidayo avatar Oct 19 '25 19:10 Hallidayo

@ahadda5 you can set the environment variable SUPABASE_INTERNAL_IMAGE_REGISTRY to pull images from your local registry. For instance:

SUPABASE_INTERNAL_IMAGE_REGISTRY=your-nexus-repo supabase start --debug

lhsvobodaj avatar Oct 24 '25 05:10 lhsvobodaj

Hi all, We’re going to close this one due to inactivity. Please feel free to reopen if you’re still having issues here or open a new issue.

Hallidayo avatar Apr 04 '26 13:04 Hallidayo