Create Your Own Free Image Bed / File Hosting Site Using Cloudflare Free Services
Feb 9, 2026
This video is based on Github OpenSource Cloudflare-ImgBed project, which meets most of users' basic image or file hosting requirements. It supports multiple storage channels (S3, Telegraph, Cloudflare R2, Discord, Huggingface) which potentially can host unlimited files. It supports most commom image and video formats, supports multiple ways to upload with real time progress for uploading, auto-compressing your photos, etc.
This video presents how to use Cloudflare free R2 storage, KV Namespace and Pages to create this ImgBed project and use your own domain to access this site.
If you would like to know how to set up unlimited storage channel for your Imgbed project, check this video: https://youtu.be/YrbZbmD2r98
Related Post:
✍https://blog.51sec.org/2026/02/create-your-own-free-image-bed-using.html
✍Github: https://github.com/MarSeventh/CloudFlare-ImgBed
Related Videos:
🌟Use Cloudflare R2 and Pages to Create Your Own Free File Sharing Site (FlareDrive) - https://youtu.be/B6nH6ZTtkKg
🌟Free but Powerful Screenshot Capture Software - ShareX- https://youtu.be/pWGN9N1teR8
🌟Using Cloudflare Workers to Build Free Google Drive Indexer (GoIndex) in 5 Minutes - https://youtu.be/HjKjB8JKa08
🌟Using Cloudflare Workers to Create a Serverless Google Drive Indexer with New Theme (GoIndex) - https://youtu.be/5O4zQc4pvDs
🌟Unlimited Storage For Your ImgBed Hosted on Cloudflare Pages - https://youtu.be/YrbZbmD2r98
💖Chapters:
0:00 - Introduction
4:03 - Lets start it
6:42 - 1. Using Cloudflare page to deploy
10:13 - 2. KV Database Configuration
12:40 - 3. Create & Configure R2 Storage channel
15:27 - 4. Configure Your Storage Channel and Own Domain
22:00 - End Scene
✅#51Sec #NetSec #Cyber #Security #CyberSecurity #HomeLab
demo site: https://imgbed.51sec.org/browse/guest
If you found this video has some useful information, please give me a thumb up and subscribe this channel to get more updates:
⚡https://www.youtube.com/c/Netsec?sub_confirmation=1
⚡Resource Collection and Bookmarks: https://sites.51sec.org/
Learning and Sharing - 🔊海内存知己,天涯若比邻!
Discord: https://discord.gg/fCW9phn, Blog: https://blog.51sec.org
Show More Show Less View Video Transcript
0:09
[music]
0:10
Hello everyone. Welcome back to my
0:12
channel. This is Johnny.
0:15
In today's video, I'm going to show you
0:18
this really cool GitHub project,
0:21
CloudFare Image Pad. It is open source
0:24
file hosting solution. So that means not
0:28
only you can hosting your images, videos
0:31
also any files you can upload to it but
0:34
with images and videos they can process
0:38
it and optimize it to store for you in
0:42
the back end.
0:44
It's supporting docker and serverless
0:46
deployment. Basically, if you have your
0:48
own VPS, you can use Docker to deploy
0:51
it. And it also support CloudFare
0:54
serverless deployment, which I'm going
0:57
to introduce you in this video because
1:00
it's completely free. You don't need
1:02
have your own VPS. It's running in the
1:05
cloud. The free tier provided by
1:08
CloudFare is more than enough for you to
1:10
hosting a selfus
1:14
imaging site.
1:18
The thing I like is supporting multiple
1:21
storage channels. You can use Telegram
1:23
as back end, Discord, Colia R2, and S3
1:27
compatible storage sources or hacking
1:30
faces. I haven't tried all of them but
1:33
when I get some time I'm going to make
1:35
more videos to show you how to connect
1:37
into telegram or discord because lab
1:41
will give you unlimited file storage in
1:45
the back end
1:47
R2 does has a 10 gig limitation there
1:51
for a small project to hosting your
1:55
images which should be enough but if you
1:57
want to store large files
2:00
and more other type of files then you
2:05
may think about using telegram or
2:07
hugging face or discord. this Chinese
2:10
version and English version on the
2:13
GitHub. You can click English to see
2:16
this. Also, you can go to the official
2:18
website.
2:20
The deployment also shows here. You can
2:24
have multiple deployment cloud, Docker
2:27
or manual deployment. We're going to
2:29
using CloudFare deployment as example
2:32
since I do have quite a few videos to
2:35
show you how to use CloudFare in my
2:37
blog.
2:40
I have my blog post for this one. If you
2:42
search even search for the Cloudfare R2,
2:45
I do have other similar project
2:50
but for sure this one is so far I found
2:52
the best to use Cloudfare services using
2:56
the K V DB and auto storage to make a
3:00
perfect image Austin website.
3:04
You can also look at the demo site which
3:08
you can find from their project page
3:11
demo site here.
3:14
It might be a Chinese
3:17
but you will get the chance to translate
3:19
it to English when you using the Google
3:22
translate. The password is cfpad
3:28
and then you can using drag and drop
3:30
control c control V this type to paste
3:33
and upload. You can choose different
3:36
uploading method other than only use uh
3:39
copy paste or drag and drop. You can
3:42
paste any external link to here and
3:45
upload to it. So give it try. This is
3:48
demo side but for now let's go into the
3:51
deployment. We're going to follow the
3:54
guide here and then deploy it into my
3:58
CloudFare account and which you can see
4:01
how this work.
4:07
Since I'm going to use a cloud free
4:11
services to deploy this project, I need
4:14
to show you the free tier limitation. R2
4:18
here is our storage channel which has a
4:22
limitation 10 gig by per months. So at
4:27
the most you can store 10 GB files on
4:31
your storage for your image that
4:33
probably 10,000
4:37
depending on the th which is more than
4:39
enough for your own project.
4:43
Class A operation, class B operation, 1
4:46
million request, 10 million. You can
4:49
treat this 1 million right, 10 million
4:52
read this type of request since they are
4:55
using CDN. So you will find those
4:59
numbers in the real life in your real
5:02
website will be much below this
5:04
limitation.
5:06
The egress data transfer to internet is
5:09
free here.
5:11
This is pages. So
5:15
pages and works together when you're
5:18
using the free plan that uh 100k daily
5:22
request. So you may need to watch list
5:25
but if your website is not huge visitors
5:30
then it shouldn't be a problem. I would
5:32
strongly suggest set up a username
5:35
password for your image hosting website.
5:38
So it's only for you or your friend can
5:41
use it, not nobody else, not public
5:44
available. In case there's lots of uh
5:47
visitors, then this will be a limitation
5:50
for you.
5:52
Here is a KV database.
5:56
100k read, 1,000 right per day for
6:00
different keys. more than enough.
6:03
So, we don't need to worry about the L
6:06
KV database at all.
6:10
The most important thing for you to have
6:12
is your free account just like I showing
6:14
you and have my website register on my
6:18
email address. You can get the free ones
6:21
as long as you have email address. You
6:23
can separate your different project into
6:26
a different cloudfare account. In that
6:29
case that 100k limitation for your
6:33
worker pages can be easily accommodated
6:36
your request based on your project.
6:46
Start with compute and AI. Once you
6:49
logged in, go to your workers and pages.
6:52
You might have quite a few other workers
6:55
or pages created before. For me, I
6:58
already have some workers and pages
7:01
created here. Creating application.
7:05
We are what we are looking to deploy is
7:07
a pages. We are not deploying worker.
7:10
So, choose here. Get started. It will
7:13
ask you to import an existing git
7:16
repository. So what we can do we can go
7:19
back to GitHub project and uh you can
7:24
just fork this project into your own
7:27
repository. So as you can see right now
7:30
there's 5.1k
7:32
fork and 4.3k star. So it's very good
7:36
project
7:38
that's 4K.
7:40
So owner is me 51 sec. Then I will just
7:44
keep the same name. I don't want to
7:46
change it.
7:49
It should take only a couple of seconds,
7:51
right? It will be finish it. Once done,
7:54
we can go back our cloudfare here. Then
8:00
import an existing G repository. Let's
8:03
import it. Get started. Depending on
8:06
which GitHub project you are using. So
8:09
I'm using 51 sec. You can just select a
8:12
repository here. Cloud fair image bad
8:16
here this project
8:18
begin set up
8:21
again all of steps already been detailed
8:25
instructed in website so you can just
8:29
look at the layout deployment and go
8:31
through it.
8:34
So if you want to see what lay their
8:36
instruction here is cloudare page
8:39
deployment you just open this follow the
8:43
guide one by one and you should be able
8:45
to get it done. You also can take a look
8:48
at my blog post which has exactly what I
8:52
did and with screenshot show you how to
8:55
do it.
8:58
So here build command we're going to put
9:01
mpn install
9:06
branches you can put project name or you
9:09
can customize it the main branch
9:14
I'll put directory is loot folder and
9:17
click save and deploy
9:25
while it's deploying so you can wait
9:28
until finish but at the same time you
9:32
can start into configure database as you
9:35
can see from here the steps I'll show
9:37
you how to configure database we're
9:39
going to use KV database not using D1 it
9:43
looks like there's a better performance
9:46
uh a little bit less KV day free quarter
9:49
but for my project doesn't matter
9:53
it's also support large file uploaded So
9:58
I'm going to configure KV database for
10:01
it. Oh, it's been completed. The project
10:04
has been successfully deployed it. Now
10:07
let's continue to project. You can see
10:09
here as mentioned we're going to using
10:12
KV database. That's what we going to do
10:14
for next step.
10:19
To configure KV database, you go to your
10:23
CloudFare dashboard
10:26
and browsing down. You should be able to
10:28
see storage and database. We configured
10:32
our pages which is Cloudflare dash image
10:35
bad project
10:37
but we didn't bind it with our database
10:40
because we haven't created one. So now
10:43
let's create our workers KV.
10:49
I already have some created from my
10:52
previous project one drive link and the
10:56
shorten URL project and also the card
10:59
project. You can find all those projects
11:01
from my blog post or videos. Um for this
11:05
one I going to create a new one. Create
11:07
a new KV name space. We're going to name
11:10
it make it a simple img URL since it's
11:13
going to just store the image URL there.
11:17
So we don't need to create any KV pairs
11:19
that will be automatically populated by
11:21
our pages. So now we have to go back
11:24
pages to bind our project with this KV
11:28
DB. So go to settings binding add
11:35
can we name space
11:38
I'mg URL that's the one we you has to be
11:42
using this variable name since that's
11:43
going to be used by your pages so this
11:46
variable name going to be mapped to our
11:49
KV name space save it
11:53
now we finished our KV nameace
11:57
configuration since We change our
11:59
settings. We going to do the red
12:01
deployment.
12:05
Retry deployment.
12:08
It will take um probably 1 minute to get
12:11
it done. Let's wait until it finished.
12:25
As long as you can see the success, your
12:27
site was deployed, we are good. Now
12:30
let's go to the last step which is we're
12:34
going to configure our storage channel
12:36
using cloud flare R2 storage.
12:44
Let's continue to deploy this image pad
12:48
website. We try deploy this project in
12:52
cloud free pages. Now we going to get
12:55
our R2 bucket for our storage channel.
13:01
Go back to storage and database. So
13:04
there's R2 object storage here.
13:10
I do have some previous one I created
13:12
for my own but I do like to create a new
13:15
one. So I'm going to create the image
13:18
URL
13:20
create bucket.
13:24
I also wanted to have image review
13:27
functionality.
13:29
So that's why I need to enable public
13:32
access to it. So now let's go to
13:34
settings. Uh here is a public
13:37
development URL. So we can enable that
13:39
to expose the auto bucket to the
13:42
internet. Let's type allow to confirm.
13:48
So now then you should be able to get
13:50
this public available URL. And this is
13:56
development URL. The URL is rate limited
13:59
and not recommended for production. for
14:02
our home project my own image bad usage
14:08
more than enough you also can put your
14:10
custom domain if you don't mind put that
14:13
domain to associate with your bucket uh
14:16
that is also doable you can buy put a
14:20
new domain subdomain here u for me I'm
14:23
going to use a public development URL
14:26
here since we enabled the S3 bucket now
14:30
let's go to our project
14:36
here. Workers and the pages and the
14:39
settings. We're going to bind it.
14:43
Add a new binding
14:46
to bucket.
14:48
So we have image bad. So we need to
14:52
enter our variable name here. So lots of
14:55
variable names in the KV name space and
14:59
autobucket you have to use this name you
15:02
can change that save.
15:07
So now we have two bindings.
15:09
Now we finished most of our work here.
15:13
Uh we're going to go to next step
15:15
configure our pages to use our subdomain
15:20
and then configure the back end to make
15:23
sure all working. So now let's go to the
15:26
next step.
15:31
Now our previous step we finished
15:33
binding the cave name space and
15:35
autobucket. All those configuration has
15:39
been done in curlair. Uh we also got our
15:44
automatically generated subdomain for
15:46
pages staff. So this is already up and
15:49
running. We can see it's here. But for
15:52
us to use I want to use my own custom.
15:56
So I'm going to create one for the
15:58
image. That's it because that's my
16:01
domain. So continue
16:04
activate domain. That's how simple you
16:07
can get to your custom domain if you're
16:09
using cloud flare. Comparing to using
16:12
dockers to deploy list is most easiest
16:15
way completely free. You don't require
16:18
anything you purchase with just a
16:21
colorfree account and GitHub account.
16:24
Here it says imagebad51ac.org
16:28
has been set up. It may take up to 48
16:31
hours for DNS records to update but
16:35
usually it's much faster. What they do
16:38
is they want you to um create a same
16:41
name in record and uh it will be auto it
16:46
will be pointing to this target
16:55
depending on where's your DNS provider
17:00
um you might need to add that record
17:03
into
17:07
so as you can see so I don't have this
17:11
same name DNS record here so now it
17:16
everything is ready now um we can try to
17:19
use our own domain to access to it
17:26
now from the deployment page you can see
17:29
two domains both working.
17:35
So of course we like to use our our own
17:38
subdomain. So as mentioned before you
17:42
want to change the security setting to
17:44
make sure only you can access to it not
17:47
everyone in public they can manage it
17:50
for you. Um this by default is Chinese.
17:54
Um, and of course you want to translate
17:57
to English if you can understand in
17:59
Chinese that well,
18:02
system settings,
18:04
security settings,
18:06
there's user authentication and the
18:09
managing authentication. You may want to
18:12
put the password here. It's not public
18:15
available until you have the upload
18:18
password. You can log to do uploading.
18:21
And I can use a username, admin
18:23
username, the password to manage back
18:26
end. There's one small settings you may
18:29
want to change here based on the
18:31
configuration is upload settings. You
18:34
need to fill in the R2 public access
18:37
link because that R2 public access link
18:41
will give you a review because that is
18:44
public available. So they can directly
18:47
get that access link to review that uh
18:50
you uploaded
18:52
image. So in this case I'm going to
19:02
change that. So since we put a new
19:04
username password of course go to the
19:08
system settings. Um we're going to
19:11
upload settings.
19:13
When you come here, it says there's no
19:15
current no out to channel. The reason
19:18
why is since we binded, we haven't do
19:21
deployment yet. So let's come back here
19:24
and then we do our deployment.
19:43
You can see success. Let's come back
19:46
here.
19:51
So this is our image back of 51C.org the
19:54
back end. So let's refresh it
19:58
after you deploy it. You will see this
20:01
R2 in my it haven't set up the public
20:05
link yet. So let's do this.
20:10
There's a public access link which is
20:13
our R2 public access link.
20:21
Save it.
20:24
Okay, now all are ready. Let's exit.
20:28
So this is at the main login page. Now
20:31
we go to our main page here.
20:35
Let's get the one
20:37
image.
20:40
So here is cloudfare image bad image. So
20:43
let's copy image
20:45
and we come here paste in. So here you
20:49
see it asking you a password because now
20:53
there's password behind it. It's not
20:56
public available. If you don't have the
20:59
password, you won't be able to upload to
21:02
it. Okay.
21:06
Okay. We just uploaded one image and the
21:09
URL is here.
21:13
You can see the image on the your
21:16
subdomain and you can access it.
21:27
You can do system management
21:31
admin password login
21:35
and then now you can do file management
21:37
here as well. Pretty cool.
21:41
That's all for this project and I hope
21:44
you enjoyed it. If you do, give me a
21:47
thumb up. If you have any questions,
21:49
post your questions in this video. I
21:52
will reply back as soon as possible.
21:57
Thank you for watching. See you in my
21:59
next one.
22:07
>> [music]
22:08
>> My love
22:11
my
22:12
[music]
22:14
love money.
#Science
