Overview
HugBucket exposes a standard FTP server backed by Hugging Face Storage Buckets. FTP clients connect to port2121 and navigate a virtual filesystem where the top-level directories correspond to buckets and paths within them map to object keys.
Path mapping: /<bucket>/<key>
For example, the FTP path /my-bucket/data/file.csv maps to the object key data/file.csv in the bucket my-bucket.
Port configuration
Authentication
Credentials are configured via environment variables:
Both variables must be set together. If both are left empty, anonymous FTP login is allowed.
You cannot set only one of
FTP_USERNAME or FTP_PASSWORD — both must be provided or both must be empty. Starting the server with only one set will fail with a configuration error.Starting the server
Connecting
1
Open an FTP connection
Connect to port
2121 on your host:2
Authenticate
Enter the username and password you configured with For anonymous access (when both variables are empty), enter
FTP_USERNAME and FTP_PASSWORD:anonymous as the username.3
Enable passive mode
Most FTP clients default to passive mode. If your client requires it explicitly, run:Data connections will use a port in the range
30000–30099.4
Navigate and transfer files
The root directory
/ lists all buckets. Change into a bucket directory to access its objects:Supported FTP operations
TheHugBucketFTPFilesystem class implements the following FTP commands:
chmod and readlink are not supported and will return a permission or OS error if invoked.Path mapping
The FTP virtual filesystem maps directly onto the/{bucket}/{key} hierarchy:
Paths are normalized: trailing slashes,
., and .. segments are resolved before being sent to the backend.
Passive mode
HugBucket configures passive data ports in the range30000–30099 (100 ports). Each FTP data transfer (upload, download, or directory listing) opens one port from this range for the duration of the transfer.