
AWS Transfer Family is Amazon's managed file transfer service that provides SFTP, FTPS, and FTP endpoints with S3 and EFS storage backends as hosted services within the AWS ecosystem. It abstracts server management but ties teams to AWS-specific IAM authentication, per-protocol endpoint pricing, and hourly charges regardless of usage.
SFTPGo is an open-source file transfer server that replaces Transfer Family with a self-hosted deployment supporting SFTP, FTP/S, and WebDAV. It provides equivalent user management, S3-compatible storage backends, and multi-protocol access on any infrastructure without per-endpoint billing or AWS API dependencies.
This article explains how to deploy SFTPGo as a self-hosted alternative to AWS Transfer Family using Docker Compose with Traefik for automatic HTTPS. It covers user authentication with SSH keys and passwords, storage backend configuration with local filesystem and S3-compatible object storage, multi-protocol access (SFTP, FTP/S, WebDAV), event notifications, and migration from AWS Transfer Family.
The following table maps AWS Transfer Family components to their SFTPGo equivalents:
SFTPGo runs as a single binary or Docker container that handles all protocols and administrative functions. The architecture includes:
2022), FTP/S (port 2121), and WebDAV (port 10080).8080.Before you begin, you need to:
sftp.example.com).Docker Compose orchestrates the SFTPGo and Traefik containers, defines persistent storage volumes, and manages networking between services.
Create the project directory with subdirectories for data and configuration persistence.
Navigate to the project directory.
Create the .env file to store the domain and Let's Encrypt email used by Traefik.
Add the following variables. Replace sftp.example.com with your domain and admin@example.com with your email address.
Save and close the file.
Create the Docker Compose configuration file.
Add the following configuration:
Save and close the file.
The configuration exposes:
Traefik routes the web admin interface (internal port 8080) through HTTPS on the configured domain using Let's Encrypt certificates.
Start the SFTPGo and Traefik containers.
Verify the container is running.
The output displays two running containers: SFTPGo and Traefik with Traefik listening on ports 80 and 443.
Check the service logs for any errors.
For more information on managing a Docker Compose stack, see the How To Use Docker Compose article.
The web administration interface provides initial setup and ongoing configuration management.
Open a web browser and navigate to the SFTPGo admin interface at https://sftp.example.com/web/admin, replacing sftp.example.com with your configured domain.
Create the administrator account on first access:
admin).After the first login, SFTPGo redirects to the two-factor authentication setup page. Select Default and click Enable.
Scan the QR code with your authenticator app.
Enter the verification code to confirm setup.
Save the recovery codes in a secure location.
The SFTPGo Defender protects against brute-force login attempts by tracking failed logins and automatically banning offending IP addresses. The Defender is disabled by default and must be enabled through environment variables.
Open the Docker Compose file.
Add the following environment variables under the sftpgo service environment: block:
Save and close the file.
These variables configure:
DEFENDER__ENABLED: Activates the brute-force protection.DEFENDER__DRIVER: Stores defender events in memory (use provider for database-backed persistence).DEFENDER__BAN_TIME: Ban duration in minutes.DEFENDER__THRESHOLD: Score threshold that triggers a ban.DEFENDER__SCORE_INVALID: Score added for invalid login attempts.DEFENDER__SCORE_VALID: Score added for valid logins.Redeploy the SFTPGo container to apply the changes.
Log back in to the admin portal and navigate to IP Manager in the left sidebar. The IP Manager provides two options:
SFTPGo supports multiple authentication methods including passwords, SSH public keys, and multi-factor authentication. Create users that mirror your AWS Transfer Family user configuration.
Password authentication uses a username and password pair stored in the SFTPGo data provider. Each user has an isolated root directory on the local filesystem.
Navigate to Users in the left sidebar.
Click Add to create a new user.
Configure the user account:
Under File system, keep Local disk selected for local storage.
Set the Root directory to /srv/sftpgo/USERNAME, replacing USERNAME with the SFTP username configured in the previous step.
Click Save to create the user.
SSH key authentication enables passwordless logins using cryptographic key pairs, matching the key-based authentication model used by AWS Transfer Family.
Generate an SSH key pair on the client machine (if not already available).
When prompted for a passphrase, press Enter twice to create the key without a passphrase for passwordless authentication.
Display and copy the public key content.
In the SFTPGo web interface, navigate to Users, click Actions next to the target user, and select Edit.
Scroll to the Public keys section.
Paste the entire public key string into the text field.
Click Save.
Test SSH key authentication from the client. Replace USERNAME with the SFTPGo username and sftp.example.com with your configured domain.
Type exit to close the SFTP session.
Multi-Factor Authentication (MFA) requires users to provide a Time-based One-Time Password (TOTP) code in addition to their primary credentials when accessing protected protocols.
Navigate to Users, click Actions next to the target user, and select Edit.
Expand the ACLs section and locate Require 2FA for.
Select the protocols for which 2FA is required.
Click Save.
The user must configure their authenticator app on next login via the WebClient portal.
SFTPGo supports multiple storage backends including local filesystem, S3-compatible object storage, Azure Blob, Google Cloud Storage, and SFTP. Each user can have a different backend, allowing you to mix local storage and cloud object storage in the same deployment.
Local filesystem is the default storage type for SFTPGo users. Each user requires an explicit root directory path on the host, which maps to a directory inside the mounted /srv/sftpgo volume in the container.
Navigate to Users, click Actions next to the target user, and select Edit.
Under File system, verify Local disk is selected in the Storage dropdown.
Set the Root directory to a path such as /srv/sftpgo/USERNAME or any custom path you want. Replace USERNAME with the SFTP username.
Click Save.
Connect SFTPGo to any S3-compatible storage service such as MinIO or Vultr Object Storage.
Retrieve your S3-compatible storage credentials from your provider:
ewr1.vultrobjects.com).Navigate to Users, click Actions next to the target user, and select Edit.
Under File system, select S3 (Compatible) from the Storage dropdown.
Configure the S3 backend settings:
ewr1).https://ewr1.vultrobjects.com).Configure the upload settings:
5 (minimum for multipart uploads).2.Click Save.
Create a test file on the client machine.
Connect via SFTP to test the configuration. Replace USERNAME with your SFTPGo username and sftp.example.com with your configured domain.
Upload the test file.
Verify the file appears in the bucket.
Type exit to close the SFTP session.
S3-compatible storage has some limitations compared to local filesystem:
chmod and chown operations are silently ignored.SFTPGo runs SFTP on port 2022 by default, but it also supports FTP with TLS (FTP/S) and WebDAV for legacy clients and HTTP-based file access. Enabling these protocols extends SFTPGo to match the protocol coverage of AWS Transfer Family, which supports SFTP, FTP/S, and FTP. Each protocol uses its own listener port and shares the same user accounts, authentication backends, and storage configuration.
SFTPGo supports per-user quotas, bandwidth throttling, IP-based restrictions, and directory-level permissions that map directly to AWS Transfer Family's access control features. Each setting applies independently and can be combined to enforce strict resource boundaries.
User quotas restrict how much storage and how many files a user can store.
Navigate to Users, click Actions next to the target user, and select Edit.
Expand the Disk quota and bandwidth limits section and configure:
0 for no limit. The field accepts size suffixes such as MB, GB, or TB.10000).Click Save.
Bandwidth limits cap the maximum upload and download speed for a user.
Navigate to Users, click Actions next to the target user, and select Edit.
Expand the Disk quota and bandwidth limits section and set:
5120 for 5 MB/s).Click Save.
IP restrictions limit which IP addresses or CIDR ranges can connect with a given user account.
Navigate to Users, click Actions next to the target user, and select Edit.
Expand the ACLs section and locate Allowed IP/Mask.
Add allowed IP addresses or CIDR ranges:
Alternatively, configure Denied IP/Mask to block specific addresses.
Click Save.
Directory permissions grant fine-grained access controls per path within a user's root directory.
Navigate to Users, click Actions next to the target user, and select Edit.
Expand the ACLs section and under Per-directory permissions, configure directory-level access:
/uploads).Click Save.
SFTPGo provides built-in logging, syslog forwarding, and HTTP webhook event hooks that replace AWS Transfer Family's CloudWatch integration. Log files capture protocol activity and authentication events, while event hooks trigger actions on filesystem operations such as uploads or downloads.
Create the logs directory.
Open the Docker Compose file.
Append the logs volume to the existing volumes: block under the sftpgo service:
Append the following logging environment variables to the existing environment: block under the sftpgo service:
Save and close the file.
Redeploy the container.
SFTPGo supports HTTP webhooks for event notifications.
Navigate to Event Manager, then click Actions in the left sidebar.
Click Add to create a new action.
Configure the action:
webhook-action).Click Save.
Click Rules in the left sidebar.
Click Add to create a new event rule.
Configure the event trigger:
upload-notification).Under Actions, select the action you created in the previous step.
Click Save.
Forward logs to a centralized logging system.
Append the following syslog environment variables to the existing environment: block under the sftpgo service in docker-compose.yml. Replace SYSLOG-SERVER with your syslog server address.
Redeploy the container.
Verify the deployment by testing connections across the enabled protocols. The following sections cover password-based SFTP, SSH key-based SFTP, and FTP/S connections.
Create a test file on the client machine.
Connect to the SFTP server. Replace USERNAME with your SFTPGo username and sftp.example.com with your configured domain.
Enter the password when prompted.
Upload the test file.
Download the file to verify.
List the directory contents.
Exit the session.
Connect using the private key. Replace USERNAME with your SFTPGo username and sftp.example.com with your configured domain.
The SFTP session opens without prompting for a password, confirming SSH key authentication is working.
Type exit to close the session.
lftpInstall the lftp client on the local machine.
Connect with explicit TLS. Replace USERNAME with your FTP username and sftp.example.com with your configured domain.
List files to verify the connection.
Type exit to close the session.
Migrating from AWS Transfer Family to SFTPGo involves exporting users, transferring file data, and updating client connection details. The following subsections cover each migration phase along with AWS-specific features that require manual reconfiguration.
Export user configurations from AWS Transfer Family and recreate them in SFTPGo.
List AWS Transfer Family users using the AWS CLI.
Export user details including SSH keys.
For each user, note the following information:
Generate an SFTPGo API access token using the admin credentials. Replace ADMIN-USERNAME and ADMIN-PASSWORD with your SFTPGo admin credentials and sftp.example.com with your configured domain.
The response contains an access_token value. The token expires after 15 minutes. Copy it and complete the next step before it expires.
Create corresponding users in SFTPGo via the REST API.
Replace:
sftp.example.com with your configured domain.ACCESS-TOKEN with the token from the previous step.USERNAME with the new SFTP username.PASSWORD with a strong password for the user.SSH-PUBLIC-KEY with the user's SSH public key string. The "status": 1 field activates the user account. Without it, the user is created in a disabled state and cannot log in.
Transfer files from S3 to your SFTPGo storage backend.
If using S3 backend with SFTPGo, configure the same bucket or migrate data between buckets:
For local filesystem backend, use the AWS CLI to download files:
Set correct ownership on downloaded files.
Convert AWS IAM-based authentication to SFTPGo methods.
For custom identity providers, configure an external authentication hook:
Create an authentication script or HTTP endpoint that validates credentials.
Configure SFTPGo to use external authentication:
Update client applications with the new endpoint information.
Document the new connection parameters:
sftp.example.com (your SFTPGo server).2022 (SFTP).Distribute updated connection profiles to users.
Update automated scripts and integrations with the new endpoint.
Test each client configuration before decommissioning AWS Transfer Family.
Address the following AWS-specific features when migrating:
/var/lib/sftpgo/id_*) and distribute the fingerprint to clients to prevent man-in-the-middle warnings.You have successfully deployed SFTPGo as a self-hosted alternative to AWS Transfer Family using Docker Compose with Traefik for automatic HTTPS. The configuration includes multi-protocol support (SFTP, FTP/S, WebDAV), S3-compatible storage backends, user authentication with SSH keys and passwords, user quotas, bandwidth throttling, IP restrictions, and per-directory permissions. For advanced configuration options including clustering, plugins, and enterprise features, visit the official SFTPGo documentation.
0 Comments
Be the first to comment and share your perspective with the community.