Command Line Interface (CLI)

Cyberduck with a command-line interface (CLI) is available for Mac, Windows & Linux. It is installed as duck.



Available as a Homebrew package. Use

brew install duck

to install.


The port is maintained by a third party. Use

sudo port install duck

to install.

Snapshot Builds

brew install iterate-ch/cyberduck/duck


Download the latest installer package.


Usage:duck [options...]

Run --help to get the option screen.

URLs in arguments must be fully qualified. You can reference files relative to your home directory with /~ftps://


Paths can either denote a remote file ftps:// or folder ftps:// with a trailing /.

Connection Profiles

You can install additional connection profiles in the application support directory. Use the --profile option to reference a connection profile file to use not installed in the standard location.


The <url> argument for --copy, --download, --upload, and --synchronize must satisfy following rules:

  • Each URL must start with a scheme and a colon (https:) unless you specify a --profile.

  • Depending on the type of protocol you are referencing different rules apply

    • For all protocols where no default hostname is set (e.g. WebDAV, SFTP, and FTPS) you must use a fully qualified URI: https://user@hostname/path or sftp://user:password@hostname/path

    • For all protocols where a default hostname is set, but you are allowed to change it (e.g. S3) you may use fully qualified URIs or Absolute paths: s3:/bucket/path, Relative paths: s3:user@path or s3:user@/path.


    Omitting the first slash in a relative path uses the default home directory for this protocol.

    • For all protocols where a default hostname is set and you are not allowed to change it (e.g. OneDrive, Dropbox, Google Drive) you may use any combination of the above with the following rules: Fully Qualified URIs are parsed as relative paths. onedrive://Some/Folder/ is parsed as onedrive:Some/Folder.

  • For all protocols where a default path is set and you are not allowed to change it (e.g. accessing a prebuilt NextCloud profile with a path set to /remote.php/webdav). You are allowed to change the path but it will be appended to the default path. Making nextcloud:/path really nextcloud:/remote.php/webdav/path.


Spaces and other special-characters are not required to be percent-encoded (e.g. %20 for space) as long as the path is quoted duck --upload "scheme://hostname/path with/spaces" "/Path/To/Local/File With/Spaces".


Fully Qualified URI required

Absolute Path

Relative Path

Windows Azure Storage




Backblaze B2 Cloud Storage





