Installation
Install workerd-ftp using your preferred package manager.Package managers
Import the client
After installation, import theFTPClient class in your Worker:
Prerequisites
Before using workerd-ftp, ensure you have the following:Cloudflare Workers setup
Create a Workers project
If you don’t have a Workers project yet, create one using Wrangler:Select “Hello World” Worker template when prompted.
Enable TCP Sockets
TCP Sockets must be enabled in your Cloudflare account. This is available on the Workers Paid plan and above.
FTP server access
You’ll need:- Hostname: The FTP server address (e.g.,
ftp.example.com) - Port: Usually port
21for FTP or990for FTPS - Credentials: Username and password for authentication
- Security settings: Whether to use TLS encryption (
secure: truefor FTPS)
workerd-ftp only supports passive mode connections, as Cloudflare Workers can only make outgoing connections.
TypeScript support
workerd-ftp is written in TypeScript and includes full type definitions. No additional@types package is needed.
The package exports:
FTPClient- Main client class- Type definitions for connection options and file information
Package information
- Package name:
workerd-ftp - npm registry: npmjs.com/package/workerd-ftp
- Repository: Brand-Boosting-GmbH/workerd-ftp
- License: MIT
Verify installation
To verify workerd-ftp is installed correctly, check yourpackage.json:
Next steps
Quick start
Learn how to connect to an FTP server and perform basic operations