FTP / SFTP
With the FTP / SFTP system type, DDM fetches the files from a directory on a file server – including sub-directories – and keeps them up to date. That suits systems that store documents as files: a PIM that exports data sheets, a print service provider, an archive server.
Before you start
Have these ready – whoever runs the server knows them:
- the server's host name, e.g.
ftp.company.com, - which protocol it speaks – FTPS, SFTP or unencrypted FTP,
- an account that may read the directory – DDM needs nothing more,
- for SFTP with a key: the account's private SSH key,
- the directory from which files are taken over.
The DDM server must be able to reach the file server. With a hosted DDM the server must be reachable from outside, and a firewall in front of it must let DDM's address through.
Which protocol?
| Protocol | What it is | Port if empty |
|---|---|---|
| FTPS (FTP over TLS) – default | FTP with encryption (explicit TLS via AUTH TLS) | 21 |
| SFTP (over SSH) | file transfer over SSH – mostly on Linux servers | 22 |
| FTP (unencrypted) | classic FTP. User name, password and files travel over the network unencrypted | 21 |
Use FTPS or SFTP whenever the server supports it. Unencrypted FTP is only acceptable on your own, sealed-off network.
DDM connects in passive mode; the firewall in front of the server must allow its passive ports.
1. Add the source
Under Settings › External sources, add a source with New source, give it a name and choose FTP / SFTP as the System type.
| Field | What to enter |
|---|---|
| Host | Name or IP address of the server, without ftp:// or sftp:// – e.g. ftp.company.com |
| Port | Leave it empty for the usual port (21 or 22), otherwise the server's port |
| User | The account on the server. With FTP and FTPS, DDM signs in anonymously without a user |
| Password | The account's password – stored encrypted, never shown again |
| Folder (optional) | The directory from which files are taken over, e.g. /export/datasheets. Empty = the account's home directory (/) |
| Protocol | FTPS (FTP over TLS), SFTP (over SSH) or FTP (unencrypted) |
With SFTP, three more fields appear – see SFTP with an SSH key.
SFTP with an SSH key
Many SFTP servers only allow sign-in with a key. In that case, instead of a password, enter:
| Field | What to enter |
|---|---|
| Private SSH key | The account's private key, complete – from -----BEGIN OPENSSH PRIVATE KEY----- (or -----BEGIN RSA PRIVATE KEY-----) to the last line. Not the public key (ssh-ed25519 AAAA…) |
| Key passphrase | Only if the key is protected with a passphrase |
If a key is stored, DDM signs in with the key first. A Password entered as well is only tried if the server refuses the key. The matching public key must be stored for the account on the server (usually in ~/.ssh/authorized_keys).
You can create a key just for DDM like this, for example:
ssh-keygen -t ed25519 -f ddm_import -C "DDM import"
ddm_import is the private key for DDM; whoever runs the server adds ddm_import.pub to the account.
The host key
Every SFTP server identifies itself with a host key. DDM remembers it on the first successful connection and shows it under Host key (SHA-256), e.g. SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8.
If the server later presents a different key, DDM does not connect and sends no credentials: it could be another server pretending to be yours. The test then reports The server presented a different host key …, a sync … nothing was imported.
How to deal with it:
- Ask whoever runs the server whether it was reinstalled or its key replaced, and have them tell you the new fingerprint. They can find it on the server with e.g.
ssh-keygen -lf /etc/ssh/ssh_host_ed25519_key.pub. - If it matches the one named in the message, click Forget host key — trust the key presented on the next connection.
- Click Test connection – DDM remembers the new key.
If the fingerprints differ, do not forget the key, and find out with your IT who is answering.
2. Test the connection
Click Test connection. DDM signs in and reads the given directory.
| Message | What to do |
|---|---|
| Connected — sign-in and folder are fine. | All good. |
| No address has been entered yet. | The Host is missing. |
| The address does not answer — check the URL, the port and the firewall. | Host, port or protocol are wrong, or a firewall is blocking – with FTP/FTPS the passive ports too. |
| The server rejected the credentials — check the user and the password. | User, password or key are wrong, or the server does not know the public key. |
| The directory is not readable — check the path and the account’s rights. | The Folder does not exist, or the account may not read it. |
| The stored SSH key cannot be read — please paste it in OpenSSH or PEM format. | The key was pasted incompletely, it is a public rather than a private key, or the passphrase is wrong. |
| The server presented a different host key … | See The host key. |
| The test failed. | Another error – often a blocked address: with a hosted DDM, the host must not be on a private network. |
3. Import scope and sync
Under Import scope, decide how directories become categories and which files count, sync once with Sync now and switch on Source active – see Overview.
What applies to FTP and SFTP:
- DDM takes over all files from the given directory, up to 8 levels deep. It does not follow symbolic links. Hidden files (name starts with
.) count too – exclude them if needed with the File filter by listing only the extensions you want. - With Mirror the folder structure,
/export/datasheets/Pumps/P100.pdf(folder/export/datasheets) becomes the document P100.pdf in the category Pumps. - A file is recognised by its path. Renamed or moved, it becomes a new document in DDM; the old one stays.
- On every sync, DDM downloads every file and compares its content – the modification date and size on the server do not count. With many large files, a narrow Folder or an infrequent Sync pays off.
- DDM does not take over permissions from the server – who sees a document is governed by the category's permissions.
.tmp → .pdf), exclude the temporary name with a File filter such as *.pdf.