Raspberry Pi¶
uFTP runs on every Raspberry Pi: it is small, it has no dependencies except OpenSSL for TLS, and it builds on the board in a few seconds.
The packages on the download page are ~debian12_arm64 for Raspberry Pi OS
64-bit and ~debian12_armhf for Raspberry Pi OS 32-bit (it needs ARMv7, so a Raspberry Pi 2 or later, not a Pi 1 or Zero); see
Installation.
The APT repository is the Debian 12 one, bookworm, for both arm64 and armhf: use the repository commands
with bookworm; apt chooses the architecture of the board. If Raspberry Pi OS moves to Debian 13, the 64-bit system uses trixie.
sudo apt-get install git gcc make libssl-dev
git clone https://github.com/kingk85/uFTP.git
cd uFTP
make ENABLE_OPENSSL_SUPPORT="-D OPENSSL_ENABLED" LIBS="-lpthread -lssl -lcrypto"
For a first installation, copy the program and the configuration and create a home directory.
sudo cp build/uFTP /sbin/uFTP
sudo mkdir -p /etc/uftp
sudo install -o root -g root -m 0600 uftpd.cfg /etc/uftp/uftpd.cfg
sudo install -d -o root -g root -m 0750 /srv/ftp/alice
/sbin/uFTP --hash-password
sudoedit /etc/uftp/uftpd.cfg
Enable the three account lines at the end of the configuration and set the generated password hash. Create the certificate and private key for this build, then start the server from /etc/uftp. TLS and certificates
(cd /etc/uftp && sudo /sbin/uFTP --check /etc/uftp/uftpd.cfg && sudo /sbin/uFTP)
On a small board lower the number of slots to what you need (an unused slot takes only about 1 KB, but every open connection takes about 21 KB, 29 KB with TLS):
MAXIMUM_ALLOWED_FTP_CONNECTION = 20
On a device with no place to write, or where every write costs, turn the log off: with MAXIMUM_LOG_FILES = 0 the server writes nothing in normal operation (no file, no banner, no line on standard output or error); only a [FATAL] line or a crash report says why it stopped.
MAXIMUM_LOG_FILES = 0
With a 32 bit system use 4.4.0 or later: before, files over 2 GB were not seen and an upload that went on after 4 GB could write in the wrong place.
To start uFTP at boot, use the systemd unit in Installation.
The users of the configuration file can see a USB disk if you set HOME_n to its mount point, for example /media/usb.