FTP / SFTP delivery
JSON2Video can upload rendered videos straight to your FTP or SFTP server, removing the need to download from our CDN and re-upload. This is the standard way to deliver finished assets to a media management system, a CMS staging area, or a customer's drop folder.
Configuration
Add an FTP or SFTP destination to the exports[].destinations array. We strongly recommend saving the server once in Dashboard → Connections (Output destinations → Add destination → FTP or SFTP) and referencing it by id:
{
"resolution": "full-hd",
"scenes": [ /* ... */ ],
"exports": [{
"destinations": [{
"id": "my-sftp-connection",
"file": "promo-__yyyy__-__mm__-__dd__.mp4"
}]
}]
}
The password is stored encrypted. Override any field at request time by re-declaring it — for example, set remote-path per render while reusing the saved host and login.
Before your first render, use Test in the dashboard: JSON2Video connects, logs in and lists the remote folder, without uploading anything. See Test a destination.
Inline credentials (not recommended)
If you must pass credentials inline, use the same JSON shape without an id:
{
"exports": [{
"destinations": [{
"type": "sftp",
"host": "sftp.example.com",
"port": 22,
"username": "uploader",
"password": "...",
"remote-path": "/incoming/videos/",
"file": "__random__.mp4"
}]
}]
}
The password then travels in every movie JSON and sits in your codebase. Prefer a saved destination.
Properties
| Property | Type | Required | Notes |
|---|---|---|---|
type |
string | yes | "ftp" or "sftp" |
host |
string | yes | host name or IP, without ftp:// and without a folder |
port |
number | no | defaults to 21 for FTP, 22 for SFTP |
username |
string | yes | account username |
password |
string | yes | account password / SSH password |
remote-path |
string | no | directory path; defaults to ./ (the folder you log in to); created if it does not exist |
file |
string | no | file name; defaults to __filename__ (the rendered file's own name) |
Filename macros
Both remote-path and file accept macros that are expanded at upload time. The most common:
__yyyy__,__mm__,__dd__— date components__hh__,__nn__,__ss__— time components__random__— 6 random characters__filename__— the rendered file's name (e.g.abc123.mp4)__filename_without_extension__(e.g.abc123) and__filename_extension__(e.g.mp4)
Example dynamic path:
{
"remote-path": "/customers/acme/__yyyy__/__mm__/",
"file": "acme-promo-__yyyy__-__mm__-__dd__-__random__.mp4"
}
Operational notes
- Timeout: all destinations of a render share a budget of about 5 minutes. Very large videos to slow servers may not finish in time.
- Order: destinations run one after another, in the order of the array. A failed upload does not stop the destinations after it (for example, a webhook listed after the FTP upload is still sent).
- Failure mode: if the upload fails, the movie's
statusis stilldone(the render succeeded). The failure is recorded in the movie'sdestinations_result, shown under Render logs → the render → Deliveries, and in the Last delivery column of a saved destination. - Failed renders: when a render fails there is no video, so FTP and SFTP destinations are skipped.
- Public hosts only: a host that resolves to a private, loopback or link-local address is refused, in tests and in deliveries. In passive mode, when an FTP server announces a private address for the data connection, JSON2Video connects to the server's public address instead.