If you are self-hosting n8n automation and the NocoDB database on the same VPS server, you have likely run into confusing, intermittent connection errors. One of the most frustrating is the red error message getaddrinfo EAI_AGAIN occur in tasks that process customer or order information. This article will guide you through how to connect n8n with NocoDB directly through the internal Docker network, helping the system increase processing speed by 3 times and completely resolve this network error issue.

What Is the EAI_AGAIN Error in n8n and What Causes It?

Error EAI_AGAIN is actually a temporary response error from the DNS resolver server (DNS lookup timeout). When you configure n8n to connect to NocoDB through a public domain name, for example https://nocodb.localbrand.vn/, where Node.js running inside the n8n container must constantly send requests out to the internet to look up the IP address of this domain name.

Even a brief network congestion from the carrier lasting a few milliseconds, or a slow response from a DNS server (such as Cloudflare or Google), causes API calls to fail immediately. As a result, synchronized data workflows run unreliably, working intermittently and causing considerable frustration.

n8n nocodb integration

Connecting n8n with NocoDB via Docker Internal Network

Instead of taking a detour from the VPS out to the Internet and back into the VPS through an external secure HTTPS port, why don't we connect these two applications directly through Docker's virtual internal network? In this way, n8n can call the NocoDB container directly over standard HTTP while still ensuring maximum security, because the data flow never leaves the VPS.

This approach requires you to thoroughly understand how to organize the virtual networks of containers. You can refer to more detailed information at Docker Network documentation official documentation to better understand this local routing mechanism.

Real-World Case Study: Speed-Up Experience from a Fashion Local Brand

Take a look at a real-life story from a fashion brand in Vietnam. They use n8n to pull orders from KiotViet into an internal NocoDB database hosted on a dedicated VPS.

The system runs quite smoothly, but every 3-4 days a few orders get stuck due to an error EAI_AGAIN of the NocoDB Node. The technical team decided to reconfigure n8n to connect directly to the NocoDB container through the default Bridge network of Nginx Proxy Manager on the VPS.

Surprising results: not only did it end the stuck orders caused by DNS errors, but the execution time of database query tasks also dropped sharply, and response speed was 3 times faster than the previous approach of calling through a public domain name. Completely eliminating the SSL handshake also significantly freed up CPU performance for the server.

Steps to Configure Direct Connection Between n8n and NocoDB

To carry out this configuration, you need to access the command-line interface (Terminal) of your VPS and follow the detailed steps below:

Step 1: Find the Network Name and Container Name of NocoDB

First, run the command docker ps to identify the exact container name of NocoDB. Then, run the following command to find its Docker network name:

docker inspect -f '{{json .NetworkSettings.Networks}}' [ten_container_nocodb]

The results will display the networks that NocoDB is participating in, for example nginx-proxy-manager_default.

Step 2: Connect n8n and the Worker containers to the same network

Since major n8n versions typically run queue mode with separate Worker containers to process tasks, you need to run the network connection command for both the main container and the Worker containers:

docker network connect nginx-proxy-manager_default [ten_container_n8n_main]
docker network connect nginx-proxy-manager_default [ten_container_n8n_worker_1]
docker network connect nginx-proxy-manager_default [ten_container_n8n_worker_2]

Step 3: Change the Host address in the n8n login credentials

Now, you just need to open the NocoDB credentials configuration panel (Credentials) in the n8n web interface and change the address in the Host field from the external domain name to the internal URL:

http://[ten_container_nocodb]:8080/

Usage Notes http:// instead of https:// because direct internal Docker connections do not need to go through SSL encryption and should not, in order to maximize speed.

n8n nocodb integration

Conclusion

With just a few basic network configuration steps in Docker, you have made your automation system more resilient to network incidents and dramatically improved processing performance. If your business needs to build sales automation systems, large-scale data management, and VPS performance optimization, please refer to the solutions and Digital Marketing services comprehensive support from DPS.MEDIA to receive the most professional assistance

Ý kiến bạn đọc (9)

DPS SECURITY

Đăng nhập để bình luận

Đăng nhập nhanh 1-chạm bằng Google để chia sẻ ý kiến của bạn về bài viết.

duc_it
duc_it Experts 24/08/2026

We run n8n alongside NocoDB on a shared VPS. Until now, n8n has called them through their external address, so the order-sync workflow occasionally fails. Does switching to an internal Docker Network completely eliminate EAI_AGAIN, or does it only reduce how often the error occurs?

Mê Công Nghệ
Mê Công Nghệ 24/08/2026

Yes, this approach correctly addresses the root cause if the problem lies in DNS lookup. When two containers communicate directly over a Docker network, they no longer depend on external DNS, so the system is much more stable.

ktshoangdung
ktshoangdung 24/08/2026

It's also worth checking the container network configuration and service names. If NocoDB or the worker sits on a different network, changing the host alone is not enough; the containers must be placed on the same virtual network.

tranthidung1604
tranthidung1604 Experts 24/08/2026

I'm using n8n with multiple workers to process customer data. I'm not sure whether placing all the workers in the same Docker network as NocoDB would affect security or slow down the system.

Clouds
Clouds 24/08/2026

In practice, internal workflows are often safer because the data doesn't have to travel out over the internet. What matters is limiting access rights between containers and not opening unnecessary ports.

quangvinh92
quangvinh92 24/08/2026

We've already applied this to our sales system, and response speed has improved noticeably. The part that needs the most attention is updating the host in n8n credentials, which many people often edit by mistake.

Kỹ Sư Quèn
Kỹ Sư Quèn 24/08/2026

Agreed, internal Docker networking is the right direction when self-hosting. Reducing one external dependency makes operations much less of a headache.

Hai Lúa
Hai Lúa 24/08/2026

I used to think EAI_AGAIN was an n8n error, but it turns out most of the time it's the DNS resolution step. This article explains that real-world scenario quite accurately.

leminhlaw
leminhlaw 24/08/2026

May I ask whether this approach suits a small VPS, or is it only for systems with a lot of data? I'm running a few simple workflows.

Ready to scale your revenue with DPS.MEDIA?

Partnering with 5,400+ SMEs to optimize marketing costs, elevate brand authority, and automate growth with 2026 AI technology.