Unable to connect with NocoDB in localhost

Describe the issue/error/question

Hello Everyone!,

I’m have been trying to connect with NocoDB locally. Both instances(n8n and nocodb) are running in a docker in localhost. I’m sure the nocodb running in port 8080 and it is accessible(tested with curl request able to get records from DB). When executing workflow from n8n, nocodb node says unable to fetch project details.

Please assist with this issue.

What is the error message (if any)?

I have inspected the browser fetch request,

  1. Error while fetching projects! 2. Error while fetching tables!
    Yes, I have followed the credentials setup from documentation(both auth token and API token used) I’m pretty sure the credentials are valid.

Information on your n8n setup

  • **n8n version:0.218.0

  • **Database you’re using (default: SQLite):default

  • **Running n8n with the execution process [own(default), main]:default

  • **Running n8n via [Docker, npm, n8n.cloud, desktop app]:docker and localhost

Hey @Sridharan_G,

Assuming n8n and NocoDB are in their own containers what address are you using in n8n to access the container as localhost would be local to the container not the host and probably won’t work.

I would maybe try something like assuming default networks for both containers.

Hello @Jon

Thanks for the quick reply.
Yes, n8n and nocoDB are running in separate containers. I’m not getting the “what address are you using in n8n to access the container as localhost”.

As far as I’m running the docker-compose.yml

both are running locally, are you saying they can’t communicate? if yes how could I proceed further?

Hey @Sridharan_G,

In n8n if you are setting the NocoDB host to localhost it won’t work as NocoDB is not running on the n8n container at the localhost address.

Localhost is typically which will be itself so localhost on n8n, NocoDB and your host machine all point to a different thing. When you use docker it does some networking machine which allows docker to listen on the hosts localhost address and it will pass the connections to the containers.

This doesn’t do it for the containers though as they are treated as their own separate space so instead you would need to use the address which is the default docker network or use the containers name / ip if you have docker configured for that.

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