I wanted to share the solution I found for the common license activation issue on n8n when running in a Docker container on a Synology NAS.
Problem:
When trying to activate the license, I kept getting:
Failed to register Community Edition: getaddrinfo EAI_AGAIN enterprise.n8n.io
Even though I could access the internet from the NAS and ping enterprise.n8n.io.
Root Cause:
The Docker container was unable to resolve the domain enterprise.n8n.io properly due to isolated DNS settings inside the container (potentially blocked or intercepted by AdGuard Home or local DNS). This prevented n8n from contacting the license server.
Solution:
Use extra_hosts in Docker Compose / Portainer stack to manually map the domain to its IPs:
Set public DNS in the container to ensure proper resolution of other domains:
dns:
- 1.1.1.1
- 8.8.8.8
Optional: Force IPv4 priority to avoid IPv6 resolution issues:
NODE_OPTIONS: "--dns-result-order=ipv4first"
Remove or comment out the variable N8N_HIDE_USAGE_PAGE if previously set, so that the Usage / License page is visible in the UI.
After applying these changes and redeploying the stack, the container could successfully reach enterprise.n8n.io, and I was able to activate my license via the Usage & Plan page.
Result:
n8n now runs with an active license.
Workflows and external API calls work normally.
No other functionality is affected.
I hope this helps anyone else struggling with license activation on Synology NAS Docker setups!