Quick Start

The fastest, open-source way to deploy your Nuxt applications to Cloudflare.

The fastest, open-source way to deploy your Nuxt applications to Cloudflare. Nuxflare simplifies deployment with a single CLI command and requires only a Cloudflare API token - no additional accounts or complex setup needed.

Overview

Nuxflare automatically deploys resources according to your NuxtHub configuration, enabling seamless integration with @nuxt-hub/core.

NuxtHub is a platform for managing and deploying full-stack Nuxt applications globally using Cloudflare’s infrastructure.

Key Features

  • Single-command deployment using Infrastructure as Code (powered by SST)
  • CI/CD friendly - easy integration with your existing pipelines
  • Requires only a Cloudflare API token
  • Automatic resource provisioning for NuxtHub services:
    • AI
    • Blob Storage
    • Database
    • Cache
    • KV Storage
    • Vectorize

Quick Start

1. Clone a Template

Start by cloning a NuxtHub template that demonstrates the full capabilities of Nuxflare:

git clone https://github.com/RihanArfan/chat-with-pdf.git

2. Initialize Nuxflare

Initialize your project using the Nuxflare CLI:

npx nuxflare init

During initialization:

  • Choose your project name
  • Select your preferred package manager
  • Nuxflare will create a sst.config.ts file for deploying resources

3. Set Up Cloudflare Credentials

  1. Create a Cloudflare API token with the required permissions using this link

Cloudflare API Token Screenshot

  1. Set the token in your environment

4. Configure Environment Variables

To copy your local environment variables to your deployment stage:

npx nuxflare copy-env --stage dev

This command will:

  1. Read your local .env file
  2. Show a preview of the variables to be copied
  3. Set the environment variables for your specified stage

5. Deploy Your Application

Deploy to your chosen environment:

npx nuxflare deploy --stage dev

You can use any stage name and deploy multiple instances to a single account using different stage names.

6. Local Development

To connect to a deployed remote environment during development:

npx nuxflare dev --stage dev

This command starts the Nuxt development server and connects to the specified remote using NUXT_HUB_PROJECT_URL and NUXT_HUB_PROJECT_SECRET_KEY.