Sha256: 9ee2a8319568a10269589e3e7b3518388af43a5a23af7411a3d10fc69a75de2c

Contents?: true

Size: 1.9 KB

Versions: 19

Compression:

Stored size: 1.9 KB

Contents

---
layout: "docs"
page_title: "Vagrant Push - FTP & SFTP Strategy"
sidebar_current: "push-ftp"
description: |-
  Vagrant Push FTP and SFTP strategy pushes the code in your Vagrant development
  environment to a remote FTP or SFTP server.
---

# Vagrant Push

## FTP & SFTP Strategy

Vagrant Push FTP and SFTP strategy pushes the code in your Vagrant development
environment to a remote FTP or SFTP server.

The Vagrant Push FTP And SFTP strategy supports the following configuration
options:

- `host` - The address of the remote (S)FTP server. If the (S)FTP server is
  running on a non-standard port, you can specify the port after the address
  (`host:port`).

- `username` - The username to use for authentication with the (S)FTP server.

- `password` - The password to use for authentication with the (S)FTP server.

- `passive` - Use passive FTP (default is true).

- `secure` - Use secure (SFTP) (default is false).

- `destination` - The root destination on the target system to sync the files
  (default is `/`).

- `exclude` - Add a file or file pattern to exclude from the upload, relative to
  the `dir`. This value may be specified multiple times and is additive.
  `exclude` take precedence over `include` values.

- `include` - Add a file or file pattern to include in the upload, relative to
  the `dir`. This value may be specified multiple times and is additive.

- `dir` - The base directory containing the files to upload. By default this is
  the same directory as the Vagrantfile, but you can specify this if you have
  a `src` folder or `bin` folder or some other folder you want to upload.


### Usage

The Vagrant Push FTP and SFTP strategy is defined in the `Vagrantfile` using the
`ftp` key:

```ruby
config.push.define "ftp" do |push|
  push.host = "ftp.company.com"
  push.username = "username"
  push.password = "password"
end
```

And then push the application to the FTP or SFTP server:

```shell
$ vagrant push
```

Version data entries

19 entries across 15 versions & 4 rubygems

Version Path
vagrant-packet-0.1.2 vendor/bundle/ruby/2.3.0/bundler/gems/vagrant-04f7215b5e3f/website/source/docs/push/ftp.html.md
vagrant-packet-0.1.2 vendor/bundle/ruby/2.5.0/bundler/gems/vagrant-04f7215b5e3f/website/source/docs/push/ftp.html.md
vagrant-packet-0.1.2 vendor/bundle/ruby/2.4.0/bundler/gems/vagrant-04f7215b5e3f/website/source/docs/push/ftp.html.md
vagrant-packet-0.1.1 vendor/bundle/ruby/2.4.0/bundler/gems/vagrant-04f7215b5e3f/website/source/docs/push/ftp.html.md
vagrant-packet-0.1.1 vendor/bundle/ruby/2.5.0/bundler/gems/vagrant-04f7215b5e3f/website/source/docs/push/ftp.html.md
vagrant-packet-0.1.1 vendor/bundle/ruby/2.3.0/bundler/gems/vagrant-04f7215b5e3f/website/source/docs/push/ftp.html.md
vagrant-aws-detiber-0.7.2.pre.4 vendor/bundle/ruby/2.3.0/bundler/gems/vagrant-419afb4dcffe/website/source/docs/push/ftp.html.md
vagrant-aws-detiber-0.7.2.pre.3 vendor/bundle/ruby/2.3.0/bundler/gems/vagrant-419afb4dcffe/website/source/docs/push/ftp.html.md
vagrant-aws-detiber-0.7.2.pre.2 vendor/bundle/ruby/2.3.0/bundler/gems/vagrant-419afb4dcffe/website/source/docs/push/ftp.html.md
vagrant-aws-mkubenka-0.7.2.pre.22 vendor/bundle/ruby/2.3.0/bundler/gems/vagrant-f3fdbf414272/website/source/docs/push/ftp.html.md
vagrant-aws-mkubenka-0.7.2.pre.16 vendor/bundle/ruby/2.3.0/bundler/gems/vagrant-1ee58c40e3f5/website/source/docs/push/ftp.html.md
vagrant-aws-mkubenka-0.7.2.pre.14 vendor/bundle/ruby/2.3.0/bundler/gems/vagrant-5333e60e2d38/website/source/docs/push/ftp.html.md
vagrant-aws-mkubenka-0.7.2.pre.11 vendor/bundle/ruby/2.3.0/bundler/gems/vagrant-5333e60e2d38/website/source/docs/push/ftp.html.md
vagrant-aws-mkubenka-0.7.2.pre.10 vendor/bundle/ruby/2.3.0/bundler/gems/vagrant-5333e60e2d38/website/source/docs/push/ftp.html.md
vagrant-aws-mkubenka-0.7.2.pre.9 vendor/bundle/ruby/2.3.0/bundler/gems/vagrant-5333e60e2d38/website/source/docs/push/ftp.html.md
vagrant-compose-yaml-0.1.3 vendor/bundle/ruby/2.2.0/bundler/gems/vagrant-dbb756c7b6da/website/source/docs/push/ftp.html.md
vagrant-compose-yaml-0.1.2 vendor/bundle/ruby/2.2.0/bundler/gems/vagrant-dbb756c7b6da/website/source/docs/push/ftp.html.md
vagrant-compose-yaml-0.1.1 vendor/bundle/ruby/2.2.0/bundler/gems/vagrant-dbb756c7b6da/website/source/docs/push/ftp.html.md
vagrant-compose-yaml-0.1.0 vendor/bundle/ruby/2.2.0/bundler/gems/vagrant-dbb756c7b6da/website/source/docs/push/ftp.html.md