Sign inSign up

11notes/sftp

By 11notes

Updated about 1 month ago

Run sftp rootless.

Image
Buildkit cache
0

8.2K

11notes/sftp repository overview

banner

SFTP

size5pxpulls5px5pxswiss_made

Run sftp rootless.

INTRODUCTION 📢

OpenSSH (created by OpenBSD) is the premier connectivity tool for remote login with the SSH protocol. It encrypts all traffic to eliminate eavesdropping, connection hijacking, and other attacks. In addition, OpenSSH provides a large suite of secure tunneling capabilities, several authentication methods, and sophisticated configuration options.

SYNOPSIS 📖

What can I do with this? This image will run a rootless sftp server based on openssh. Unlike other images, this image does not provide chroot jails, but it's intended to run as a single user with all the shares needed mounted in /home/%u. Use an SSH proxy in front of this image when you need to expose multiple endpoints via a single entry point. You must provide secrets to use this image.

UNIQUE VALUE PROPOSITION 💶

Why should I run this image and not the other image(s) that already exist? Good question! Because ...

  • ... this image runs rootless as 1000:1000
  • ... this image is auto updated to the latest version via CI/CD
  • ... this image has a health check
  • ... this image runs read-only
  • ... this image is automatically scanned for CVEs before and after publishing
  • ... this image is created via a secure and pinned CI/CD process
  • ... this image is very small

If you value security, simplicity and optimizations to the extreme, then this image might be for you.

COMPOSE ✂️

Checkout compose.secrets.yml if you want to use secrets instead of environment variables.

name: "sftp"

x-lockdown: &lockdown
  # prevents write access to the image itself
  read_only: true
  # prevents any process within the container to gain more privileges
  security_opt:
    - "no-new-privileges=true"

services:
  password:
    image: "11notes/sftp:10.5.0"
    <<: *lockdown
    environment:
      TZ: "Europe/Zurich"
      SSH_USER: "foo"
      SSH_PASSWORD: "${SSH_PASSWORD}"
    volumes:
      - "foo.var:/home"
    tmpfs:
      # needed for read-only
      - "/run/ssh:uid=1000,gid=1000,size=1m"
    secrets:
      - "ssh_host_key"
    ports:
      - "8021:22/tcp"
    networks:
      frontend:
    sysctls:
      # allow rootless container to access ports < 1024
      net.ipv4.ip_unprivileged_port_start: 22
    restart: "always"

  key:
    image: "11notes/sftp:10.5.0"
    <<: *lockdown
    environment:
      TZ: "Europe/Zurich"
      SSH_USER: "bar"
    volumes:
      - "bar.var:/home"
    tmpfs:
      # needed for read-only
      - "/run/ssh:uid=1000,gid=1000,size=1m"
    secrets:
      - "ssh_host_key"
      - "authorized_keys"
    ports:
      - "8022:22/tcp"
    networks:
      frontend:
    sysctls:
      # allow rootless container to access ports < 1024
      net.ipv4.ip_unprivileged_port_start: 22
    restart: "always"

volumes:
  foo.var:
  bar.var:

networks:
  frontend:

secrets:
  ssh_host_key:
    file: "./ssh_host_ed25519_key.txt"
  authorized_keys:
    file: "./authorized_keys.txt"

To find out how you can change the default UID/GID of this container image, consult the RTFM.

DEFAULT SETTINGS 🗃️

ParameterValueDescription
userdockeruser name
uid1000user identifier
gid1000group identifier
home/homehome directory of user docker

ENVIRONMENT 📝

ParameterValueDefault
TZTime Zone
DEBUGWill activate debug option for container image and app (if available)
SSH_USERusername to access SSH server
SSH_PASSWORDpasword to access SSH server
SSH_PASSWORD_FILE (optional)pasword file to access SSH server

MAIN TAGS 🏷️

These are the main tags for the image. There is also a tag for each commit and its shorthand sha256 value.

There is no latest tag, what am I supposed to do about updates?

It is my opinion that the :latest tag is a bad habbit and should not be used at all. Many developers introduce breaking changes in new releases. This would messed up everything for people who use :latest. If you don’t want to change the tag to the latest semver, simply use the short versions of semver. Instead of using :10.5.0 you can use :10 or :10.5. Since on each new version these tags are updated to the latest version of the software, using them is identical to using :latest but at least fixed to a major or minor version. Which in theory should not introduce breaking changes.

If you still insist on having the bleeding edge release of this app, simply use the :rolling tag, but be warned! You will get the latest version of the app instantly, regardless of breaking changes or security issues or what so ever. You do this at your own risk!

REGISTRIES ☁️

docker pull 11notes/sftp:10.5.0
docker pull ghcr.io/11notes/sftp:10.5.0
docker pull quay.io/11notes/sftp:10.5.0

UNRAID VERSION 🟠

This image supports unraid by default. Simply add -unraid to any tag and the image will run as 99:100 instead of 1000:1000.

NOBODY VERSION 👻

This image supports nobody by default. Simply add -nobody to any tag and the image will run as 65534:65534 instead of 1000:1000.

SOURCE 💾

PARENT IMAGE 🏛️

  • [${{ json_readme_parent_image }}](${{ json_readme_parent_url }})

BUILT WITH 🧰

GENERAL TIPS 📌

  • Use a reverse proxy like Traefik, Nginx, HAproxy to terminate TLS and to protect your endpoints
  • Use Let’s Encrypt DNS-01 challenge to obtain valid SSL certificates for your services

ElevenNotes™️

This image is provided to you at your own risk. Always make backups before updating an image to a different version. Check the releases for breaking changes. If you have any problems with using this image simply raise an issue, thanks. If you have a question or inputs please create a new discussion instead of an issue. You can find all my other repositories on github.

created 12.08.2026, 06:05:03 (CET)

Tag summary

Content type

Image

Digest

sha256:229926be9

Size

11.9 MB

Last updated

about 1 month ago

docker pull 11notes/sftp:10.5.0-nobody