{
"$type": "site.standard.document",
"bskyPostRef": {
"cid": "bafyreiexly2d7owx2ncll5tu5vipmobhj2jqzxjmyilojjxvvdbnklv4k4",
"uri": "at://did:plc:pgryn3ephfd2xgft23qokfzt/app.bsky.feed.post/3mec3h7mmpap2"
},
"path": "/t/n8n-on-hugging-face-space-getaddrinfo-enotfound-api-telegram-org-connection-error/163348?page=2#post_22",
"publishedAt": "2026-02-07T17:19:41.000Z",
"site": "https://discuss.huggingface.co",
"tags": [
"docker.n8n.io/n8nio/n8n:latest"
],
"textContent": "I found workaround for this. Use Google DNS 8.8.8.8 instead..\n\nI set it up on Dockerfile (I am free tier), if you are pro then it might be easier for you.\n\nFor whoever hosted n8n on hf space, you need to use multi-stage build.\n\n> #STEP 1: Borrow tools from a standard Alpine image since n8n doesn’t have it.\n> FROM alpine:latest AS tool-provider\n> RUN apk add --no-cache su-exec\n>\n> #STEP 2: Build the final n8n image\n> FROM docker.n8n.io/n8nio/n8n:latest\n> USER root\n>\n> #Create the entrypoint script\n> RUN printf ‘#!/bin/sh\\n\n> echo “nameserver 8.8.8.8” > /etc/resolv.conf\\n\n> echo “nameserver 8.8.4.4” >> /etc/resolv.conf\\n\n> echo “DNS successfully set to 8.8.8.8”\\n\n> exec su-exec node n8n start\\n’ > /docker-entrypoint.sh &&\n> chmod +x /docker-entrypoint.sh\n>\n> [whatever you have in put it here. ie. ENV, custom run script, etc.]\n> ENV N8N_PROXY_HOPS=1 #To avoid ValidationError: The ‘X-Forwarded-For’ header is set but the Express ‘trust proxy’ setting is false (default).\n>\n> #Final switch to root for the entrypoint\n> USER root\n> ENTRYPOINT [“/bin/sh”, “/docker-entrypoint.sh”]\n\nOn container runtime log, you should see “DNS successfully set to 8.8.8.8” as it successfully started n8n and use google dns\n\nTested with discord worked.",
"title": "N8n on Hugging Face Space: getaddrinfo ENOTFOUND api.telegram.org Connection Error"
}