16 KiB
🗂️Open-source file hosting solution based on Cloudflare Pages, supporting multiple storage channels such as Telegram Bot, Cloudflare R2, S3, etc.
Important
Please check the announcement for upgrade notes on version 2.0!
🚀Project Website: CloudFlare ImgBed
Announcement
Pinned
- If you encounter issues during deployment or usage, please carefully read the documentation, FAQ, and existing issues first.
- Frontend repository: MarSeventh/Sanyue-ImgHub
- Note: This repository is a remake of the Telegraph-Image project. If you like this project, please support the original one as well.
2025.2.6 Version 2.0 Upgrade Notes
The v2.0 beta version has been released, with many changes and optimizations compared to v1.0. However, the beta version may have potential instability. If you prefer stability, you may delay updating.
Due to changes in the build command, this update requires manual operation. Please follow these steps:
- Sync your forked repository to the latest version (ignore if already synced automatically)
- Go to the Pages management page, enter
Settings->Build, edit theBuild configuration, and set theBuild commandtonpm install- All new version settings have been migrated to the Admin Panel -> System Settings interface, so generally no need to configure environment variables anymore. Settings made in the system settings interface will override environment variable settings. However, to ensure compatibility of images uploaded via the Telegram channel with the old version, please keep any previously set Telegram-related environment variables!
- After confirming the above settings are correct, go to the Pages management page, enter
Deployments, andRetrythe last failed deployment.
Notification About Switching to Telegram Channel
Due to abuse of the telegraph image hosting, the upload channel has switched to Telegram Channel. Please update to the latest version (see the last section of chapter 3.1 for update instructions) and set
TG_BOT_TOKENandTG_CHAT_IDaccording to the deployment requirements in the documentation, otherwise upload functionality will not work.Also, the KV database is now mandatory; if not configured before, please configure it as per the documentation.
For issues, please check section 5 FAQ first.
Ecosystem
1. Plugins
- Auto upload inside editor (Tampermonkey script): https://greasyfork.org/zh-CN/scripts/529816-image-uploader-to-markdown-to-cloudflare-imgbed (Author: Linux.do: calg_c)
2. Repositories
- Upload files to image hosting via TG BOT: uki0xc/img-up-bot: Upload using Telegram bot linked image hosting (Author: uki0xc)
Experience Links and Quality Blogs/Videos
Experience site: CloudFlare ImgBed
Access code: cfbed
Experience video: CloudFlare Free Image Hosting, easily protect your every wonderful moment! _ Bilibili
Related tutorial videos:
Related quality blogs (Thanks to every supportive contributor):
- CloudFlare-ImgBed project – yunsen2025's blog
- Completely free, step-by-step tutorial to build an unlimited space private image hosting with Cloudflare, supports authentication and adult content detection! - yunsen2025's blog
- Configure domestic CDN and split-line resolution for CloudFlare-ImgBed to enjoy ultimate speed at lowest cost! – yunsen2025's blog
- Build Telegram channel image hosting with Cloudflare Pages (lepidus.me)
- Tutorial for free image hosting based on CloudFlare and Telegram - Liu Xueguan | Blog (sexy0769.com)
- CloudFlare + Github, build your own free image hosting - Datouding's small blog (luckyting.top)
Recent Updates
Add Features:
- Beautify error images
- Upload page supports preview of ico and more formats
Update log: https://cfbed.sanyue.de/guide/update-log.html
1. Introduction
Free file hosting solution with full lifecycle features including upload, management, read, and delete, supporting authentication, directories, image moderation, random images, and other features (see Feature Docs for details).
2. Deployment and Q&A
3. Show
4. TODO
4.1 Add Features 💕
Feature update list
- ✅
Add paste image upload feature(completed 2024.7.22) - ✅
Add markdown, html format link copy(completed 2024.7.21) - ✅
Add admin panel entry on upload page(completed 2024.7.21) - 📝 Add user customization interface
Custom login and upload page backgrounds(completed 2024.8.25)Custom image hosting name and logo(completed 2024.8.26)Custom website title and icon(completed 2024.8.26)Custom background switch interval(completed 2024.9.11)Custom background opacity(completed 2024.9.12)Custom footer portal(completed 2024.10.20)Global custom link prefix(completed 2024.12.27)Footer hide option(completed 2025.2.4)
- ✅
Add random image API(completed 2024.7.25) - ✅
Improve multi-format link display, add UBB support(completed 2024.8.21) - ✅
Improve login logic, add backend auth code verification(completed 2024.8.21) - ✅
Support URL paste upload(completed 2024.8.23) - ✅
Auto compress images >5MB before upload(completed 2024.8.26) - ✅
Restyle upload page toolbar, support custom compression(completed 2024.9.28) - ✅
Refactor admin, add authentication and display optimization, add image detail page(completed 2024.12.20) - ✅
Add visit statistics, IP record, IP blacklist, upload IP blacklist in admin(upload IP blacklist done, visit record postponed) - ✅
Auto copy link on upload page click(completed 2024.9.27) - ✅
Upload settings memory (method, link format)(completed 2024.9.27, merged upload methods) - ✅
No password set, no redirect to login(completed 2024.9.27) - ✅
Add delete only successful uploads, retry failed uploads(completed 2024.9.28) - ✅
Optimize file naming on paste upload(completed 2024.9.26) - ✅
Add R2 bucket support(completed 2024.11.5) - ✅
Add batch blacklist and whitelist in admin(completed 2024.12.14) - ✅
Telegram Channel upload records bot and channel data for migration/backup(completed 2024.12.4) - ✅
Support custom naming methods(completed 2024.12.4) - ✅
Support auto retry with other channels on upload failure(completed 2024.12.12) - ✅
Backend list API pagination(completed 2024.2.5) - ✅
Support custom link prefix(completed 2024.12.4) - 📝 Integrate alist or implement webdav (under evaluation)
- ✅
Add file size record in details(completed 2024.12.10) - ✅
Support admin custom global default link prefix(completed 2025.2.1) - ✅
Open more file formats(completed 2024.12.9) - ✅
Auto clear CF CDN cache on delete, whitelist, blacklist(completed 2024.12.11) - ✅
Admin batch selection remembers user order(completed 2024.12.20) - 📝 Support custom upload path and album feature
Folder delete(completed 2025.3.6)File move(completed 2025.3.7)Fix ghost click bug on admin load more(completed 2025.3.6)Batch operations support folders(completed 2025.3.6)Admin pagination logic adjustment(completed 2025.3.6)
- ✅
Support multiple Telegram Bot Token load balancing(completed 2025.2.4) - ✅
Admin provides detailed setting info and guidance(completed 2025.2.5) - ✅
Logo redesign, login page optimization, setting tooltips(completed 2025.2.2) - ✅
Add S3 API channel(completed 2024.2.3) - ✅
Support short link naming(completed 2025.2.1) - ✅
Support dark mode(completed 2025.1.11) - ⏳ Support KV backup and restore
- ✅
Footer can be hidden(completed 2025.2.4) - ⏳ Search function enhancement
- ✅ Support pasting multiple links and external link management
- ⏳ Upload file MD5 record and hard link support
- ⏳ Upload page recent uploads display
- ⏳ Configure upload page default settings from admin
- ✅ Add announcement feature
- ⏳ Support width/height params on image access
- ⏳ Support image format conversion on upload
4.2 Fix Bugs 👻
Bug fix list
- ✅
Fix API upload not showing in backend(fixed 2024.7.25) - ✅
Migrate upload to TG channel due to telegra.ph closure(fixed 2024.9.7) - ✅
Fix infinite refresh when no admin auth set(fixed 2024.9.9) - ✅
Fix some videos not previewing (likely file issue) - ⏳ Add new image moderation channel
- ✅
R2 channel deletes bucket synchronously in admin(fixed 2024.12.4) - ✅
Add CORS header(fixed 2024.12.9)access-control-allow-origin: *in file response - ✅
Add upload page access restriction whitelist(fixed 2024.12.11) - ✅ Fix long file names covering buttons
- ✅ Fix
listAPI data completeness
5. Tips
-
Frontend is open source, see MarSeventh/Sanyue-ImgHub.
-
Sponsor: Maintaining the project is not easy. If you like it, please support the author. Your support is the motivation to keep going~
-
Sponsors: Thanks to the following sponsors for supporting this project!
-
Contributors: Thanks to the following contributors for their selfless contributions!
6. Star History
If you like the project, please give a free star✨✨✨, thank you very much!
7. Special Sponsors
-
AsiaYun: Provides cloud computing resources support (high defense servers | Fuzhou high defense | Guangdong Telecom | Hong Kong servers | US servers | Overseas servers)
-
DartNode: Provides cloud computing resources support







