Skip to content

@indiekit/store-ftp

FTP content store adaptor for Indiekit.

Installation

npm install @indiekit/store-ftp

Requirements

A FTP server you can access with a username and password.

IMPORTANT

Store your username and password in environment variables called FTP_USER and FTP_PASSWORD so that only you and the application can see them.

Usage

Add @indiekit/store-ftp to your list of plug-ins, specifying options as required:

json
{
  "plugins": ["@indiekit/store-ftp"],
  "@indiekit/store-ftp": {
    "host": "ftp.server.example",
    "user": "username",
    "directory": "project/www"
  }
}

Options

OptionTypeDescription
hoststringYour FTP hostname, for example ftp.server.example. Required.
portnumberYour FTP port. Optional, defaults to 22.
userstringYour FTP username. Required, defaults to process.env.FTP_USER.
passwordstringYour FTP password. Required, defaults to process.env.FTP_PASSWORD.
directorystringDirectory to save files to. Optional.