WebStorm 2016.2 Help

Vagrant

File | Settings | Vagrant for Windows and Linux
WebStorm | Preferences | Vagrant for OS X
Ctrl+Alt+S
settings


Use this page to:

  • Enable Vagrant support in WebStorm by specifying the Vagrant executable file.
  • Specify the location of the VagrantFile that determines creation of virtual boxes (instances) by provisioning predefined Vagrant base boxes through the vagrant up command.
  • Handle the list of Vagrant base boxes to use in creation of virtual boxes (instances).

Before you start working with Vagrant, make sure that:

  1. Vagrant is downloaded and installed.
  2. Install and enable the Vagrant plugin as described in the sections Installing, Updating and Uninstalling Repository Plugins and Enabling and Disabling Plugins.

    The plugin is not bundled with WebStorm, but it can be installed from the JetBrains plugin repository as described in Installing, Updating and Uninstalling Repository Plugins and Enabling and Disabling Plugins.
ItemDescription
Vagrant executableSpecify the fully qualified address of the executable file: vagrant.bat for Windows, vagrant for Unix and OS X. Type the path manually, or click the browse button and locate the desired file in the Select vagrant executable dialog box.
Instance folderSpecify here the fully qualified path to the directory, where the task vagrant init has been executed, and the VagrantFile is initialized and stored.

A VagrantFile is a configuration file that defines the instance (virtual machine) you need. The file contains the virtual IP address, port mappings, and the memory size to assign. The file can specify which folders are shared and which third-party software should be installed. According to the VagrantFile your instance (virtual machine) is configured, provisioned against the relevant Vagrant base box, and deployed on your computer. A VagrantFile is created through the vagrant init command.

When creation of an instance (virtual machine) is invoked either through the vagrant up command or through the Tools | Vagrant | Up menu option, WebStorm looks for the VagrantFile in the directory specified in the Instance folder field. For more information, see http://docs.vagrantup.com/v2/vagrantfile/.

You can create a VagrantFile in any directory and appoint it as instance folder. If the field is empty, WebStorm will treat the project root as the instance folder and look for a VagrantFile in it.

ProviderUse this field to specify the provider to be used by vagrant up command. If this field is left blank, the default provider is used.
Environment variableClick the ellipsis button or press Shift+Enter to specify the shell variables to be used to configure the providers' behavior.
Boxes and Plugins tabs
BoxesThis list shows the predefined Vagrant base boxes available in WebStorm. Each item presents a Vagrant base box on which Vagrant configures and launches its instances (virtual machines). The entries of this list correspond to the output of the command vagrant box list.
addAlt+InsertClick this button to download a new base box. This command corresponds to vagrant box add <name> <URL>. By default, WebStorm suggests the URL to the lucid32 box
deleteAlt+DeleteClick this button to remove the selected Vagrant base box. So doing, the box and the nested files are physically deleted from the disk. This command corresponds to vagrant box remove <name>
PluginsUse this table to view and change the list of available plugins.
addAlt+InsertClick this button to install a new Vagrant plugin.
deleteAlt+DeleteClick this button to remove the selected plugin.
update_iconClick this button to update the selected plugin.
attach_licenseUse this button to attach a license to the selected plugin.

See Also

Last modified: 15 November 2016