How to upload and download files to your application (SFTP/RSYNC)


This guide shows how to upload and download files to your application using sftp and rsync.


To complete this, you will need:

Problems provides upload and download mechanisms through the CLI but it can be handy to use native tools instead.


  1. Add a mount point to your application

    By default, all files deployed to through git are read-only. Only the folders defined as mounts are writeable.

    Open ./ and add a mount:

         source: local
         source_path: uploads

    Please refer to the mounts documentation if needed.

    Push your configuration change:

    git add
    git commit -m "Add mount"
    git push platform master
  2. Check the mount point is writeable

    platform ssh
    web@<environment id>:~$ touch web/uploads/test.txt

    The command above shouldn’t trigger any error.

  3. Get the environment ssh endpoint

    Both rsync and sftp protocols use ssh as the transfer layer. Each environment inside a project has its own ssh endpoint.

    If you have the CLI installed, you can run platform ssh --pipe to get the endpoint.

    If not, log into your project dashboard and click on the SSH button for the environment you want to get the endpoint:


    Our endpoint is <project id>-master-7rqtwti--app@ssh.<region>

Note: All the next commands will be using platform ssh --pipe as the endpoint. Feel free to replace with the full connection string if needed.

  1. Create test files

    Let’s create some files to play with:

    mkdir -p web/uploads
    touch web/uploads/test{0001..0010}.txt


  1. Upload a file or a directory

    To upload a directory, make sure you don’t specify the source folder (uploads in this case) in the destination. Take a look at man rsync to view all available options.

    rsync -avz web/uploads "$(platform ssh --pipe)":web/

    The log should list all files that were uploaded:

    sending incremental file list
    sent 603 bytes  received 210 bytes  325.20 bytes/sec
    total size is 0  speedup is 0.00

    We could have synced only the files with the following command:

    rsync -avz web/uploads/* rsync -avz web/uploads "$(platform ssh --pipe)":web/uploads/

    As rsync is transferring only the differences between the source and destination, relaunching the same command will end up in an empty transfer.

  2. Download a file or a directory

    Remove your local files:

    rm web/uploads/*

    We can now download them from

    rsync -avz "$(platform ssh --pipe)":web/uploads web/

    You can see in the output that all files are transferred back to our host.


Remove the files on if you have followed the rsync steps:

platform ssh "rm web/uploads/*"
  1. Upload a file or a directory

    To upload a file, specify the full path:

    scp web/uploads/test0001.txt "$(platform ssh --pipe)":web/uploads

    To upload a directory, add the -r argument:

    scp -r web/uploads "$(platform ssh --pipe)":web/

    The output should list the 10 files being transferred. Note that scp is not using incremental transfer. All 10 files are being transferred even if they already exist at the destination.

  2. Download a file or a directory

    Remove a local file first:

    rm web/uploads/test0001.txt

    To download a file:

    scp "$(platform ssh --pipe)":web/uploads/test0001.txt web/uploads/

    To download a directory:

    scp -r "$(platform ssh --pipe)":web/uploads web/


Remove the files on if you have followed the previous steps:

platform ssh "rm web/uploads/*"
  1. Get the SSH connection information with:
    platform ssh --pipe The returned URL is made from two distinct parts separated by the @ character.

  2. Configure your client

    Add a new bookmark to your client with the following configuration (based on our endpoint):

    hostname: <SSH_ENDPOINT>
    port: 22
    protocol: SFTP
    user: <SSH_USER>
    key/identity file: `/path/to/your/key

    FileZilla needs to have a .pem key file to list it.


    Connect to the site. You should be presented with the content of the root folder of your app.


  3. Upload a file or a directory

    Drag and drop files and folders from your computer to the mount:


  4. Download a file or a directory

    Drag and drop files and folders from the mount to your computer.


Transferring and managing files on your environments can be done using native tools that use ssh, scp, rsync, or sftp.