-
-
Notifications
You must be signed in to change notification settings - Fork 323
Advanced example walk through with TLS & automatic user account
Andrew Stilliard edited this page Nov 15, 2018
·
3 revisions
Taken from our test which is run during all changes to the container.
docker pull stilliard/pure-ftpd:hardened
docker volume create --name ftp_tls
In here we're creating a demo certificate & a test user called "bob" with a password of "test"
docker run -d --name ftpd_server -p 21:21 -p 30000-30009:30000-30009 -e "PUBLICHOST=localhost" -e "ADDED_FLAGS=-d -d --tls 2" -e "TLS_CN=localhost" -e "TLS_ORG=Demo" -e "TLS_C=UK" -e"TLS_USE_DSAPRAM=true" -e FTP_USER_NAME=bob -e FTP_USER_PASS=test -e FTP_USER_HOME=/home/ftpusers/bob -v ftp_tls:/etc/ssl/private/ stilliard/pure-ftpd:hardened
Watch over the logs to see the progress, the last line should print the pure-ftpd command being used to run
When this line shows it should be all up and running and ready to use
docker logs -f ftpd_server
## You may want to retrieve the certificate to allow in your ftp client
You can echo our the certificate path like so:
echo "$$(sudo docker volume inspect --format '{{ .Mountpoint }}' ftp_tls)/pure-ftpd.pem"
## Now you should be ready to test FTPS access
You can connect with any FTPS client, such as [Filezilla](https://filezilla-project.org/)
Or connect locally with the `lftp` command:
lftp -u bob,test -e "set ssl:ca-file '$cert'" localhost 21
If you have any issues, please check our [Issues tab](https://github.com/stilliard/docker-pure-ftpd/issues) for help, check out our [detailed README file](https://github.com/stilliard/docker-pure-ftpd/blob/master/README.md) or if this doesn't help please submit a new issue.