> ## Documentation Index
> Fetch the complete documentation index at: https://docs.fingerprint.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Deploy Fastly VCL Manually

<Note>
  **Before you start: Read the general Fastly VCL guide**

  This document only covers deploying the Fingerprint Fastly VCL proxy integration using the Fastly web interface. It assumes you have already read the general [Fastly VCL guide](/docs/fastly-vcl-proxy-integration) and completed the following steps:

  * [Step 1](/docs/fastly-vcl-proxy-integration#step-1-create-a-fingerprint-proxy-secret): You have issued a proxy secret in the Fingerprint Dashboard (`PROXY_SECRET`).
  * [Step 2](/docs/fastly-vcl-proxy-integration#step-2-create-integration-path-variable): You have defined the path variable for the integration (`INTEGRATION_PATH`)
    If you want to use Terraform instead of the Fastly web interface to install the integration, see [Deploy Fastly VCL using Terraform](/docs/deploy-fastly-vcl-using-terraform).
</Note>

<Warning>
  **Limitations**

  This integration is exclusively supported for customers on the **Enterprise** Plan. Other customers are encouraged to use [Custom subdomain setup](/docs/custom-subdomain-setup) or [Cloudflare Proxy Integration](/docs/cloudflare-integration).
</Warning>

## Step 3: Deploy Fastly VCL manually

The recommended setup is to add the VCL template to your existing Fastly CDN Service serving your website.
If your website is running on Fastly CDN, skip to [Step 3.1](#step-3-1-create-a-dictionary-for-your-cdn-service).

If your website is not running on Fastly, you can still use the Fastly proxy integration by creating a dedicated Fastly CDN Service for it and hosting it on the subdomain of your website.
If so, please follow [Step 3.0](#step-3-0-create-a-new-fastly-cdn-service-if-required) to create a new Fastly CDN Service.

<Note>
  **Safari accuracy on non-Fastly websites**

  For maximum accuracy, both your website and your proxy integration should be served by Fastly.

  You can use the Fastly VCL proxy integration even if your website is not served by Fastly, but this setup will likely limit Safari cookie lifetime to 7 days, resulting in lower accuracy. Because your website and the proxy integration will likely have different IP ranges, Safari will apply the same cookie lifetime cap as for third-party CNAME cloaking. This is still an improvement over third-party cookies getting blocked entirely by Safari.
</Note>

### Step 3.0: Create a new Fastly CDN service (if required)

1. Go to **Fastly** > **CDN Services** and click **Create Service** in the top right.
2. Fill in the form:
   1. Set **Name** to something descriptive, for example: `Fingerprint Proxy Integration`.
   2. Set **Domain** to the subdomain you have chosen for the integration, for example, `metrics.yourwebsite.com`. Avoid terms commonly blocked by ad blockers like `fingerprint`, `fpjs`, etc.
   3. Set **Origin** to something like `metrics-origin.yourwebsite.com`. This origin does not need to exist because the VCL template will forward all valid requests to the appropriate Fingerprint servers.
   4. If your website needs to be accessible on HTTP (not just HTTPS), disable **Force TLS & HSTS**.
3. Click **Activate**.
4. Using the left-hand menu, go to **Domains** > **TLS Management** > **Domains**.
5. Click **Secure my domain** and pick **Use certificates Fastly obtains for you**.
6. Enter your domain (for example, `metrics.yourwebsite.com`) and click **Add**.
7. Keep the default settings and click **Submit**.
8. Follow the instructions on the screen to [verify ownership of your domain](https://docs.fastly.com/en/guides/setting-up-tls-with-certificates-fastly-manages#verifying-domain-ownership).
   This usually involves creating a CNAME DNS record on your domain like `_acme-challenge.metrics.yourwebsite.com`.
   Give Fastly some time to verify the DNS record. After verification is completed, Fastly will issue a certificate for your domain and display a green **Active** status.
9. Once your domain is verified and active, you need to [choose the right hostname for your DNS record](https://docs.fastly.com/en/guides/working-with-cname-records-and-your-dns-provider#choosing-the-right-fastly-hostname-value-for-your-cname-record).
   1. Your hostname is likely [TLS-enabled](https://docs.fastly.com/en/guides/working-with-cname-records-and-your-dns-provider#tls-enabled-hostnames) so you can go to **Domains** > **TLS Management** > **Domains**.
   2. Find your domain and click **View details**.
   3. The **CNAME records** section contains the value for your CNAME record, for example: `t.sni.global.fastly.net`.
10. [Add a subdomain CNAME record](https://docs.fastly.com/en/guides/working-with-cname-records-and-your-dns-provider#setting-up-the-cname-record-with-your-dns-provider) to your domain's DNS and point it to the Fastly hostname from the previous step. For example:
    ```txt theme={"theme":"github-dark-dimmed"}
    metrics.yourwebsite.com.    3600    CNAME    t.sni.global.fastly.net.
    ```

### Step 3.1: Create a dictionary for your CDN Service

In this step, you are going to create a dictionary for your CDN Service and use it to store the configuration of your proxy integration.

1. Navigate to **CDN** > **CDN Services** and find your CDN service.
2. If you don't have an editable version of your service, navigate to the **Service configuration** tab, then click **Clone to edit**.
3. Using the left-hand Service menu, navigate to **Data** > **Dictionaries**.
4. Click **Create Dictionary**.
5. Set the name to `fingerprint_config` and click **Add**. The default VCL template relies on this exact name.
6. Click **Add Item** to add the following key-value pairs:
   1. Set `PROXY_SECRET` to the proxy secret you created in the Fingerprint Dashboard in [Step 1](/docs/fastly-vcl-proxy-integration#step-1-create-a-fingerprint-proxy-secret).
   2. Set `INTEGRATION_PATH` to the random string you defined in [Step 2](/docs/fastly-vcl-proxy-integration#step-2-create-integration-path-variable).

<Note>
  **Note: Proxy secret required**

  Proxied identification requests without a valid proxy secret will result in an authentication error and not receive identification results.
</Note>

### Step 3.2: Download the Fastly VCL template

Go to [the latest integration release on GitHub](https://github.com/fingerprintjs/fastly-vcl-proxy/releases/latest), and download the artifact named `fingerprint-pro-fastly-vcl-integration.vcl`.

### Step 3.3: Upload VCL template

1. Using the left-hand Service menu, navigate to **VCL** > **Custom VCL** and click **Upload custom VCL**.
2. Set a name that suits you, for example, `fingerprint_proxy_integration`.
3. Upload the `fingerprint-pro-fastly-vcl-integration.vcl` file that you've downloaded in the previous step.
4. Click **Add**.

### Step 3.4: Activate your version and verify your setup

1. Scroll up to the Service version toolbar and click **Activate** to deploy your changes.
2. Go to `https://metrics.yourwebsite.com/INTEGRATION_PATH/status`. You should see an integration status page showing the template version and a checklist of the set dictionary variables.

## Step 4: Configure the client agent

Go back to the general Fastly VCL guide to [Configure the Fingerprint client agent to use your service](/docs/fastly-vcl-proxy-integration#step-4-configure-the-fingerprint-javascript-agent-on-your-client).
