node-red-contrib-ftp is a Node-RED package providing nodes for interacting with FTP and SFTP servers. It enables Node-RED flows to perform various file operations such as listing, getting, putting, appending, deleting, and creating directories on remote servers. The package includes an 'ftp in' node for standard FTP operations and an 'sftp in' node for secure file transfer via SFTP. As of version 0.0.8, it integrates directly into the Node-RED editor palette, offering a visual way to manage file transfers. Node-RED contrib packages typically follow the Node-RED release cycle, but individual package updates vary. Key differentiators include its tight integration with Node-RED's flow-based programming model, allowing for easy automation of file transfer tasks within larger workflows without writing custom code.
npm install node-red-contrib-ftpVerified import paths — ran on the pinned version, not inferred.
This Node-RED flow demonstrates how to use the 'ftp in' node to first list files on a remote FTP server, then delete a specific file named 'test.csv', and finally list the files again to confirm the deletion. It uses inject nodes to trigger the operations and a debug node to display the results. Replace placeholder FTP host and credentials in the 'ftp' config node with your own details, ideally using environment variables.
Ensure Node-RED is installed and running. Install this package via `npm install node-red-contrib-ftp` in your Node-RED user directory, or use the Node-RED Palette Manager. The nodes will then appear in your editor's palette.
Properly configure the 'ftp' or 'sftp' configuration node (accessed when editing the respective operation node) with valid server details and credentials. Utilize Node-RED's credential storage or environment variables for sensitive information like passwords.
Ensure the incoming `msg` object has the correct `filename` and `localFilename` properties set according to the desired FTP/SFTP operation. For PUT/APPEND, `msg.payload` can also serve as the local file content if `msg.localFilename` is omitted.
Monitor the project's GitHub repository for updates and review release notes carefully before upgrading, especially for mission-critical applications to avoid unexpected behavior.
Verify the host and port in your FTP/SFTP configuration node. Check if the server is running and accessible from the machine hosting Node-RED. Review local and network firewall rules.
Double-check the username and password in your FTP/SFTP configuration node. Ensure the credentials are valid for the target server and that the user has appropriate access rights for the attempted operations.
Verify the exact path and filename for both remote and local files. For local files, ensure the Node-RED process has appropriate read/write permissions to the specified directory.