Skip to content

Prerequisites

Before deploying CloudFlare ImgBed, you need to prepare according to the storage channels you want to use.

🗄️ Storage Channel Preparation

1. Channel Overview

The project supports different storage channels as backend storage. Each channel has different advantages and limitations. You can choose the appropriate channel according to your needs.

Channel TypeAdvantagesLimitations
Telegram BotCompletely free, unlimited capacitySingle file maximum 20MB
Cloudflare R2No file size limit, enterprise-grade performanceCharges after 10GB free quota, requires payment method
S3 Compatible StorageDiverse options, flexible pricingPricing varies by provider

2. Telegram Bot Channel

2.1 Get TG_BOT_TOKEN

  • Search for @BotFather in Telegram
  • Send /newbot command
  • Follow prompts to enter Bot name and username
  • Get Bot Token (format: 123456789:ABCdefGHIjklMNOpqrsTUVwxyz)

Create Telegram Bot

2.2 Get TG_CHAT_ID

  • Create a new Telegram channel
  • Add the created Bot as channel administrator
  • Grant the Bot message management permissions
Telegram Channel ManagementTelegram Channel ManagementTelegram Channel Management
  • Send a test message in the channel
  • Forward this message to @VersaToolsBot
  • Get the channel ID (format: -1001234567890)

Get Channel ID

Note

  • The - sign before the channel ID is required
  • The Bot must have channel administrator permissions

3. Cloudflare R2 Channel

3.1 Create R2 Bucket

Create R2 Bucket

  • Click "Create bucket"
  • Enter bucket name (globally unique)
  • Select storage region
  • Click "Create bucket"

Create R2 Bucket

3.2 Configure Public Access (Optional)

If you need to enable image review functionality:

  • Enter the created bucket
  • Select "Settings" → "Public access"
  • Enable "Allow Access" or configure custom domain
  • Record the complete public access link (e.g., https://your-bucket.r2.cloudflarestorage.com/)

Configure R2 Bucket Public Access

4. S3 Compatible Storage

4.1 Supported Providers

ProviderRegionFeatures
Amazon S3GlobalOriginal S3 service
Qiniu CloudChinaFast domestic access
UpyunChinaCDN acceleration
Backblaze B2USAAffordable pricing
Cloudflare R2GlobalCloudflare ecosystem integration

Note

The above are tested S3 compatible storage providers. Other S3 compatible providers have not been tested and may have compatibility issues.

4.2 Required Information

  • S3_ACCESS_KEY_ID: Access key ID
  • S3_SECRET_ACCESS_KEY: Secret access key
  • S3_BUCKET_NAME: Bucket name
  • S3_ENDPOINT: Service endpoint URL
  • S3_REGION: Storage region (optional)

🔧 Optional Feature Preparation

Image Content Review

If you need to enable adult content detection:

  1. Visit ModerateContent
  2. Register and get free API Key (currently no longer supports free registration)
  3. Record API Key for subsequent configuration

🚀 Next Steps

After completing the preparation work, you can choose the appropriate deployment method:

Released under the MIT License