---
title: Golang module install
summary: null
url: >-
  https://www.fastly.com/documentation/guides/next-gen-waf/setup-and-configuration/module-agent-deployment/golang-module
---


## Download and install prerequisites

The Golang module requires two prerequisite packages to be installed: [MessagePack Code Generator](https://github.com/tinylib/msgp/) and the Signal Sciences custom [tlstext](https://github.com/signalsciences/tlstext) package.

Install these packages using the `go get` command to download and install these packages directly from their GitHub repositories:

```term copy nolinenums
$ go get -u -t github.com/tinylib/msgp/msgp
$ go get -u -t github.com/signalsciences/tlstext
```

## Download and extract the Golang module

1. Download the latest version of the Golang module from one of our websites:

    <!-- TabbedPanels component: 
    <Panel id="dl.security.fastly.com">

    ```term copy
        $ curl -O -L https://dl.security.fastly.com/sigsci-module-golang/sigsci-module-golang_latest.tar.gz
    ```

    </Panel>
    <Panel id="dl.signalsciences.net">

    ```term copy
        $ curl -O -L https://dl.signalsciences.net/sigsci-module-golang/sigsci-module-golang_latest.tar.gz
    ```

    </Panel>
     -->

1. Extract the Golang module to `$GOPATH/src/github.com/signalsciences`:

    ```term copy
    $ sudo mkdir -p $GOPATH/src/github.com/signalsciences
    $ sudo tar -xf sigsci-module-golang_latest.tar.gz -C $GOPATH/src/github.com/signalsciences
    ```

## Wrap your application

You will need to wrap your application in the Next-Gen WAF Golang module handler for the module to process requests and secure your application. For examples of how this could work, refer to our [hello world](https://github.com/signalsciences/sigsci-module-golang) and [Gin](https://github.com/signalsciences/sigsci-module-golang/tree/main/examples/gin) applications with the Next-Gen WAF Golang module successfully integrated.

> **HINT:** How to best wrap your application will depend on how your application is designed. The examples shown on our public repository are provided as an example, but the methods listed may not be ideal for your specific application.

## Related content

* [About module-agent deployment](/guides/next-gen-waf/setup-and-configuration/module-agent-deployment/about-module-agent-deployment)
* [Using an API with the Next-Gen WAF](/guides/next-gen-waf/developer/using-an-api-with-the-next-gen-waf)
