HubL Reference

Table of contents
Close

How to connect to HubSpot via FTP

HubSpot supports uploading and downloading template files, stylesheets, Javascript files, and File Manager assets via FTP. This capability replaces the deprecated COS Uploader tool.

General instructions

The HubSpot FTP service runs on port 3200 at the hostname ftp.hubapi.comThe initial connection is in cleartext, but before the login password is sent, the connection MUST be upgraded to TLS. Clients should be configured for FTP-SSL with explicit auth. The login and password is the same as your app.hubspot.com login. Passive mode must be enabled.

Alternatively, you can connect with Implicit SSL on port 3201. In addition to the control port, the HubSpot FTP service uses a range of data ports. Each transfer gets randomly assigned a data port for the upload or download. In case you need to open up data ports for company firewalls, HubSpot's data ports are in the range 3203-3299.

There are two methods for providing secure FTP services - FTPS (FTP with SSL) and SFTP. HubSpot supports FTPS only.

Connect using an FTP client

Follow these steps to connect with an FTP client. The screenshots are from Fetch, an FTP client for Mac OS X. You can see examples of other FTP clients below. You can also connect with cURL.

Edit connection settings

Ensure that the connection is set to use TLS/SSL.

fetch-ftp-tls.png

Enter server

In the Host or Server field, enter ftp.hubapi.com.

server-fetch.png

Enter port

Enter 3200 for the port. If you prefer Implicit SSL, the port should be set to 3201.

fetch-port.png

Enter credentials

Enter your HubSpot username and password. You must be a HubSpot user in an account to connect via FTP.

fetch-creds.png

Connect

Connect to the server. Once successfully connected, you should see a folder called "portals."

fetch-portals.png

Directory structure

Within the "portals" folder is a HubID directory for each portal that your user is authorized in. Each of these HubID directories contains two subfolders:

  • files - assets uploaded to File Manager
  • templates - templates, CSS, and Javascript coded files found in Design Manager

 

Directory

Other FTP client examples

Cyberduck

Cyberduck

Filezilla

filezilla

Transmit

At this time, creating new directories, using Transmit or Coda, is not supported. Transmit names new directories "untitled folder", before renaming them, and HubSpot does not allow spaces in directory names. If you would like to use this FTP client, you can create and name the directories locally (without spaces) and then upload them via FTP.

Connect-Transmit

Coda

At this time, creating new directories, using Transmit or Coda, is not supported. Coda names new directories "untitled folder", before renaming them, and HubSpot does not allow spaces in directory names. If you would like to use this FTP client, you can create and name the directories locally (without spaces) and then upload them via FTP.

Connect-Coda

Interarchy

From the Preferences menu, select  Security and change FTP uses SSL (AUTH) from "Never" to "If Available".

Interarchy

Interarchy1

WinSCP

CuteFTP

Sublime SFTP

sublime-ftp

Connect with cURL

You can also connect with cURL using this command:


curl -v ftp://ftp.hubapi.com:3200/ --ftp-ssl --user yourlogin@yourcompany.com 

Local HubL Server + FTP

You can use the HubL Local Server with an FTP client to sync both the local and remote 'custom' directories. This workflow allows you to develop templates and CSS files locally, while still uploading them to your HubSpot account. To learn more, check out this article.

Troubleshooting tips

If you are unable to connect via FTP, check the log messages for the client. If your settings match those described above and the connection is consistently timing out, the connection is mostly being blocked by your network firewall. Make sure your firewall is not blocking the ports used by HubSpot's FTP.

As mentioned above, certain FTP clients such as Transmit are unable to create new template directories. Additionally, when creating directories in Design Manager, you are limited to creating directories in the custom/type_of_file/ directory. You must keep the same file structure that currently exists in Design Manager: custom/type_of_file/custom_folder/name_of_file.html.