# SFTP

SFTP is a hardened Docker image that runs an OpenSSH SFTP server with Fail2ban, letting homelab users securely transfer files to shared host folders. It is open source and self-hosted, installable on Docker Hub, Kubernetes (Helm) and Unraid.

Canonical page: https://ourlocalhost.com/app/1192/sftp

## Description

SFTP is a hardened Docker image that runs an OpenSSH SFTP server with Fail2ban, letting homelab users securely transfer files to shared host folders.

## Platform availability

Available on 2 of 9 platforms: Unraid, Helm.

## Health score

28/100 (Low), based on 4 of 4 factors.
- Maintained: 0 (last commit 2040 days ago)
- Popular: 26 (20 GitHub stars)
- Easy to install: 45 (2 install platforms, install notes, Docker image)
- Light to run: 85 (500 MB minimum RAM)

## Links

- Docker Hub: https://hub.docker.com/r/markusmcnugen/sftp/
- GitHub: https://github.com/MarkusMcNugen/docker-sftp
- Kubernetes (Helm): https://artifacthub.io/packages/helm/sj14/sftp-server
- Unraid: https://ca.unraid.net/apps/sftp-0d5s5lb006rmn7?q=sftp

## Common questions

### Which port should I publish for the SFTP server?

OpenSSH listens inside the container on TCP port 22. You can map that to any host port, such as 2222:22.

### How do I share a host directory with a container user?

Mount the host path into a folder inside that user's home directory. The documented example mounts /host/upload to /home/user/upload.

### Where do I add SFTP users?

Add users to /config/sshd/users.conf. The /config volume is required and holds the SSH users file.

### Do Fail2ban bans persist between container reboots?

Yes, when /config is mounted persistently. Fail2ban stores its ban database in /config/fail2ban/fail2ban.sqlite3 for persistent bans between reboots.

---
Source: Our Local Host (https://ourlocalhost.com/app/1192/sftp), the self-hosted and open-source app directory.
