---
title: "Host content on your Server"
slug: "host-content-on-a-private-server"
updated: 2024-12-12T08:36:24Z
published: 2024-12-12T08:36:24Z
---

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

# Host content on your Server

Whatfix content can be easily exported and deployed from your servers. Self-hosting is useful when you are on an internal network and cannot access the Flows from the Whatfix cloud, or in cases when your IT security doesn't allow resource loading from remote servers.

          Note

          

- Before hosting the Whatfix content on your server, ensure that you have exported the production package. For more information, see [Export Production Package for Self Hosted Deployment](/studio/docs/enable-multi-format-content-export).
- The export method described here is a legacy process. Whatfix recommends you use a browser extension method of delivery so that the extension is automatically updated and your end-users see the latest content. For more information, refer to [Enable Extensions for Applications with Self-Hosted Deployment](/studio/docs/self-hosted-extensions).
- Whatfix also supports JS embed mode of delivery. To know more, see [Use JavaScript code to show Whatfix content](/studio/docs/integrating-whatfix-using-javascript).

  Host content on a private server 

Extract the content of the production package to your server. The extracted folder contains a file called **embed.nocache.js** inside the embed folder. ![settings_export_nocache.png](https://cdn.document360.io/a268766e-d74d-4619-9613-e2472f809ffb/Images/Documentation/settings_export_nocache.png)

Add the file as a static file in your application's HTML file as shown in the following.

```
<script type="text/javascript" src="/public/whatfix.com/embed/embed.nocache.js"></script>
```

Ensure that your web server has **Cache-control** set to "no-cache" for the *.nocache.js file so that the request to the origin server is validated before releasing a cached copy.

Popular Web servers and their no-cache settings are listed in the following snippet:

**Apache:**

```
<FilesMatch ".(nocache.js)$">
Header set Cache-Control no-cache
< /FilesMatch>
```

**Nginx:**

```
location ~ ^.*(nocache.js)$
{
    add_header Cache-Control no-cache;
}
```

  Host content on Apache web server 

**Prerequisite**: Before you begin with this procedure, you must have a separate, non-root user account with sudo(superuser do) privileges set up on your server.

Extract the content of the production package to your server. The extracted folder contains a file called **embed.nocache.js** inside the embed folder. ![settings_export_nocache.png](https://cdn.document360.io/a268766e-d74d-4619-9613-e2472f809ffb/Images/Documentation/settings_export_nocache.png)

Add the file as a static JS file in the section of your application's HTML file as shown in the following:

```
<script type="text/javascript" src="http://server_ip/whatfix.com/embed/embed.nocache.js"></script>
```

Refresh your application to see the live Whatfix content. ![warning](https://cdn.document360.io/a268766e-d74d-4619-9613-e2472f809ffb/Images/Documentation/warning.PNG)

          Note

          

Ensure that your web server has Cache-control set to no-cache for the *.nocache.js file, so that the request to the origin server is validated before releasing a cached copy.

  Host content on Amazon S3 

Use the following steps to set up your Amazon S3 bucket to host your content:

1. Create an [S3 bucket](https://aws.amazon.com/s3/) (if you don't already have one).
2. Create a user in Amazon AWS using ***IAM***	  and give the user write access to S3 under the individual's security policies.
3. Install Amazon AWS CLI to upload your exported flows directory to your S3.
4. Configure from the command line using '**configure**' command.
5. Enable static website hosting on your S3 bucket.
6. Point your browser extension to your S3 URL.

---

Use the following steps to host Whatfix content on Amazon S3:

- [Export Whatfix content](/docs/host-content-on-a-private-server#exportamazon)
- [Configure and Upload content](/docs/host-content-on-a-private-server#configureamazon)
- [Change Endpoint URL](/docs/host-content-on-a-private-server#changeamazon)

**Step 1: Export Whatfix content**

Before hosting Whatfix content on your server, ensure that you have exported the production package. For more information, see [Export Production Package for Self Hosted Deployment](/studio/docs/enable-multi-format-content-export).

---

**Step 2: Configure and Upload Content on Step**

There are different ways to host your content on Amazon. Host the content directly on Amazon S3 or use it along with Amazon CloudFront. Follow the instructions in [Hosting your content on Amazon](https://docs.aws.amazon.com/AmazonS3/latest/dev/hosting-websites-on-s3-examples.html)

---

**Step 3: Change Endpoint URL**

1. Go to your S3 instance and copy the Endpoint URL for your static website hosting.  

![end_point_amazon_aws.png](https://cdn.document360.io/a268766e-d74d-4619-9613-e2472f809ffb/Images/Documentation/end_point_amazon_aws.png)
2. Replace **//whatfix.com** in your content JS with the Endpoint URL that you copied in the step above.  

![set_attrib_whatfix_com.png](https://cdn.document360.io/a268766e-d74d-4619-9613-e2472f809ffb/Images/Documentation/set_attrib_whatfix_com%20%281%29.png)
3. Refresh your application and you should be able to view all the exported Flows.

          Note

          

- Whatfix recommends you use CDN servers to serve your content to ensure content scalability and good performance.
- To host your content on AWS CDN (Cloudfront), see [How do I use CloudFront to serve HTTPS requests for my Amazon S3 bucket?](https://aws.amazon.com/premiumsupport/knowledge-center/cloudfront-https-requests-s3/)
- Once you have the CDN configured, you can access Whatfix content from CDN with the domain name configured in Cloudfront.

 
  Host content on Microsoft Azure 

Use the following steps to set up Azure to access your website content:

1. Open the [Azure portal](https://portal.azure.com/) in your web browser.
2. Create a storage account (if you don't already have one).
3. Locate your storage account and display the account overview.
4. Select **Static website** to display the configuration page for static websites.
5. Select **Enabled** to enable static website hosting for the storage account.
6. In the **Index document name** field, specify a default index page of *index.html* . The default index page is displayed when a user navigates to the root of your static website.
7. Click **Save**. The Azure portal now displays your static website endpoint.
8. Click the " **$web**" (link to Azure storage container for this account) in this page.
9. Upload all the static files in this storage and make sure to provide public read access. With this, you can access your website content using the account endpoint.

---

Use the following steps to host Whatfix content on Azure:

- [Export Whatfix content](/docs/host-content-on-a-private-server#exportazure)
- [Configure and Upload content](/docs/host-content-on-a-private-server#configureazure)
- [Change Endpoint URL](/docs/host-content-on-a-private-server#changeazure)

**Step 1: Export Whatfix content**

Before hosting Whatfix content on your server, ensure that you have exported the production package. For more information, see [Export Production Package for Self Hosted Deployment](/studio/docs/enable-multi-format-content-export).

**Step 2: Configure and Upload Content**

There are different ways to host your content on Azure. Click the link below to evaluate your options. For detailed instructions, see [Hosting your content on Microsoft Azure](https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blob-static-website).

---

**Step 3: Change Endpoint URL**

1. Go to your Azure instance and copy the Endpoint URL for your static website hosting.
2. Replace whatfix.com in your content with the Endpoint URL that you copied in the aforementioned step. ![set_attrib_whatfix_com](https://cdn.document360.io/a268766e-d74d-4619-9613-e2472f809ffb/Images/Documentation/set_attrib_whatfix_com%281%29.png)
3. Refresh your application to see all the exported content.

          Note

          

- Once you have hosted your content on Azure, Whatfix recommends using a CDN to serve your content to ensure content scalability and good performance.
- For more information on setting up your Whatfix content on Azure CDN, see [Integrate a static website with Azure](https://docs.microsoft.com/en-us/azure/storage/blobs/static-website-content-delivery-network).

          Note

## Related

- [Where does Whatfix host content created for my application?](/where-does-whatfix-host-content-created-for-my-application.md)
