46 releases

new 0.20.0 May 16, 2024
0.19.1 Dec 24, 2023
0.19.0 Sep 16, 2023
0.18.9 May 31, 2023
0.5.0 Nov 15, 2019

#119 in Network programming

Download history 89/week @ 2024-01-29 65/week @ 2024-02-05 84/week @ 2024-02-12 155/week @ 2024-02-19 235/week @ 2024-02-26 149/week @ 2024-03-04 93/week @ 2024-03-11 106/week @ 2024-03-18 132/week @ 2024-03-25 256/week @ 2024-04-01 103/week @ 2024-04-08 86/week @ 2024-04-15 124/week @ 2024-04-22 42/week @ 2024-04-29 101/week @ 2024-05-06 326/week @ 2024-05-13

602 downloads per month
Used in 15 crates


7.5K SLoC


Crate Version API Docs Build Status Crate License Follow on Telegram

When you need to FTP, but don't want to.


Website | API Docs | **unFTP **

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:

  • 39 Supported FTP commands (see commands directory) and growing
  • Ability to implement own storage back-ends
  • Ability to implement own authentication back-ends
  • Explicit FTPS (TLS)
  • Mutual TLS (Client certificates)
  • TLS session resumption
  • Prometheus integration
  • Structured Logging
  • Proxy Protocol support
  • Automatic session timeouts
  • Per user IP allow lists

Known storage back-ends:

  • unftp-sbe-fs - Stores files on the local filesystem
  • unftp-sbe-gcs - Stores files in Google Cloud Storage
  • unftp-sbe-rooter - Wraps another storage back-end in order to root a user to a specific home directory.
  • unftp-sbe-restrict - Wraps another storage back-end in order to restrict the FTP operations a user can do i.e. provide authorization.

Known authentication back-ends:


You'll need Rust 1.41 or higher to build libunftp.

Getting started

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:

libunftp = "0.19.0"
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;

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")


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:

Getting help and staying informed

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.


~581K SLoC