I need to spin up a quick SFTP server, and I’m using SFTPGo. I’m having an issue where I can always access the web UI service for this server, but SFTP connections are hit or miss. Sometimes I can connect via my SFTP client; but sometimes (often) I get this type of connection failed message in my client (typically I use Cyberduck for Mac):
From terminal:
I am definitely using the right username/ports/etc. As I said, sometimes it works. 10 minutes earlier, it was fine — now it won’t connect. I can’t figure out a pattern. At the same time as I can’t connect via SFTP (on port 2222), I have no problem accessing the SFTPGo web admin UI via the browser.
I’m not sure if this is really a Fly issue or not, but I can’t find any issues in the application server configuration. The SFTP user account in question is set to unlimited concurrent session in the SFTPGo settings, and the error message/terminal behavior suggests something networking related.
Here’s the services:
fly doctor
marks everything as passed.
I’ve tried explicitly binding to internal address 0.0.0.0 (see below), I’ve also tried adding a paid dedicated IPv4 address:
VERSION IP TYPE REGION CREATED AT
v4 [redacted] public (dedicated, $2/mo) global Jun 13 2025 00:18
v6 [redacted] public (dedicated) global Jun 13 2025 00:19
v4 [redacted] public (shared) Jan 1 0001 00:00
Nothing seems to have made any difference. I would appreciate some direction/guidance on how to troubleshoot this further.
The fly.toml in case that’s helpful:
app = 'myappname-sftpgo'
primary_region = 'atl'
[experimental]
cmd = ['sftpgo', 'serve']
[build]
image = 'drakkan/sftpgo:latest'
[env]
SFTPGO_SFTPD__BINDINGS__0__PORT = '2222'
SFTPGO_SFTPD__BINDINGS__0__ADDRESS = '0.0.0.0'
SFTPGO_TELEMETRY__BIND_ADDRESS = '0.0.0.0'
SFTPGO_TELEMETRY__BIND_PORT = '9000'
[[mounts]]
source = 'sftpgo'
destination = '/srv/sftpgo'
[http_service]
internal_port = 8080
force_https = true
auto_stop_machines = 'stop'
auto_start_machines = true
min_machines_running = 0
[http_service.concurrency]
type = 'requests'
hard_limit = 250
soft_limit = 200
[[services]]
protocol = 'tcp'
internal_port = 2222
[[services.ports]]
port = 2222
[checks]
[checks.healthz]
port = 9000
type = 'http'
interval = '5s'
timeout = '10s'
grace_period = '30s'
method = 'get'
path = '/healthz'
[[vm]]
memory = '512mb'
cpu_kind = 'shared'
cpus = 1
[[metrics]]
port = 9000
path = '/metrics'