From 976f588863d94c098d2f4e827b242b5163c13d53 Mon Sep 17 00:00:00 2001 From: Nicola Murino Date: Wed, 2 Jun 2021 09:49:31 +0200 Subject: [PATCH] improve docs to enable FTP/WebDAV Fixes #447 --- docker/README.md | 38 +++++++++++++++++++++++++++++++++++ docs/howto/getting-started.md | 13 +++++++++++- 2 files changed, 50 insertions(+), 1 deletion(-) diff --git a/docker/README.md b/docker/README.md index 4749a6b8..a8be546f 100644 --- a/docker/README.md +++ b/docker/README.md @@ -35,6 +35,44 @@ docker run --rm --name some-sftpgo -p 8080:8080 -p 2022:2022 -d "drakkan/sftpgo: If you prefer GitHub Container Registry to Docker Hub replace `drakkan/sftpgo:tag` with `ghcr.io/drakkan/sftpgo:tag`. +### Enable FTP service + +FTP is disabled by default, you can enable the FTP service by starting the SFTPGo instance in this way: + +```shell +docker run --name some-sftpgo \ + -p 8080:8080 \ + -p 2022:2022 \ + -p 2121:2121 \ + -p 50000-50100:50000-50100 \ + -e SFTPGO_FTPD__BINDINGS__0__PORT=2121 \ + -e SFTPGO_FTPD__BINDINGS__0__FORCE_PASSIVE_IP= \ + -d "drakkan/sftpgo:tag" +``` + +The FTP service is now available on port 2121 and SFTP on port 2022. + +You can change the passive ports range (`50000-50100` by default) by setting the environment variables `SFTPGO_FTPD__PASSIVE_PORT_RANGE__START` and `SFTPGO_FTPD__PASSIVE_PORT_RANGE__END`. + +It is recommended that you provide a certificate and key file to expose FTP over TLS. You should prefer SFTP to FTP even if you configure TLS, please don't blindly enable the old FTP protocol. + +### Enable WebDAV service + +WebDAV is disabled by default, you can enable the WebDAV service by starting the SFTPGo instance in this way: + +```shell +docker run --name some-sftpgo \ + -p 8080:8080 \ + -p 2022:2022 \ + -p 10080:10080 \ + -e SFTPGO_WEBDAVD__BINDINGS__0__PORT=10080 \ + -d "drakkan/sftpgo:tag" +``` + +The WebDAV service is now available on port 10080 and SFTP on port 2022. + +It is recommended that you provide a certificate and key file to expose WebDAV over https. + ### Container shell access and viewing SFTPGo logs The docker exec command allows you to run commands inside a Docker container. The following command line will give you a shell inside your `sftpgo` container: diff --git a/docs/howto/getting-started.md b/docs/howto/getting-started.md index 076e056e..1b1ccfc6 100644 --- a/docs/howto/getting-started.md +++ b/docs/howto/getting-started.md @@ -449,11 +449,22 @@ Open the SFTPGo configuration file, search for the `ftpd` section and change it "tls_cipher_suites": [] } ], + "banner": "", + "banner_file": "", + "active_transfers_port_non_20": true, + "passive_port_range": { + "start": 50000, + "end": 50100 + }, ... } ``` -Restart SFTPGo to apply the changes. The FTP service is now available on port `2121`. It is recommended that you provide a certificate and key file to expose FTP over TLS. You should prefer SFTP to FTP even if you configure TLS, please don't blindly enable the old FTP protocol. +Restart SFTPGo to apply the changes. The FTP service is now available on port `2121`. + +You can also configure the passive ports range (`50000-50100` by default), these ports must be reachable for passive FTP to work. If your FTP server is on the private network side of a NAT configuration you have to set `force_passive_ip` to your external IP address. You may also need to open the passive port range on your firewall. + +It is recommended that you provide a certificate and key file to expose FTP over TLS. You should prefer SFTP to FTP even if you configure TLS, please don't blindly enable the old FTP protocol. ### Enable WebDAV service