Azure App Service: Using cURL for deployment

cURL is a command line tool that can be used to send or receive files. cURL.exe supports numerous protocols like HTTP, HTTPS, FTP, FTPS, SFTP, LDAP, TELNET, SMTP, POP3 etc. For more information please refer the below links:


curl.exe -T <path-to-file-that-needs-to-be-deployed> -u “username:password” “FTP URL”

From curl documentation

T, —upload-file FILE Transfer FILE to destination
url URL URL to work with -u, –user USER[:PASSWORD] Server user and password
tlsuser USER TLS username
tlspassword STRING TLS password
tlsauthtype STRING TLS authentication type (default SRP)


  • Deployment over FTPS will work only if the version of the curl is SSL aware. Download it from here:

  • FTP endpoint of the web app. You can get this from portal or from the publish profile of the web app (under FTP section search for publishURL)
  • Username and password for authentication (Either deployment or publish profile credentials. See this)
    • With user-level credentials (User specific): sitename\username
    • With site-level credentials (Site specific/publish profile) : sitename\$sitename


Deploying via FTP

  • Launch command prompt
  • Browse to the folder location where curl was downloaded and execute the following command:
C:\>curl -T C:\sample.war -u “kaushalp\$kaushalp:<password>”


Deploying via FTPS

While using cURL via FTPS (FTP over SSL), the following error may be encountered when trying to connect over HTTP.


The following error is seen because curl will try to verify the certificate received in the Server Hello and it fails as it couldn’t verify the CA who issued the certificate.

This problem can be addressed by using an additional parameter either –cacert or -k can be specified.

C:\>curl -T C:\sample.war -u “kaushalp\$kaushalp:<password>” ftps:// -k

-k, –insecure Allow connections to SSL sites without certs (H)

C:\>curl -T C:\sample.war -u “kaushalp\$kaushalp:<password>” ftps:// –cacert e:\tools\kaushal-bundle.crt

–cacert FILE CA certificate to verify peer against (SSL)


Error: “curl: (25) Failed FTP upload: 550
This error is seen when the FTP URL does not contain a trailing slash “/”.

More Information:

Here is the default list of CA’s that are supported by curl: (This was the file that was downloaded under pre-requisites)

Users can generate their own crt file and pass it to CURL.

Comments (0)

Skip to main content