Embed videos

Embed videos

Embed videos directly on your website using Cloudflare Workers and R2 storage. Upload, manage, and embed videos with a simple dashboard. Get 10GB of free storage with Cloudflare R2, organize videos with tags, and track your usage with real-time statistics. Perfect for portfolios, content marketing, video galleries and any website that needs reliable video hosting without complex infrastructure; and without expensive pricing.
Share this feature
bb embed videos image
1

Prerequisites

Install Node.js

1. Download Node.js
2. Install it on your computer
3. The installation script will verify Node.js is installed automatically

Important: Node.js must be installed manually before running the CLI. The script will check if it's installed and show an error if it's missing.

Create Cloudflare account

1. Go to Cloudflare
2. Create a free account
3. Verify your email address

Note: Wrangler (Cloudflare CLI) will be installed automatically by the script if needed - you don't need to install it manually.

2

Install Embed Videos

Run the installation command

Open your terminal and run:

npx @bebranded/embed-videos init

Follow the interactive setup

The CLI will guide you through:

Prerequisites check

  • Verifies Node.js is installed
  • Installs Wrangler automatically if needed

Cloudflare authentication

  • If not logged in, a browser window will open
  • Log in to your Cloudflare account
  • Authorize the CLI

Select Cloudflare account (if you have multiple accounts)

  • Choose the account where you want to deploy

Choose Worker name

  • Enter a name for your Worker (default: embed-videos)
  • Example: `my-video-embed` or `client-videos`

R2 Bucket configuration

  • Option A: Create a new bucket
    • Enter a bucket name (default: embed-videos-storage)
  • Option B: Use an existing bucket
    • Select from your existing buckets

Cloudflare Access configuration (required)

  • Enter your email address (for Access policy)
  • Enter your Cloudflare API Token with Zero Trust permissions
  • Required permissions:
    • Account → Access: Apps and Policies → Edit
    • Account → Access: Organizations, Identity Providers, and Groups → Edit
    • Account → Account Settings → Read
  • The CLI will automatically configure Access to protect your dashboard

Automatic deployment

  • The CLI will generate all necessary files
  • Deploy your Worker to Cloudflare
  • Configure Cloudflare Access automatically
  • Display your dashboard URL

Installation complete

After installation, you'll see:

✅ Installation completed successfully!

📺 Your dashboard is available at:
   https://your-worker-name.workers.dev/dashboard

📝 Next steps:
   1. Go to your dashboard
   2. Upload videos
   3. Use the embed codes on your website

Important: Your dashboard is protected by Cloudflare Access. Only authorized users (your email) can access it. The dashboard URL is `/dashboard` - make sure to use the full URL with `/dashboard` at the end.

Save this URL → you'll need it to access your dashboard.

Still need help?