There are a couple of ways to upload data to a KeyCDN push zone. This guide walks through how to upload data both via FTP(S) and rsync to our CDN storage cloud.
How to upload Files with FTP/FTPS
- If you just created a new push zone, you need to wait a few minutes until your zone is ready.
- Connect to the FTP server:
- Hostname: ftp.keycdn.com
- Port: 21
- Username: “Same username as for the dashboard”
- Password: “Same password as for the dashboard”
- Each zone has its own folder with the same name. Copy the data to the according folder.
- Newly uploaded content is instantly available from the CDN.
We recommend to use FTPS (explicit FTP over TLS) to avoid plaintext transfer of your credentials over the network.
Verify the connection is using TLS:
Need help uploading content to the FTP server? All you need is an FTP client. We recommend FileZilla.
For reference or verification purposes, the SSH fingerprint for ftp.keycdn.com corresponds to:
How to upload Files with rsync over SSH
If you are interested in lsyncd read this article as well: lsyncd over SSH
- Upload ssh public key through the KeyCDN dashboard (Account-Settings > Authentication). It takes a few minutes until the key is distributed on the responsible servers.
- Make sure that you added your private key on your system before running rsync (command: ssh-add /path/to/your/private.key).
- Upload / synchronise your zone using the following command:
rsync -avz --chmod=u=rwX,g=rX <path_to_your_local_folder>/ <KeyCDN username (from dashboard)>@rsync.keycdn.com:zones/<zone name>/
Example (sync data):
rsync -avz --chmod=u=rwX,g=rX local_folder/ firstname.lastname@example.org:zones/foobar/
If you want to list the files of your zone use a command like this:
rsync --list-only <KeyCDN username (from dashboard)>@rsync.keycdn.com:zones/<zone name>/
Example (list directory):
rsync --list-only email@example.com:zones/foobar/
For reference or verification purposes, the SSH fingerprint for rsync.keycdn.com corresponds to:
How Data Gets Deployed via a Push Zone
Now that your data is uploaded to the push zone storage cluster, there are a few things to consider when it comes to deploying this data.
- New content is uploaded instantly to the storage cluster.
- If a change is made to an existing file, it takes approximately 15 minutes for that file to be updated (also seen as revalidated in the logs).
- It is not possible to purge the push content manually.
- Although your content has been uploaded to the storage cluster, data is only deployed to an edge server location if it has been requested.