Allow to send Stapy website files to remote server by SFTP.
More verbose debug
First release



You can also use your local clone with git send-email.

#Stapy - SFTP deployment

Allow to send website files to remote server by SFTP.


  • Stapy >= 1.17.1
  • pysftp module
pip install pysftp


  1. Add the sftp.py plugin script in the plugins directory.

  2. Add the sftp.json config file in the source directory.


Open the sftp.json config file and edit with the remote server SFTP connection for the environments you want to deploy.

    "prod": {
        "host": "sftp.example.com",
        "user": "username",
        "pass": "password",
        "port": 22,
        "root": "./",
        "clean": false,
        "debug": true

prod is your Stapy environment name in the web directory.

Key Description Example
host SFTP server host sftp.example.com
user SFTP username john
pass SFTP password Password!
port SFTP port 22
root The server directory where to add website files ./
clean Clean the server directory before upload files false
debug Display uploaded directories in the terminal false

The cleaning option allows to remove website files to avoid orphan files on the server (like a resource renamed). Take care that the root folder is correctly configured before activation.


Note: A build is performed before the deployment.

#From URL

Access to

curl -s

#From Editor

Add a new deployment button in the editor.json configuration file:

  "grid": {
    "actions": [
        "path": "deploy/sftp",
        "class": "button-confirm pure-button",
        "label": "Deploy (SFTP)"