Local docker n8n and Supabase not authorized

Describe the problem/error/question

What is the error message (if any)?

Please share your workflow

(Select the nodes on your canvas and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow.)

Share the output returned by the last node

Information on your n8n setup

  • n8n version: 1.82.3 latest
  • Database (default: SQLite):Postgres
  • n8n EXECUTIONS_PROCESS setting (default: own, main):own
  • Running n8n via (Docker, npm, n8n cloud, desktop app):Local Docker
  • Operating system: OSX

I have n8n running locally in a Docker container and cannot get the Supabase API authentication working and configured. I have read a lot of posts and watched a ton of videos.

  • Have recreated the JWT, Anon and Service Role Key. Made sure they are no spaces on either side
  • n8n and supabase are on the same docker network. Both can pin each other using IP and Name, including container name.
  • I have tried all kinds of combinations for the Host
    http://host.docker.internal:8000
    http://<IP_Address>:8000
    http://supabase-kong:8000
    All variations wit /rest/v1/. and /project/default/rest/v1

In all cases I get unauthorized in the n8n UI and

172.18.0.1 - - [17/Mar/2025:23:58:10 +0000] “GET /rest/v1/ HTTP/1.1” 401 52 “-” “n8n” from the supabase-kong server

Setting up authentication from n8n to the Supabase db works fine.

Have restarted all the Supabase containers multiple times.

I was able to pinpoint the issue. The issue was the supabase Docker container was not starting with the correct .env file. I was able to pinpoint this by testing with Curl first from my Mac to the Supabase container where I got unauthorized again.

I then ran docker exec -it supabase-kong env | grep SUPABASE to get the key the container was expecting which showed the one from the example file.

I had to docker compose up -d from the container directory to get it too use the correct .env. I then confirmed again with docker exec -it supabase-kong env | grep SUPABASE the API key matched. After that it worked in n8n.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.