Skip to main content

SFTPWarden - Container-native SFTP management

Run an SFTP server in a container and manage its users from the command line.

SFTPWarden helps you set up a server for transferring files over SSH, control who can connect and keep user files and server identity across container replacements. OpenSSH handles the file transfers; SFTPWarden manages the users, configuration and deployment.

Keep SFTP users in sync automatically. Add or update accounts through the CLI or directly in your YAML file, database or other configured provider. SFTPWarden applies the user changes available to the running server, so you can grant access whenever it is needed without rebuilding the image or restarting the server. See automatic user synchronization for timing and deployment-specific delivery.

Use it for a team upload server, an automated file exchange or a local SFTP environment for development. Start with Docker Compose and a YAML file of users. Remote servers, database-backed users and Kubernetes are available when your environment needs them.

This documentation covers SFTPWarden 1.4.0. If you are upgrading an existing installation, read the recovery and upgrade guide first.

Table of Contents

Key Features

  • Synchronize users automatically: keep server accounts aligned with your provider, whether changes come from a command, a manual edit or another system.
  • Manage access: add users, use passwords or SSH keys and revoke access.
  • Keep user files: store uploads, server keys and operational state outside the container image.
  • Choose where users live: use a file or connect to a supported database.
  • Manage several environments: select a named context instead of repeating connection settings.
  • Deploy where you need it: use local or remote Docker Compose, Kubernetes manifests or Helm.

The server provides SFTP access within each user's restricted directory. It does not provide an end-user web portal, FTP/FTPS or a general-purpose SSH shell.

Installation

You need Python 3.11 or newer. The quick start also needs a running Docker engine with Compose v2, plus the OpenSSH sftp and ssh-keygen clients.

Install SFTPWarden:

python -m pip install sftpwarden

For development from source, see Contributing.

YAML, CSV and SQLite need no additional provider dependencies. For an external database, see the provider guide.

Shell Autocomplete

Run sftpwarden --install-completion, then open a new terminal. Shell completion helps you find commands and options as you type.

Quick Start

This example creates a local server accessible only from your own machine. Use a new directory and context name. Choose and confirm Alice's password when prompted:

mkdir ~/sftpwarden-demo
cd ~/sftpwarden-demo
sftpwarden init demo --yes
sftpwarden config server.host 127.0.0.1
sftpwarden user create alice --no-refresh
sftpwarden deploy

Connect with Alice's password:

sftp -P 2222 alice@127.0.0.1

On your first connection, verify the server fingerprint before accepting it. Use the upload/ directory for files and bye to disconnect.

YAML is the default user provider. You can choose another with --provider or change the global default. For a complete first transfer and the recommended SSH key setup, follow Getting Started.

Deployment Choices

Choose where the server runs independently of where you store user accounts. Docker Compose is the default; Kubernetes is optional.

Model Choose it when Guide
Local Compose You administer Docker on the same machine as the CLI. Useful for learning and single-host installations. Local runtime
Remote local-sync You keep project files on your workstation and deploy to a server over SSH. Remote deployment
Remote-only A project already exists on the server and you want to administer it in place. Remote deployment
Kubernetes / Helm You already operate a cluster and want to deploy through manifests or a chart. Kubernetes deployment

Project Files

The project directory holds sftpwarden.yaml (settings), a user provider and generated deployment files. For local Compose, data/ holds uploads, host_keys/ preserves server identity and state/ preserves runtime state.

These files have different roles. A user provider stores accounts and credentials; it does not store uploaded documents. Getting Started explains the layout before and after the first deploy.

User Management

With the demo running:

sftpwarden user create bob
sftpwarden users
sftpwarden user show bob

The create command asks for Bob's password and normally applies his access immediately. You can also edit the active provider directly: automatic synchronization is enabled by default and its periodic interval is 60 seconds. Use the provider's supported format; passwords stored there must be hashes.

Removing a user does not delete their uploaded files unless you explicitly request that. See the user command reference for updates, disablement, removal and deployment-specific behavior.

User Schemas and Named Keys

New projects use schema v2, which supports named keys, rotation and expiry. Schema v1 remains supported for existing projects. You do not need to choose a schema to complete the quick start.

See Named Keys when you need to manage several credentials for one account or migrate an existing provider.

Providers

A provider is the file or database that stores the SFTP accounts.

