delfer / docker-alpine-ftp-server

Small and flexible docker image with vsftpd server
189 stars 130 forks source link

no connection with letsencrypt cert #56

Closed sm4rty-github closed 11 months ago

sm4rty-github commented 1 year ago

I cant connect to the server when I have certs in the start command.

-e TLS_CERT="/storage/ssl/xxx.de.crt" -e TLS_KEY="/storage/ssl/xxx.de.key"

docker run -d --name vsftpd -p 21:21 -p 21000-21010:21000-21010 -e USERS="user|!password" -e ADDRESS=subdomain.xxx.de -e TLS_CERT="/storage/ssl/subdomain.xxx..de.crt" -e TLS_KEY="/storage/ssl/subdomain.xxx.de.key" -v "/var/media/fooBar/ftp:/ftp" user/branch-arm:vsftpd

docker logs -f vsftpd
Changing password for user
New password:
Retype password:
passwd: password for user changed by root

seems normal, but no connection.

when I use the same command without ssl, I can connect

delfer commented 12 months ago

Hello @sm4rty-github ! Which ftp client do you use? Can you share the error message from the client side?

sm4rty-github commented 12 months ago

I used ftpfs on linux to mount as a share but with filezilla its not working also from windows.

there is simply connection timed out, nothing more.

wbQuad:~ # docker logs -f vsftpd Changing password for user New password: Retype password: passwd: password for user changed by root

Status: Verbinde mit 192.168.177.54:21... Status: Verbindungsversuch fehlgeschlagen mit "ECONNREFUSED - Verbindung durch Server verweigert". Fehler: Herstellen der Verbindung zum Server fehlgeschlagen

it seems it does not open a port when trying to run it with a cert file.

€dit: I forgot this line in the run command: -v "/etc/letsencrypt:/etc/letsencrypt:ro" so vsftpd couldnt even access the cert and key.

so now it is working with filezilla without problems.

delfer commented 11 months ago

problem solved