Hi!
I've been trying to setup an sftp server provided by a docker container.
I checked that it indeed worked on the docker network using another container hooked to the network, and that I could access the web admin interface through traefik.
Here is the error message I get:
sftp -P 2222 hurlu@ftp.mydomain.com
ssh_exchange_identification: Connection closed by remote host
Couldn't read packet: Connection reset by peer
One curious thing I noticed but do not understand, is that docker ps does not display a port for this container, while it does for my other containers:
ee0a6c7f9ea1 gitea/gitea:1.9.6 "/usr/bin/entrypoint…" 11 hours ago Up 11 hours 22/tcp, 3000/tcp gitea
cf9160bc5fd3 postgres:9.6 "docker-entrypoint.s…" 11 hours ago Up 11 hours 5432/tcp gitea_db
1c956e51b0b8 drakkan/sftpgo:v2.1.2-alpine-slim "sftpgo serve" 11 hours ago Up 11 hours ftp
Below is my config:
docker-compose.yml
services:
ftp:
container_name: ftp
image: drakkan/sftpgo:v2.1.2-alpine-slim
networks:
- traefik_default
labels:
- "traefik.enable=true"
- "traefik.tcp.routers.ftp.rule=HostSNI(`*`)"
- "traefik.tcp.routers.ftp.entrypoints=sftp" # entrypoint listens to port 2222
- "traefik.tcp.services.ftp.loadbalancer.server.port=2022"
- "traefik.tcp.routers.ftp.tls.certresolver=myhttpchallenge" # tried with & without tls or passthrough, no luck
- "traefik.http.routers.uiftp.rule=Host(`ftp.mydomain.com`)" # this part is working as intended
- "traefik.http.routers.uiftp.entrypoints=websecure"
- "traefik.http.routers.uiftp.tls.certresolver=myhttpchallenge"
- "traefik.http.services.uiftp.loadbalancer.server.port=8080"
networks:
traefik_default:
external: true
Thanks for reading !