Need Provider options
Start with an editable file YAML
Exchange tabular user records CSV
Keep accounts in a local database file SQLite
Connect to an existing database service MySQL, MariaDB, PostgreSQL, MongoDB

Start with YAML if you have no existing database requirement. The provider guide covers dependencies, formats, capabilities, concurrent edits and migration.

Operations

User synchronization runs automatically by default. Deploy applies project settings; refresh lets you request a user update without waiting:

Change Apply it with
Project settings, such as the published port sftpwarden deploy
User data already visible to the running server Automatic synchronization or sftpwarden refresh to apply it now

The remote watcher delivers editable user provider files; it does not deploy project configuration. Kubernetes YAML/CSV user changes need a deploy to deliver the file to the cluster.

Follow Configuration for a complete port-change example or Operations for deployment, synchronization, health and troubleshooting.

Updating

Check releases with sftpwarden upgrade --check, preview with --dry-run, then run sftpwarden upgrade to update the CLI and installed watcher. Servers keep their current version until sftpwarden deploy --context NAME applies the update. Take a verified backup before maintenance.

If the new watcher is incompatible with a deployment, upgrade warns before making changes and asks permission to deploy all contexts, which may interrupt transfers. See the update guide, including the one-time installer update needed by CLIs older than 1.4.0.

Backup and Restore

Backups can preserve configuration, users, server identity and runtime state. Uploaded files require an explicit --include-data option. Archives may contain secrets and must be protected accordingly.

Follow the recovery guide to choose a capture and restore procedure for your deployment. A usable recovery includes checking access, uploaded files and server identity after activation.

Security

The quick start binds to 127.0.0.1 for local access. Before making a server available to other machines, review authentication, network exposure, host keys and backups in the security guide.

SFTP users have restricted directories, but you remain responsible for the Docker host, credentials and persistent storage. Keep private keys and backups out of source control.

Documentation

I want to… Read
Set up a server and transfer my first file Getting Started
Understand and change settings Configuration
Know how a change becomes active Configuration Effects
Choose account storage Providers
Rotate or expire SSH keys Named Keys
Deploy and administer an environment Operations
Recover or upgrade an installation Recovery
Review security responsibilities Security
Look up commands and options CLI Reference

The documentation uses Sphinx. Build instructions are in Contributing.

Roadmap

These are planned capabilities. See the changelog for release history and the longer future roadmap.

v1.5 - Audit and Transfer Visibility

Audit events, transfer visibility and richer runtime status.

v1.6 - Security and Client Trust

Security check profiles, secret-file support and assisted host-key management.

Contributing

Bug reports, documentation improvements, examples and code contributions are welcome. Create a branch from dev and open normal pull requests against dev.

SFTPWarden is licensed under the MIT License.

Metadata

Release files for sftpwarden 1.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sftpwarden 1.4.0
File Size Uploaded Provenance Actions
sftpwarden-1.4.0.tar.gz 1.4 MB With provenance Details for sftpwarden-1.4.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for sftpwarden 1.4.0
File Interpreter ABI Platform Actions
sftpwarden-1.4.0-py3-none-any.whl Python 3 none any Details for sftpwarden-1.4.0-py3-none-any.whl

Total release size: 1.8 MB

Release files / sftpwarden-1.4.0.tar.gz

Download URL sftpwarden-1.4.0.tar.gz
Size 1.4 MB
Tags Source
SHA-256 checksum
How to use checksums
b52029f0fd79d8cd632ee21db5073e4f15c127ce753bc164fcddc491109f86de
BLAKE2b-256 checksum
How to use checksums
762b9554d43bcd0f8d8d132cb65e047b6c8a0c732c0ddd2a699ef03f60e48e72
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 10, 2026.

Transparency log

Release files / sftpwarden-1.4.0-py3-none-any.whl

Download URL sftpwarden-1.4.0-py3-none-any.whl
Size 316.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
046cece79e3f94de951cd8b9bb2ff82d2e12934353454958be55c531bd3ee5f1
BLAKE2b-256 checksum
How to use checksums
0a7032564a9662127360f73ed4f4e369fc28f08b8480ac52d293cc3a2736792d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 10, 2026.

Transparency log

Security for sftpwarden 1.4.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for sftpwarden-1.4.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 10, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page