Setup Guide

Set up and configure SFTP as a destination in RudderStack.

This guide will help you set up SFTP as a destination in the RudderStack dashboard. It also lists the configuration settings required to correctly send data from the supported sources to your downstream apps via SFTP.

Setup

In your RudderStack dashboard, add a source. Then, from the list of destinations, select SFTP. Then, click Continue.

Connection settings

SettingDescription
NameAssign a name to uniquely identify your destination in RudderStack.
HostEnter the host name or IP address of the server without the port number.
PortEnter the port number of the server.
User nameEnter the user name.
AuthenticationSelect the authentication mechanism from the dropdown. RudderStack provides the following options:
  • Username + Password
  • Username + SSH key
PasswordIf you have selected Username + Password, enter the password for the above user.
Private keyIf you have selected Username + SSH key, enter the full private key for the user including the header and footer.
File formatSelect the file format (CSV or JSON) from the dropdown.
File pathSpecify the path name where RudderStack stores the data. For example:

directory/{destinationID}/{jobRunID}/{YYYY}_{MM}_{DD}/file_{timestampInMS}.csv

Note that:

  • The parent directory of the file should already exist.
  • RudderStack supports specifying the date, time, and sync metadata variables within curly brackets ({}).
  • destinationID and jobRunID are required fields.
  • The date and time variables correspond to the upload time.

Specify file path variables

While specifying the file path where RudderStack stores all the data, you can also specify the date, time, and sync metadata variables within curly brackets ({}).

RudderStack supports the following date/time variables:

VariableDescription
YYYYYear in four digits. For example, 2024.
MMMonth in two digits. For example, 05.
DDDay in two digits. For example, 09.
hhHour in two digits (in 24-hour format). For example, 15.
mmMinutes in two digits. For example, 56.
ssSeconds in two digits. For example, 13.
msMilliseconds in three digits. For example, 460.
timestampInSecUNIX timestamp in seconds.
timestampInMSUNIX timestamp in milliseconds.

You also need to specify the following sync metadata variables in the path:

VariableDescription
destinationID
Required
The destination ID.
jobRunID
Required
Job run ID of a sync.

Some sample paths specified in the File path connection setting are shown below:

  • directory/{destinationID}/{jobRunID}/file_{timestampInMS}.csv
  • directory/{destinationID}/file_{jobRunID}_{timestampInMS}.csv

Next steps



Questions? Contact us by email or on Slack