Skip to content

CloudRay

CloudRay automates server management and deployments. pageflare integrates as part of your deployment script — optimize your site after the build step.

Add pageflare to your CloudRay deployment script. The pattern is the same as any self-hosted server: build, optimize, then activate the deployment.

Add a step in your CloudRay script to install pageflare:

Terminal window
curl -fsSL https://get.appz.dev/pageflare/install.sh | sh

Or with npm:

Terminal window
npm install -g @pageflare/cli

Step 2 — Configure the Deployment Script

Section titled “Step 2 — Configure the Deployment Script”
Terminal window
# Build the site
npm ci
npm run build
# Optimize with pageflare
pageflare dist/ --in-place --no-progress
# Deploy (copy to web root, restart server, etc.)
rsync -avz dist/ /var/www/html/

Set PAGEFLARE_LICENSE as an environment variable on the server or in your CloudRay script:

Terminal window
export PAGEFLARE_LICENSE=your-license-key

Check the script output for the pageflare summary:

Done 145.2 KB saved (38.1%) 1.2s
Files 42 total, 38 optimized, 4 unchanged, 0 errors
FrameworkOutput directory
Astrodist/
Next.js static exportout/
Hugopublic/
Vitedist/

pageflare not found Make sure the install step runs before the optimize step. Use the shell installer for non-Node.js environments.