Text of developer.hashicorp.com › packer › docs › plugins › install as Styx crawled it on Nov 18, 2026. The page may have changed since. Only its words are kept, without pictures or layout, and only the first part of a long page.

Open the live page

Install Plugins | Packer | HashiCorp Developer

HashiConf 2025 Don't miss the live stream of HashiConf Day 2 happening now View live stream Packer Home Install Plugins Note Starting August 1st, 2025, the source for many official HashiCorp-maintained Packer plugins is moving from GitHub releases to the official HashiCorp release site, releases.hashicorp.com . Refer to Install HashiCorp-maintained plugins for more information. This topic describes how to install external plugins for Packer.

Refer to Packer Plugins Overview for additional information about plugins. Overview Specify one or more required plugins in a Packer template and run the initialization command. During initialization, Packer queries the source repository for plugins specified in the template that match the version constraints for the host operating system. Packer downloads and installs plugins and other dependencies specified in the template.

You can specify a remote project on GitHub or another host that distributes the plugin for Packer to install the plugin from. Refer to Requirements for additional information about installing plugins from a remote source. When you run the Packer template, Packer first checks the directory for installed plugins that match the version requirements specified in the template. If a suitable version of the plugin is not installed, Packer prints an error.

Packer downloads the required version from the source configuration. Manual installation method You can manually install plugins if you are unable to specify plugins in an HCL template file. You may need to use the manual plugin installation method if your plugins are still in development. Manually install a plugin using the packer plugins install command. You specify a local or remote plugin source and include a path to the binary to generate the SHA256SUM file required to load the plugin during Packer builds.

Refer to Requirements for additional information about installing plugins from a remote source. Note that Packer checks the plugin installation directory against the required_plugins block in the Packer template when you build artifacts using the template. Plugins specified in the template that have been installed manually must still comply with the version constraints set in the template. Installation directory By default, Packer installs plugins into the plugins directory at $HOME/.config/packer/plugins on Unix and %APPDATA%\packer.d\plugins on Windows, but you can specify a different directory using the PACKER_PLUGIN_PATH environment variable.

Note Plugin installation requires access to temporary files under TMPDIR . If the system's temp directory is non-writable or non-executable, use TMPDIR to override the location of the temporary file store used by Packer. Refer to the Packer configuration reference for additional information. Requirements To install a plugin from GitHub, the plugin must meet the following requirements: The repository must be named packer-plugin-<name> .

The project must have semantic version tags per the following format: v<major>.<minor>.<patch> . The release linked to the tag must be available with a shasums file that indicates which files are available in the release. To install a plugin from a host other than github.com , the host must serve the plugin files over HTTPS using the directory structure described in Host your own plugin source . GitHub API token GitHub's public API limits the number of unauthenticated requests per hour from a single IP address.

Refer to the GitHub rate limits documentation for additional information. If you expect to exceed the request rate limit, you can use a GitHub API token to authenticate requests and exceed the rate limit. We recommend setting a GitHub API token when running Packer from a continuous integration server to avoid potential rate limiting errors. Refer to Authenticate requests to the GitHub API for instructions. Install a plugin In your Packer template file, add the required_plugins block to the packer block.

Specify the name of the plugin and its version and source parameters. Setting a correct version constraint string is important for pinning plugin versions for build reproducibility. Refer to the packer block configuration reference for additional information. The following example configures Packer to install a plugin called happycloud . When the template is initialized, Packer downloads version 2.7.0 or newer of the plugin from GitHub: ```hcl packer { required_plugins { happycloud = { version = ">= 2.7.0" source = "github.com/hashicorp/happycloud" } } } ``` Run the packer init command.

Packer lists all installed plugins then installs the latest plugin version matching the version constraints specified in the required_plugins block. Refer to the init command reference for additional information. Install HashiCorp-maintained plugins HashiCorp now makes the following official HashiCorp-maintained plugins available through the HashiCorp release site . These plugins include: Amazon Ansible Azure Docker Google Cloud Platform QEMU Vagrant VirtualBox Starting in Packer 1.14.0, Packer automatically installs these plugins from the new release source, and you do not need to make any changes to your Packer templates.

To continue to automatically receive updates to these plugins, you must upgrade to Packer 1.14.0 or newer. If you cannot upgrade your version of Packer, you can still install new versions of these plugins manually. Refer to Manually install plugins using the CLI for more information. Host your own plugin source You can install plugins from infrastructure that you manage, such as an internal mirror or an artifact repository.

Specify the host and path in the plugin's source address, for example plugins.example.com/mirror/hashicorp/happycloud . The host must serve the following directory structure over HTTPS under the source's path: packer-plugin-happycloud/index.json packer-plugin-happycloud/<version>/packer-plugin-happycloud_<version>_SHA256SUMS packer-plugin-happycloud/<version>/<the zip files listed in the SHA256SUMS file> This is the same directory structure that releases.hashicorp.com serves.

Packer fetches index.json to discover the available versions, selects the version that matches the template's constraints, then downloads the plugin zip for the host platform and verifies it against the version's SHA256SUMS file. Version directory names do not include a v prefix. When the zip file names in a version directory do not include a plugin protocol version, such as packer-plugin-happycloud_1.0.0_linux_amd64.zip , the directory must also include the version's packer-plugin-happycloud_1.0.0_manifest.json file as published on releases.hashicorp.com.

The manifest supplies the protocol version that the file names omit. Mirror a plugin from releases.hashicorp.com Copy the plugin's directory tree from releases.hashicorp.com without modification, for example with wget --mirror or rsync . All verification artifacts, including the SHA256SUMS file, its signature, and each version's manifest.json , remain byte-identical to the files HashiCorp publishes. Mirror a plugin published as GitHub release assets Complete the following steps for each version of the plugin you want to serve: Create a version directory without a v prefix, such as packer-plugin-happycloud/1.0.0/ .

Copy the zip files from the GitHub release into the directory. Copy the release's SHA256SUMS file into the directory, removing the v prefix from the version in the file name. For example, packer-plugin-happycloud_v1.0.0_SHA256SUMS becomes packer-plugin-happycloud_1.0.0_SHA256SUMS . Do not modify the file's contents. Add the version to the plugin's index.json file. Only the version keys are required: { "versions" : { "1.0.0" : {} , "1.0.1" : {} } } GitHub release asset names include the plugin protocol version, so these versions do not require a manifest.json file.

A single host can serve content mirrored from releases.hashicorp.com and content mirrored from GitHub releases side by side, including for dif

The rest of this page is on the live site.