Documentation Index
Fetch the complete documentation index at: https://mintlify.com/sachnun/hugbucket/llms.txt
Use this file to discover all available pages before exploring further.
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
| Port | Purpose |
|---|---|
2121 | FTP control connection |
30000–30099 | Passive mode data connections |
Authentication
Credentials are configured via environment variables:| Variable | Description |
|---|---|
FTP_USERNAME | FTP login username |
FTP_PASSWORD | FTP login password |
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
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.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.Supported FTP operations
TheHugBucketFTPFilesystem class implements the following FTP commands:
| FTP command | Operation | Notes |
|---|---|---|
LIST / NLST | List directory | Lists buckets at /; lists object keys within a bucket prefix |
RETR | Retrieve (download) | Downloads an object from Hugging Face storage |
STOR | Store (upload) | Buffers the upload in memory and writes to storage on connection close |
DELE | Delete file | Removes an object from storage; raises an error if the path is a directory |
RNFR / RNTO | Rename / move | Copies the object to the new key, then deletes the original; full directory trees are supported |
MKD | Make directory | At the root level, creates a new bucket; within a bucket, writes a .hugbucket_keep marker object |
RMD | Remove directory | At the root level, deletes the bucket; within a bucket, removes the directory only if empty |
CWD | Change directory | Navigates the virtual path hierarchy |
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:
| FTP path | Bucket | Object key |
|---|---|---|
/ | — | Root: lists all buckets |
/my-bucket | my-bucket | — (directory) |
/my-bucket/file.txt | my-bucket | file.txt |
/my-bucket/data/report.csv | my-bucket | data/report.csv |
., 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.