Hey, n8n is unable to connect to my ftp server. I am able to connect to the ftp server using filezilla. When I ssh into my docker container that is hosting n8n, I am able to ping my ftp server.
What is the error message (if any)?
Couldn’t connect with these settings
Timeout while connecting to server
Please share your workflow
Share the output returned by the last node
No output, only a error message in the creating credential popup.
Information on your n8n setup
n8n version: 2.33.3
Database (default: SQLite): Postgress
n8n EXECUTIONS_PROCESS setting (default: own, main): Did not set so i assume own.
Running n8n via (Docker, npm, n8n cloud, desktop app): Docker on Ugreen
Which FTP server are you using and is it doing plain FTP or one of the FTPS variants? We don’t currently support FTPS so it could be that this is the issue, Generally I tend to prefer SFTP if it is an option it could be a quick solution to get you up and running.
Ping only shows that the host is accessible, but it doesn’t test the FTP port. Try this from inside the box:
nc -zv your-ftp-host 21
If that works but the node times out, it’s passive mode. FTP opens a second connection on a random high port for data, and FileZilla handles that fine from your machine while the container often can’t, because the server hands back an IP address that the container can’t reach.
It’s also worth checking what achamm mentioned, isn’t it? N8N_RESTRICT_FILE_ACCESS_TO affects local file paths rather than outbound connections, so it wouldn’t cause a connection timeout.
Hi @SenAlasca
“Timeout while connecting to server” fires before the server’s 220 greeting arrives, so the socket opened and n8n’s FTP client hit its 10 second control-connection limit with nothing coming back. That 10 seconds is hardcoded in the credential test, which is why the popup keeps failing regardless of what you change in it.
Save the credential despite the banner, then on the FTP node set Options > Timeout to 60000. The option only applies to the node, not to the test.
If it connects there, the server is stalling on a reverse DNS and ident lookup of the container’s 172.x address, which has no PTR record. On ProFTPD: