← All components

Cloudflare Hosting

Cloudflare Pages and Workers hosting configuration for Next.js applications. Includes wrangler.toml configuration and deployment documentation. Cloudflare provides global CDN hosting with edge functions and serverless databases.

Copy the files below, or open this folder on GitHub. Each file is stamped with a limited-use licence, generator and date. SHA-256 is of the published catalog bytes, before the stamp.

id
cloudflare-hosting
stack
Next.js
version
1.0.0
compatibility
nextjs >=16 <17 · react >=19 <20
requires
nextjs-base
env vars
CLOUDFLARE_API_TOKEN, CLOUDFLARE_ACCOUNT_ID, CLOUDFLARE_PROJECT_NAME
Verified passing · daily buildIntegrity sha256:2aff5aa735324a53

Files (3)

wrangler.toml · sha256:2aff5aa735324a53…
// Licensed by BotKelp — https://www.botkelp.com

/**
 * Wrangler Configuration for Cloudflare Pages
 * 
 * This file configures Cloudflare Pages deployment for your Next.js application.
 * 
 * Source: https://developers.cloudflare.com/pages/framework-guides/deploy-a-nextjs-site/
 * Verified: 2026-09-06
 */

# Cloudflare Pages configuration
name = "<%= projectName || 'nextjs-app' %>"
pages_build_output_dir = ".next/standalone"

# Build settings
[build]
command = "npm run build"
watch = { pattern = "**/*.{js,ts,jsx,tsx,css,json}", ignore = ["node_modules/**", ".next/**", ".out/**"] }

# Deployment settings
[deploy]
# The directory where your static assets are built
publish = ".next/static"

# Cloudflare Functions (Edge Functions)
[functions]
# Directory for Cloudflare Functions
# functions_directory = "functions"

# Environment variables
[vars]
NODE_ENV = "production"

# Next.js specific variables
# Uncomment and set these as needed
# NEXT_PUBLIC_BASE_URL = "https://your-app.pages.dev"
# NEXT_PUBLIC_API_URL = "https://your-app.pages.dev/api"

# KV namespace bindings (if using Cloudflare KV)
# [[kv_namespaces]]
# binding = "MY_KV"
# id = "your-kv-namespace-id"

# R2 bucket bindings (if using Cloudflare R2)
# [[r2_buckets]]
# binding = "MY_BUCKET"
# bucket_name = "your-bucket-name"

# D1 database bindings (if using Cloudflare D1)
# [[d1_databases]]
# binding = "DB"
# database_name = "your-database-name"
# database_id = "your-database-id"

# Durable Object bindings (if using Durable Objects)
# [[durable_objects]]
# name = "DO"
# class_name = "DurableObject"

# Site configuration
[site]
# Entry point for your application
entry_point = "node"

# Compatibility date for Cloudflare Workers
compatibility_date = "2024-01-01"

# Compatibility flags
compatibility_flags = ["nodejs_compat"]