| Crates.io | libunftp |
| lib.rs | libunftp |
| version | 0.21.1 |
| created_at | 2019-08-16 18:08:12.561243+00 |
| updated_at | 2025-12-23 15:17:58.220343+00 |
| description | Extensible, async, cloud orientated FTP(S) server library. |
| homepage | |
| repository | https://github.com/bolcom/libunftp |
| max_upload_size | |
| id | 157424 |
| size | 610,706 |
When you need to FTP, but don't want to.

The libunftp library drives unFTP. It's an extensible, async, cloud orientated FTP(S) server implementation in Rust brought to you by the bol.com techlab.
Because of its plug-able authentication (e.g. PAM, JSON File, Generic REST) and storage backends (e.g. local filesystem, Google Cloud Storage) it's more flexible than traditional FTP servers and a perfect match for the cloud.
It runs on top of the Tokio asynchronous run-time and tries to make use of Async IO as much as possible.
Feature highlights:
Known storage back-ends:
Known authentication back-ends:
These two feature flags can be used to select the cryptographic provider:
aws_lc_rs (default): Uses AWS-LC through rustls for cryptographic operationsring: Uses the ring crate for cryptographic operationsTo use a specific provider, enable the corresponding feature in your Cargo.toml:
[dependencies]
libunftp = { version = "0.21.1", features = ["ring"] } # Use ring
# or
libunftp = { version = "0.21.1", features = ["aws_lc_rs"] } # Use aws-lc-rs (default)
The default provider is aws-lc-rs for backward compatibility. Choose the provider that best fits your needs:
ring: More widely used, good for general-purpose applicationsaws-lc-rs: Optimized for AWS environments, good for cloud deploymentsThe following feature flags are included in the default features but can be disabled to reduce dependencies:
prometheus: Enables Prometheus metrics integration. When enabled, you can collect metrics about FTP operations, sessions, and transfers using the .metrics() method on the server builder. Enabled by default.
proxy_protocol: Enables Proxy Protocol support. This allows the server to receive client connection information (IP address and port) when behind a proxy or load balancer. Enabled by default.
To disable these features and reduce dependencies, use default-features = false and explicitly enable only what you need:
[dependencies]
libunftp = { version = "0.21.1", default-features = false, features = ["aws_lc_rs"] }
Or enable all features explicitly:
[dependencies]
libunftp = { version = "0.21.1", features = ["all"] }
You'll need Rust 1.85.0 or higher to build libunftp.
If you've got Rust and cargo installed, create your project with
cargo new myftp
Add the libunftp and tokio crates to your project's dependencies in Cargo.toml. Then also choose
a storage back-end implementation to
add. Here we choose the file system back-end:
[dependencies]
libunftp = "0.21.1"
unftp-sbe-fs = "0.2"
tokio = { version = "1", features = ["full"] }
Now you're ready to develop your server!
Add the following to src/main.rs:
use unftp_sbe_fs::ServerExt;
#[tokio::main]
pub async fn main() {
let ftp_home = std::env::temp_dir();
let server = libunftp::Server::with_fs(ftp_home)
.greeting("Welcome to my FTP server")
.passive_ports(50000..=65535)
.build()
.unwrap();
server.listen("127.0.0.1:2121").await;
}
You can now run your server with cargo run and connect to localhost:2121 with your favourite FTP client e.g.:
lftp -p 2121 localhost
For more help refer to:
Support is given on a best effort basis. You are welcome to engage us on the discussions page or create a Github issue.
You can also follow news and talk to us on Telegram
Thank you for your interest in contributing to libunftp!
Please feel free to create a Github issue if you encounter any problems.
Want to submit a feature request or develop your own storage or authentication back-end? Then head over to our contribution guide (CONTRIBUTING.md).
You're free to use, modify and distribute this software under the terms of the Apache License v2.0.