Skip to content

Fleek

Fleek provides hosting for static sites on IPFS and other decentralized protocols. pageflare integrates by customizing the build command to optimize files before Fleek deploys them.

Override the build command in the Fleek dashboard or fleek.json to run pageflare after your framework’s build.

Terminal window
npm install -D @pageflare/cli

In the Fleek dashboard, set the Build Command to:

npm run build && npx @pageflare/cli dist/ --in-place --no-progress

Set the Publish Directory to dist/.

fleek.json
{
"builds": [
{
"buildCommand": "npm run build && npx @pageflare/cli dist/ --in-place --no-progress",
"publishDirectory": "dist"
}
]
}

In the Fleek dashboard, add an environment variable:

  • Key: PAGEFLARE_LICENSE
  • Value: your license key

After deploying, check the build logs 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/

Build fails with “command not found” Make sure @pageflare/cli is in your devDependencies. Fleek installs dependencies before running the build command.

pageflare processes 0 files The output directory doesn’t match your framework’s output. Update the path in both the build command and publishDirectory.