# Hyperflow Setup

**Sygnal Hyperflow & Hyperspeed run on Cloudflare.** This provides a world-class edge-caching framework, full firewall support, and many more capabilities that we leverage to optimize your site's caching and delivery.&#x20;

Our setup process has three phases;

1. [Migrating your DNS to Cloudflare ](https://hyperflow.sygnal.com/install/cloudflare-dns-setup)
2. [Installing and configuring Hyperspeed](https://hyperflow.sygnal.com/install/hyperflow-installation) for your site&#x20;
3. ( Optional ). [Setting up monitoring and alerting](https://hyperflow.sygnal.com/install/monitoring-and-maintenance-setup) for your site ( *highly recommended*, but optional ).&#x20;

## Installation&#x20;

For each service,&#x20;

cd into that service codebase&#x20;

```
npx wrangler deploy --config wrangler.navi.jsonc
```

For the main Hyperflow app `hyperflow`  &#x20;

## Config

e.g. `wrangler.navi.jsonc`&#x20;

### Vars

Ensure the desired PATH\_HANDLERS and REWRITE\_HANDLERS are specified.&#x20;

```json
		"UPSTREAM_ORIGIN": "https://www.tournewzealand.com",
		"ORIGIN": "https://www.tournewzealand.com",

		// List of all RPC workers that support fetch() 
		// Determines order of execution 
		"PATH_HANDLERS": [
			{
				"binding": "HF_LLMS",
			},
			// {
			// 	"binding": "HF_WFX",
			// },			
			// {
			// 	"binding": "HF_INDEXNOW",
			// },			
		],

		// List of all RPC workers that support rewrite() 
		// Determines order of execution 
		"REWRITE_HANDLERS": [
			// {
			// 	"binding": "HF_WFX",
			// },
		],
		
		"POSTHOG_API_KEY": "phc_CfW1VAtR3ueFV3so5hxXQwb1l0RwsarirNw5M39Dz9T" // tournewzealand.com 
```

### Services

List only microservices we're connecting to.&#x20;

Make certain to update the binding names to the correct service.&#x20;

```json
	"services": [
		{
			"binding": "HF_LLMS",
			"service": "hf-llms-navi"
	 	},
		// {
		// 	"binding": "HF_WFX",
		// 	"service": "hf-wfx"
	 	// },
		// {
		// 	"binding": "HF_INDEXNOW",
		// 	"service": "hf-indexnow"
	 	// }
	],

```
