Issue with FTP/SFTP list files on Cloud vs local community version

Describe the problem/error/question

I’m trying to use the FTP node with an SFTP server, and specifically trying to list documents within a location. It seems to work fine when I test with a local version of n8n running npx n8n and copying my workflow to there with the same SFTP server credentials.

What is the error message (if any)?

There is no error message, just an empty output when I list SFTP directory files on n8n cloud, however when I run on the local n8n workflow, it lists the files correctly.

Please share your workflow

Share the output returned by the last node

[
  {}
]

Information on your n8n setup

Operating system: macOS 15.5 (24F74)

n8n Cloud:

core

  • n8nVersion: 1.100.1
  • platform: docker (cloud)
  • nodeJsVersion: 22.16.0
  • database: sqlite
  • executionMode: regular
  • concurrency: 5
  • license: community
  • consumerId: 00000000-0000-0000-0000-000000000000

storage

  • success: all
  • error: all
  • progress: false
  • manual: true
  • binaryMode: filesystem

pruning

  • enabled: true
  • maxAge: 168 hours
  • maxCount: 2500 executions

client

  • userAgent: mozilla/5.0 (macintosh; intel mac os x 10_15_7) applewebkit/537.36 (khtml, like gecko) chrome/137.0.0.0 safari/537.36
  • isTouchDevice: false

Local n8n:

core

  • n8nVersion: 1.100.1
  • platform: npm
  • nodeJsVersion: 22.16.0
  • database: sqlite
  • executionMode: regular
  • concurrency: -1
  • license: community
  • consumerId: unknown

storage

  • success: all
  • error: all
  • progress: false
  • manual: true
  • binaryMode: memory

pruning

  • enabled: true
  • maxAge: 336 hours
  • maxCount: 10000 executions

client

  • userAgent: mozilla/5.0 (macintosh; intel mac os x 10_15_7) applewebkit/537.36 (khtml, like gecko) chrome/137.0.0.0 safari/537.36
  • isTouchDevice: false

You need to give the cloud access to your SFTP with tunneling

Hi @cutecatcode, can you please explain?

First, you need to bring your ftp online (in case if your server is from localhost).
Second, to make it happen, you can use tunneling with ngrok or cloudflare.
Third, use the url provided to the SFTP

My SFTP server is already online and is hosted on GCP Compute Engine. It’s running fine. I and other services can already connect to it.

n8n run locally can connect to it, however n8n Cloud can’t seem to connect. There’s no private key or passphrase required, so it should be quite simple to connect to. Just needs to be done over port 22 with SSH/SFTP.

The SFTP server itself has no firewall rules that deny IP addresses or ranges. It only requires TCP connections through port 22.

I’ve tried listing other directories and it seems to work. So not sure why listing one specific directory (with XLSX files within) is returning an empty output…

hmmm. kinda weird tho…
I think there’s some proxy problem from n8n to your server i guess

The further I’m diving into it, it might be folder permissions. I’ll let you know when I’ve got a resolution :folded_hands:

okay! I will be wait for u!

Well, it’s not folder permissions. The credentials I’m using are for the same SFTP user who is the owner of the folders and files. Folders have chmod of 755 and files have chmod of 644.

I tried in Cyberduck to create a new folder and upload files to see if that could be read.

I created a new folder /IN/reports_new as well as an empty /IN/test.txt file. When I tried to list the files in n8n, it actually gave me an error message this time:

list: No such file /IN/reports_new

I even deleted all but one file in the new folder, and it still gives me the same error.

I went back up one level to try to list the contents there (/IN), and it seems to give me an outdated list output:

Is there a way to ensure that the n8n FTP node retrieves the list from the server, rather than what seems like a cached value?

Anyone able to provide any assistance here? Seems strange that the SFTP works on the local version of n8n.io, but not on the Cloud version.

No activity on this thread, sadly. I did some further investigation and I can see that the ssh2-sftp-client version in n8n-io/n8n is very old (v7; latest is v12). I’m going to attempt a version bump, however it is hard for me to test in Cloud environment since ssh2-sftp-client v7 worked in self-hosted/local n8n and its the n8n cloud which I’m struggling with.

After every n8n update I check if this works, and it seems like for v1.106.3 it’s been fixed! I can properly list my SFTP folder contents and download files :folded_hands:

1 Like

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