I have successfully added a .kml local (to my windows machine) file as a vector layer to my QGIS project using the Data Source Manager "File"Source Type. I now want to do the same thing, but using FTP to a local FTP server which has .kml (or any other files e.g. .csv) on it. I have successfully setup a local Windows 10 FTP server on my machine (where my QGIS client is installed), and used FileZilla (free FTP client) to connect to my local FTP server to transfer files to and from. In FileZilla, the host is localhost, the username is my windows user name and the the password is my password and the Port is 21.

How do I configure QGIS Data Source Manager to do the same thing? I have selected HTTP/HTTPS/FTP in the type pull down list, but I need to enter a URI, as well as entering a Basic Authentication. So far, with my attempts, when I try to add the FTP source, I get a QGIS dialog saying "Invalid Data Source".

1 Answer 1


The clue to my answer came in reading an article about how to interface QGIS to Google Drive to do the same sort of thing I want to do with FTP.

In QGIS data source manager:

  • Select Protocol
  • Select Type = HTTP/HTTPS/FTP
  • URI = ftp://ftpserveraddress/filename
  • Authentication Basic Tab = enter the FTP username and password

My FTP serveraddress was localhost because it is on the same machine as my QGIS client (but it can be anything else e.g. 192.168.x.x).

My file was a .kml file, you must enter a valid file type, I am importing vector data and .kml is valid. You must also know the file name of the file you want to import.

If successful, QGIS will parse the file and open a dialog requesting you to add the data as a layer/s. If the file does not exist on the FTP server, is the wrong type, or your FTP access parameters (e.g. FTP address or username/password) as incorrect, QGIS will return a dialog which says "Download with protocol source type has failed, do you want to try the File source type", so you will not get any info on what specifically went wrong.

This is a way to implement a simple FTP file transfer type of interface to QGIS from an external bespoke application on another machine.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.