CloudRay
CloudRay automates server management and deployments. pageflare integrates as part of your deployment script — optimize your site after the build step.
How It Works
Section titled “How It Works”Add pageflare to your CloudRay deployment script. The pattern is the same as any self-hosted server: build, optimize, then activate the deployment.
Step 1 — Install pageflare
Section titled “Step 1 — Install pageflare”Add a step in your CloudRay script to install pageflare:
curl -fsSL https://get.appz.dev/pageflare/install.sh | shOr with npm:
npm install -g @pageflare/cliStep 2 — Configure the Deployment Script
Section titled “Step 2 — Configure the Deployment Script”# Build the sitenpm cinpm run build
# Optimize with pageflarepageflare dist/ --in-place --no-progress
# Deploy (copy to web root, restart server, etc.)rsync -avz dist/ /var/www/html/Step 3 — Pro License
Section titled “Step 3 — Pro License”Set PAGEFLARE_LICENSE as an environment variable on the server or in your CloudRay script:
export PAGEFLARE_LICENSE=your-license-keyStep 4 — Verify
Section titled “Step 4 — Verify”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 errorsFramework Output Directories
Section titled “Framework Output Directories”| Framework | Output directory |
|---|---|
| Astro | dist/ |
| Next.js static export | out/ |
| Hugo | public/ |
| Vite | dist/ |
Troubleshooting
Section titled “Troubleshooting”pageflare not found Make sure the install step runs before the optimize step. Use the shell installer for non-Node.js environments.