You are viewing an older version of this topic. To go to a different version, use the version menu at the upper-right. +

SFTP Endpoint


The SFTP endpoint implements a secure file transport channel so that your Mule application can exchange files with external resources. SFTP uses the SSH security protocol to transfer messages. You can implement the SFTP endpoint as an inbound endpoint with a one-way exchange pattern, or as an outbound endpoint configured for either a one-way or request-response exchange pattern.


SFTP endpoint configuration consists of two stages:

  1. Decide where you want to place the SFTP endpoint within your Mule flow, then drag it from the Palette to the appropriate place in the sequence of building blocks that make up your Mule flow.

    1. If you place the SFTP endpoint at the beginning of the flow, it will act as an inbound endpoint (i.e., message source), triggering the flow whenever it receives a message. (You can also use the Composite Source scope to wrap the SFTP endpoint along with other, similar endpoints (such as File or UDP) so that your flow can receive files through multiple transport channels).

    2. If you place the SFTP building block in the middle or at the end of the flow, it will serve as an outbound endpoint, passing information out of the flow to external resources.

      SFTP Inbound Endpoints can only be set to a one-way exchange pattern). SFTP Outbound Endpoints can be set to either a one-way or request-response exchange pattern.
  2. Configure the SFTP endpoint by providing values for the fields on the various tabs on the Properties pane, which you open by double-clicking the SFTP icon on the Message Flow canvas.

The SFTP Endpoint Properties pane contains five tabs, as detailed below:

General Tab


Field Description


Defaults to the generic endpoint name, which in this case is SFTP. Change the display name, which must be alpha-numeric, to reflect the endpoint’s specific role, i.e., File Retrieval Endpoint

Exchange Pattern

If set to one-way, an SFTP inbound or outbound endpoint will send the incoming message to the next building block in the flow. If an SFTP outbound endpoint is set to request-response (the SFTP inbound endpoint cannot be set to request-response), that outbound endpoint will wait for a response before sending the message. One-way is the default for both the inbound and outbound SFTP endpoints.

Output Pattern

(Applies to outbound SFTP endpoint only). Specify a pattern for naming files that get sent from the File endpoint to the connected file system. If this is not set, the File endpoint uses the same file-naming pattern used for incoming files.


Identify the outgoing (local) SFTP server, then supply user credentials for connecting to this server. Defaults to localhost. Enter the Fully Qualified Domain Name (FQDN) or IP address of the server on your host machine that will connect to the external SFTP server.


The port that connects to the local (host) server. (i.e., 22)


Specify a path that facilitates connection to the local server so that you don’t have to provide a username and password.


The username for authentication on the host server.


The password for authentication on the host server.

Advanced Tab


Field Description


Enter the address for this endpoint, i.e.,

Response Timeout

Specify how long the endpoint must wait for a response (in ms).


Choose from a drop-down list the character set used for message data. (i.e., UTF-8).

Disable Transport Transformer

Check this box if you do not want to use the endpoint default response transport.


Select from the dropdown list one of the formats this endpoint supports.

Polling Frequency

Specify how often to check for incoming messages. Default value is 1000 ms.

File Age

Sets a minimum period a file must wait before it is processed. This helps ensure that long files are received in their entirety before processing starts. However, Mule and the SFTP server must be on synchronized time for this feature to work properly.

Size Check Wait Time

The period to wait (in ms) between size-checks that determine if a file is ready to be processed.

Identity File and Passphrase Information

Information for PKI authentication.

References Tab


Field Description

Endpoint Reference

Use the drop-down list to select a previously configured global endpoint template, if any exist. If you have not created a global element for this type of endpoint, you do so by clicking Add and completing the fields on the pane that appears. Click Edit to modify a previously created global element.

Connector Reference

Use the dropdown list to select a previously configured connector template for this endpoint. If you have not created a connector for this type of endpoint, you can do so from this window by clicking Add. Click Edit to modify a previously created global element.

Request Transformer References

Enter a list of synchronous transformers that will be applied to the request before it is sent to the transport.

Response Transformer References

Enter a list of synchronous transformers that will be applied to the response before it is returned from the transport.

File Tab


Field Description

Archive Directory

The directory on the Mule server where the file will be archived. You must create this folder before starting Mule for application deployment. The user Mule runs under must have permissions to read and write to the folder.

Archive Temporary Receiving Directory

Specify a directory in which the archive file is temporarily held before being forwarded to the archive directory. This temporary directory must be configured if archiving is implemented.

Archive Temporary Sending Directory

Specify a directory in which the archived file is stored before it is sent to the outbound SFTP endpoint. This should be a sub-directory of the archive directory and must be specified if archiving is implemented.

Temp Dir

The directory in the inbound SFTP endpoint folder where incoming files are received, or, in the case of an outbound SFTP endpoint, where outgoing files are staged before sending.

Use Temp File Timestamp Suffix

Check this box to assign a unique time-and-date-based namestamp to the file when it is moved to one of the temporary directories.

Auto Delete

Check this box to delete the file after it has been read.

Documentation Tab


The Documentation tab lets you add optional descriptive documentation for an endpoint. Every endpoint component has a Documentation tab and optional Description field.

Field Description


Enter a detailed description of this SFTP endpoint for display in a yellow help balloon that pops up when you hover your mouse over the endpoint icon.

Reference Documentation

See the SFTP Transport Reference for details on setting the properties for an SFTP endpoint using an XML editor.