Skip to content
pubscout

ftp_server

2.4.0, released 12 days ago by zcreations.info

Standards-compliant FTP and FTPS server implementation in Dart.

$ flutter pub add ftp_server
Source repository

What it does

Provides a fully-featured FTP and FTPS server running directly inside Dart with support for plain or encrypted TLS, active/passive modes, authentication, and pluggable virtual or physical file system backends.

AI-written summary of version 2.4.0, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need to embed an FTP or FTPS server into a Dart or Flutter application.
  • You want to share local files and directories with other devices over the network.
  • You require standards-compliant RFC file operations without external native server binaries.

Skip it when

  • You only need an FTP client to connect to external servers.
  • Your environment does not allow running socket servers.

Strengths

  • Supports plain FTP, explicit FTPS, and implicit FTPS.
  • Includes zero-config self-signed certificate generation inside Dart.
  • Pluggable file system backends for virtual multiple directories or a single physical directory.

Weaknesses

  • Dart's SecureSocket limitation prevents sending a TLS close_notify, causing some FTP clients (like FileZilla) to report non-properly terminated directory listings.
  • Does not support CCC (Clear Command Channel) or REIN under TLS due to Dart SDK socket constraints.

Setup

Kind
Pure Dart
Effort
Low
Code generation
No
Direct dependencies
3

No external OpenSSL setup required if using the built-in self-signed certificate generator.

import 'package:ftp_server/ftp_server.dart';
import 'package:ftp_server/server_type.dart';
import 'package:ftp_server/file_operations/virtual_file_operations.dart';

void main() async {
  final server = FtpServer(
    21,
    fileOperations: VirtualFileOperations(['/home/user/shared']),
    serverType: ServerType.readAndWrite,
  );

  await server.start();
}

Alternatives

Packages that do the same job and could replace ftp_server.

  • shelf_static

    Serve static files over HTTP with the shelf package

  • relic

    Lightweight web server framework inspired by Shelf, with typed APIs and a high‑performance native Zig adapter.

  • dart_frog_web_socket

    WebSocket support for the Dart Frog backend framework.

  • ftpconnect

    Interact with FTP, FTPS, FTPES, and SFTP servers to upload, download, and manage files.

Works with

Packages commonly used together with ftp_server: ones it builds on, ones built on it, and its own family.