You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
2 weeks ago | |
|---|---|---|
| .. | ||
| config | 2 weeks ago | |
| dropins/vsftpd.container.d | 2 weeks ago | |
| other/lego | 2 weeks ago | |
| tests | 2 weeks ago | |
| tmpfiles.d | 2 weeks ago | |
| Makefile | 2 weeks ago | |
| README.md | 2 weeks ago | |
| overlay.bu | 8 months ago | |
| vsftpd-build.timer | 8 months ago | |
| vsftpd.build | 8 months ago | |
| vsftpd.container | 2 weeks ago | |
| vsftpd.target | 8 months ago | |
README.md
Podman Quadlet: vsftpd
Overview
vsftpd (Very Secure FTP Daemon) is started as a Podman Quadlet. It provides a secure FTP server with TLS support.
This cookbook:
- Builds a custom vsftpd container image locally.
- Supports TLS encryption with a certificate provided by the
legocookbook (Let's Encrypt in production, self-signed in development). - Maps system users into the container for authentication.
- Includes a timer to periodically rebuild the container image.
- Reloads certificates automatically when renewed.
Prerequisites
- Configuration file
/etc/quadlets/vsftpd/vsftpd.conf.d/local.confmust exist. - For TLS support, the
legocookbook must be configured to provide a certificate nameddefault(see the lego cookbook's README). - The volumes to share must be mounted on
/datawith a drop-in (see dropins/vsftpd.container.d/storage.conf).
TLS certificates
The TLS settings are in local.conf (see config/examples/vsftpd.conf.d/local.conf):
ssl_enable=YES
rsa_cert_file=/etc/vsftpd/tls/default.crt
rsa_private_key_file=/etc/vsftpd/tls/default.key
- Before starting vsftpd, vsftpd.service copies the certificates from
/var/lib/quadlets/lego/certificatesto/run/quadlets/vsftpd/tls(mounted on/etc/vsftpd/tlsin the container). - When lego obtains or renews a certificate, its renewal hook (other/lego/vsftpd.sh) restarts vsftpd.service (if it is running) to load the new certificate.
Usage
In a separate terminal, follow the logs.
sudo make tail-logs
Install the Podman Quadlets and start vsftpd.
sudo make clean install
You should see the vsftpd-build.service building the vsftpd container image. Then, the vsftpd.service should start up.
Verify vsftpd is running:
sudo systemctl status vsftpd.service
Test FTP connectivity:
ftp localhost
Or with TLS:
lftp -u username localhost
When the certificates are renewed by lego, vsftpd.service is restarted automatically to load them.
Restart the vsftpd.target unit.
sudo systemctl restart vsftpd.target
Finally, remove the quadlets, their configuration and their data.
sudo make uninstall clean
Integration tests
sudo make pytest