-
Fork the repository to your GitHub account.
-
Create a project in Cloudflare Pages.
-
Select the
Sinkrepository and choose theNuxt.jspreset. -
Configure the following environment variables:
NUXT_SITE_TOKEN: Must be at least 8 characters long. This token grants access to your dashboard.NUXT_CF_ACCOUNT_ID: Find your account ID.NUXT_CF_API_TOKEN: Create a Cloudflare API token with at leastAccount.Account Analyticspermission. See reference.- (Optional)
NUXT_WEBHOOK_URL: The HTTPS endpoint that enables and receives click webhooks. - (Optional)
NUXT_WEBHOOK_SECRET: Awhsec_-prefixed Base64 secret. If omitted, delivery is unauthenticated and unsigned, which is not recommended over untrusted networks.
-
Save and deploy the project.
-
Cancel the deployment, then go to Settings -> Bindings -> Add:
- KV Namespace: Bind the variable name
KVto a KV namespace (create a new one under Storage & Databases -> KV). - Workers AI (Optional): Bind the variable name
AIto the Workers AI Catalog. - R2 Bucket (Optional, for OpenGraph image upload): Create an R2 bucket under Storage & Databases -> R2, then bind the variable name
R2to the bucket. - Analytics Engine:
- In Workers & Pages, go to Account details in the right panel, locate
Analytics Engine, and clickSet upto enable the free tier. - Return to Settings -> Bindings -> Add and select Analytics engine.
- Bind the variable name
ANALYTICSto thesinkdataset.
- In Workers & Pages, go to Account details in the right panel, locate
- KV Namespace: Bind the variable name
-
Add Compatibility flags
- Go to Settings -> Runtime -> Compatibility flags and set the following flags
nodejs_compat.
- Go to Settings -> Runtime -> Compatibility flags and set the following flags
-
Redeploy the project.
-
To update code, refer to the official GitHub documentation Syncing a fork branch from the web UI.
To optionally protect the dashboard with Cloudflare Zero Trust while keeping short links public, refer to Cloudflare Access Authentication.
Click webhook delivery is best effort and has no retries. See Click Webhooks for payload, signature, and privacy details.