i have followed
to get sftpgo to work with traefik but cant seem to be able to do it. follwing is my docker compose and what i have tried so far. thank u in advance
sftpgo:
#image: drakkan/sftpgo:v2-alpine
image: ghcr.io/drakkan/sftpgo:edge-plugins
container_name: sftpgo
restart: unless-stopped
user: 1000:1000
ports:
- '8084:8080'
# - '2022:2022' #sftp
# - '2121:2121' #ftp
- '50000-50100:50000-50100'
- '10080:10080' #webdav
environment:
PUID: $PUID
PGID: $PGID
TZ: $TIME_ZONE
SFTPGO_FTPD__BINDINGS__0__PORT: 2121
SFTPGO_SFTPD__BINDINGS__0__PORT: 2022
SFTPGO_WEBDAVD__BINDINGS__0__PORT: 10080
SFTPGO_COMMON__PROXY_PROTOCOL: 2
SFTPGO_FTPD__BINDINGS__0__FORCE_PASSIVE_IP: xxx
SFTPGO_DATA_PROVIDER__DRIVER: mysql
SFTPGO_DATA_PROVIDER__NAME: sftpgo
SFTPGO_DATA_PROVIDER__HOST: sftpgo_mysql
SFTPGO_DATA_PROVIDER__PORT: 3306
SFTPGO_DATA_PROVIDER__USERNAME: sftpgo # please change
SFTPGO_DATA_PROVIDER__PASSWORD: xxx # please change
SFTPGO_COMMON__DEFENDER__ENABLED: true
SFTPGO_COMMON__DEFENDER__BAN_TIME: 15
SFTPGO_COMMON__DEFENDER__BAN_TIME_INCREMENT: 100
SFTPGO_COMMON__DEFENDER__THRESHOLD: 5
SFTPGO_COMMON__DEFENDER__OBSERVATION_TIME: 15
volumes:
- $PERSIST/sftpgo/config:/srv/sftpgo
- $PERSIST/sftpgo/home:/srv/sftpgo/data
- $PERSIST/sftpgo/backups:/srv/sftpgo/backups
- /data:/data
labels:
- "traefik.enable=true"
# - "traefik.http.routers.sftpgo.entrypoints=http"
# - "traefik.http.routers.sftpgo.rule=Host(`xxx`)"
# - "traefik.http.middlewares.sftpgo-https-redirect.redirectscheme.scheme=https"
# - "traefik.http.routers.sftpgo.middlewares=sftpgo-https-redirect"
# - "traefik.http.routers.sftpgo-secure.entrypoints=https"
# - "traefik.http.routers.sftpgo-secure.rule=Host(`xxx`)"
# - "traefik.http.routers.sftpgo-secure.tls=true"
# - "traefik.http.routers.sftpgo-secure.service=sftpgo"
# - "traefik.http.services.sftpgo.loadbalancer.server.port=8080"
# - "traefik.tcp.routers.sftp.rule=Host(`xxx`)"
# - "traefik.tcp.routers.sftp-secure.entrypoints=sftp"
# - "traefik.tcp.routers.sftp-secure.service=sftp"
# - "traefik.tcp.services.sftp.loadbalancer.server.port=2022"
# - "traefik.tcp.services.sftp-service.loadbalancer.proxyprotocol.version=2"
# - "traefik.tcp.routers.ftp.rule=Host(`xxx`)"
# - "traefik.tcp.routers.ftp-secure.entrypoints=ftp"
# - "traefik.tcp.routers.ftp-secure.service=ftp"
# - "traefik.tcp.services.ftp.loadbalancer.server.port=2121"
# - "traefik.tcp.services.ftp-service.loadbalancer.proxyprotocol.version=2"
- "traefik.http.routers.sftpgo.entrypoints=http"
- "traefik.http.routers.sftpgo.rule=Host(`xxx`)"
- "traefik.http.middlewares.sftpgo-https-redirect.redirectscheme.scheme=https"
- "traefik.http.routers.sftpgo.middlewares=sftpgo-https-redirect"
- "traefik.http.routers.sftpgo-secure.entrypoints=https"
- "traefik.http.routers.sftpgo-secure.rule=Host(`xxx`)"
- "traefik.http.routers.sftpgo-secure.tls=true"
- "traefik.http.routers.sftpgo-secure.service=sftpgo"
- "traefik.http.services.sftpgo.loadbalancer.server.port=8080"
- "traefik.tcp.routers.sftpgo-sftp.entrypoints=sftp"
- "traefik.tcp.routers.sftpgo-sftp.rule=HostSNI(`*`)"
- "traefik.tcp.routers.sftpgo-sftp.service=sftpgo-sftp"
- "traefik.tcp.services.sftpgo-sftp.loadBalancer.server.port=2022"
- "traefik.tcp.services.sftpgo-sftp.loadbalancer.proxyprotocol.version=2"
- "traefik.tcp.routers.sftpgo-ftp.entrypoints=ftp"
- "traefik.tcp.routers.sftpgo-ftp.rule=HostSNI(`*`)"
- "traefik.tcp.routers.sftpgo-ftp.service=sftpgo-ftp"
- "traefik.tcp.services.sftpgo-ftp.loadBalancer.server.port=2121"
- "traefik.tcp.services.sftpgo-ftp.loadbalancer.proxyprotocol.version=2"
expose:
- 2022
- 2121
# - 8084