---
title: Heroku installation
summary: null
url: >-
  https://www.fastly.com/documentation/guides/next-gen-waf/setup-and-configuration/paas/heroku
---

The Next-Gen WAF agent can be deployed with [Heroku](https://www.heroku.com). The installation process is compatible with any of the language buildpacks.

## Prerequisites

[Copy the agent keys](/guides/next-gen-waf/setup-and-configuration/agent-management/accessing-agent-keys) for the site that you want the agent to be able to access. You will use the agent keys when configuring the Next-Gen WAF agent package.

## Installation

1. Log in to Heroku.

   ```term copy
   $ heroku login
   ```

2. Add the Signal Sciences buildpack from one of our websites to your application settings.

   ### Dl.Security.Fastly.Com

   ```term copy
      $ heroku buildpacks:add --index 1 https://dl.security.fastly.com/sigsci-heroku-buildpack/sigsci-heroku-buildpack_latest.tgz
   ```

   ### Dl.Signalsciences.Net

   ```term copy
      $ heroku buildpacks:add --index 1 https://dl.signalsciences.net/sigsci-heroku-buildpack/sigsci-heroku-buildpack_latest.tgz
   ```

   

   > **NOTE:** The Signal Sciences buildpack must run first or before your application's primary buildpack.

3. In your `Procfile` file, add `sigsci/bin/sigsci-start` so it precedes your existing start command:

   ```text
   web: sigsci/bin/sigsci-start YOUR-APPLICATION'S-START-COMMAND
   ```

   Example:

   ```text
   web: sigsci/bin/sigsci-start node index.js
   ```

4. Add the [Next-Gen WAF agent keys](https://www.fastly.com/documentation/guides/next-gen-waf/setup-and-configuration/agent-management/accessing-agent-keys) to your application's environment variables.

   ```term copy nolinenums
   $ heroku config:set SIGSCI_ACCESSKEYID=access-key-goes-here
   $ heroku config:set SIGSCI_SECRETACCESSKEY=secret-key-goes-here
   ```

5. Deploy your application. Heroku applications are typically deployed with the following commands:

   ```term copy nolinenums
   $ git add .
   $ git commit -m "my comment here"
   $ git push heroku main
   ```

## Configuration

- Each time you deploy your application, Heroku will automatically assign a new random name for the agent. An agent name for each deployment can be specified by setting the `SIGSCI_SERVER_HOSTNAME` environment variable:

  ```term copy
  $ heroku config:set SIGSCI_SERVER_HOSTNAME=agent-name
  ```

- Agent access logging can be enabled by setting the `SIGSCI_REVERSE_PROXY_ACCESSLOG` environment variable:

  ```term copy
  $ heroku config:set SIGSCI_REVERSE_PROXY_ACCESSLOG /tmp/sigsci_access.log
  ```

- The buildpack will install the latest version of the Next-Gen WAF agent by default. You can specify which agent version to install by setting the `SIGSCI_AGENT_VERSION` environment variable:

  ```term copy
  $ heroku config:set SIGSCI_AGENT_VERSION=1.15.3
  ```

Additional configuration options are listed on the [agent configuration page](https://www.fastly.com/documentation/reference/ngwaf/agent-config/).

## Related content

- [PaaS overview](https://www.fastly.com/documentation/guides/next-gen-waf/setup-and-configuration/paas/paas-install-intro)
- [Getting started with the agent](https://www.fastly.com/documentation/guides/next-gen-waf/setup-and-configuration/agent-management/getting-started-with-the-agent)
