#1999·sftpgo

[Bug]: sftpgo ping command fails when the endpoint is secured with ssl

Author: SalvoraCreated Jun 9, 2025Updated Aug 6, 2026
Labelsbug

⚠️ This issue respects the following points: ⚠️

  • This is a bug, not a question or a configuration issue.
  • This issue is not already reported on Github (I've searched it).

Bug description

As the title says, when a ssl cert is installed, the sftpgo command fails because it tries 127.0.0.1 which is not secured by tls

Steps to reproduce

  1. install a ssl cert
  2. activate it with env
  3. confirm that it works
  4. use "sftpgo ping" command

Expected behavior

couple of options here to address the issue

  • the "sftpgo ping" command can take an optional flag to skip tls verification
  • the "sftpgo ping" command can take an optional flag to define the target so that we can manipulate the dns when using docker with extra_hosts However, the expected behavior should be that it should not fail.

SFTPGo version

SFTPGo 2.6.6

Data provider

sqlite

Installation method

Community Docker image

Configuration

  - SFTPGO_HTTPD__BINDINGS__0__CERTIFICATE_FILE=${CERTIFICATE_FILE}
  - SFTPGO_HTTPD__BINDINGS__0__CERTIFICATE_KEY_FILE=${CERTIFICATE_KEY_FILE}

Relevant log output

bash
sftpgo@f78103c326d7:/etc$ sftpgo ping
2025-06-09T21:11:59.230 DBG Health Check URL "https://127.0.0.1:9443/healthz"
2025-06-09T21:11:59.243 ERR Unable to connect to SFTPGo: GET https://127.0.0.1:9443/healthz giving up after 1 attempt(s): Get "https://127.0.0.1:9443/healthz": tls: failed to verify certificate: x509: cannot validate certificate for 127.0.0.1 because it doesn't contain any IP SANs

What are you using SFTPGo for?

Private user, home usecase (home backup/VPS)

Additional info

No response