Yes (dav://<hostname>/<path>)


Yes (davs://<hostname>/<path>)

Dracoon (Email Address)

Yes (dracoon://<hostname>/<path>)









FTP (File Transfer Protocol)

Yes (ftp://<hostname>/<path>)

FTPS (Explicit Auth TSL)

Yes (ftps://<hostname>/<path>)

Google Drive




Google Cloud Storage




Microsoft OneDrive




Amazon S3




SFTP (SSH File Transfer

Yes (sftp://<hostname>/<path>)

Spectra S3 (HTTPS)


Rackspace Cloud Files (US)




Swift (OpenStack Object

Yes (swift://<hostname>/<container>/<key>)


Home Directory

You can use the ~ character to abbreviate the remote path pointing to the home folder on the server as in duck --list s

  • List all buckets in S3 with

duck --username <Access Key ID> --list s3:/
  • List all objects in a S3 bucket with

duck --username <Access Key ID> --list s3:/<bucketname>/
  • List a vault on OneDrive without using the --vault option

duck --list "onedrive:/My Files/<vault name>/"
  • Download a single file from a vault on OneDrive

duck --download "onedrive:/My Files/<vault name>/<file name>" ~/Downloads/ --vault "/My Files/<vault name>/"

Generic Options


Retry requests with I/O failures once per default. Useful on connection timeout or latency issues.


Print protocol transcript for requests and responses. This includes the HTTP headers.


Do not save passwords in login keychain (macOS), credentials manager (Windows), or plain text password file (Linux).


Suppress progress messages.


Throttle bandwidth to the number of bytes per second.


You can pass username and password as part of the URI prepending to the hostname with username:password@host. Alternatively, use the --username option. You can give the password with the --password option or you will be prompted before the connection is opened by the program if no password matching the host is found in your login keychain (OS X) or user configuration shared with Cyberduck (Windows).

Private Key

When connecting with SFTP you can give a file path to a private key with --identity for use with public key authentication.

Tenant Name

When connecting with OpenStack Swift you can set the tenant name (OpenStack Identity Service, Keystone 2.0) or project (OpenStack Identity Service, Keystone 3.0) with --username <tenant>:<user>.

Downloads with --download

  • Download file <file> to directory <folder> on disk using

duck --download protocol:/<file> <folder>/
  • Download file <file> as <name> to directory <folder> on disk using

duck --download protocol:/<file> <folder>/<name>

Glob pattern support for selecting files to transfer

You can transfer multiple files with a single command using a glob pattern for filename inclusion such as

duck --download protocol://<hostname>/directory/*.css

Uploads with --upload

Note the inclusion or absence of a trailing / delimiter character to denote a file or directory on the server.

  • Upload the <folder> on disk to remote directory <name>/ using

duck --upload protocol:/<name>/ <folder>/
  • Upload file <file> to remote directory <folder> using

duck --upload protocol:/<folder>/ <file>
  • Upload file <file> as <name> to remote directory <folder> using

duck --upload protocol:/<folder>/<name> <file>

Glob Pattern Support for Selecting Files to Transfer

If your shell supports glob expansion you can use a wildcard pattern to select files for upload like

duck --upload protocol://<hostname>/directory/ ~/*.jpg

Synchronize folders with --synchronize

  • Synchronize directory <name> with directory folder on disk using

duck --synchronize protocol:/<name>/ folder/

Custom configuration options for uploads to S3

Add default metadata for uploads using the preferences option to read from the environment. The property is documented in Default metadata.

env "s3.metadata.default=Content-Type=application/xml" duck --upload …

Set a default ACL for the upload with

env "s3.acl.default=public-read" duck --upload …

Remote Directory Listing with --list

Make sure to include a trailing / in the path argument to denote a directory. Use the -L option to print permission mask and modification date in addition to the filename.

Edit with --edit

You can edit remote files with your preferred editor on your local system using the --edit command. Use the optional --application option to specify the absolute path to the external editor you want to use.

Purge Files in CDN with --purge

Purge files in CloudFront or Akamai CDN for Amazon S3 or Rackspace CloudFiles connections. For example to invalidate all contents in a bucket run

duck --username AKIAIWQ7UM47TA3ONE7Q --purge s3:/github-cyberduck-docs/

Multiple Transfer Connections with --parallel

Transfer files with multiple concurrent connections to a server.


Access to your Cryptomator Vaults from the command line. When accessing a vault using --download, --list or --upload, you will be prompted to provide the passphrase for the Vault if not found in the Keychain.

Use --vault <path> in conjunction with --upload to unlock a Vault. This allows uploading into a subdirectory of a Vault where the auto-detect feature does otherwise not work.


Watching Changes in Directory with fswatch and Upload

fswatch is a file change monitor; an application to watch for file system changes. Refer to their documentation.

fswatch -0 ~/Sites/mywebsite/ | xargs -0 -I {} -t sh -c 'f="{}"; duck --upload ftps://<hostname>/sandbox`basename "${f}"` "${f}" -existing overwrite'

Upload Build Artifacts from Continuous Integration (Jenkins) to CDN

use a post build script action.

cd ${WORKSPACE}; find build -name '*.tar' -print0 | xargs -0 -I {} -t sh -c 'f="{}"; duck --quiet --retry --existing skip --region DFW --upload rackspace://<container>/ "${f}"'

Upload Files Matching Glob Pattern to Windows Azure

duck --username kahy9boj3eix --upload azure://<containername>/ *.zip

Download Files Matching Glob Pattern from S3

duck --user anonymous --verbose --download s3:/* ~/Downloads/

Download File from Amazon S3 Public Bucket

duck --user anonymous --download s3:/ ~/Downloads/

Application Support Directory


The directory location is printed with --help following the list of supported protocols.

The support directory is ~/Library/Group Containers/ Support/duck/ on Mac. You can install third party profiles in ~/Library/Group Containers/ Support/duck/Profiles.


You can override default preferences by setting environment variables in your shell.

env "" duck

Known Issues

Slow Execution due to low Entropy in /dev/random

As a workaround run haveged, a service to generate random numbers and feed Linux random device.

Third-Party References