lark

next

Code Create Life
telegram
tg_channel
x
github
zhihu
email
follow

Deploy a free Telegraph image hosting using Cloudflare Pages

Telegraph Image is a free image hosting service that can serve as an alternative to Flickr and imgur. This tutorial will guide you on how to deploy and use Telegraph Image for free using Cloudflare Pages.

Project Repository#

Deployment Steps#

Preparation#

Firstly, ensure that you have a Cloudflare account and have your domain name bound to that account.

Fork Repository#

Fork the repository to your GitHub account.

Create Project#

In the Cloudflare Dashboard, navigate to the Pages management page, create a new project, and link it to the repository you forked. In the project settings, modify ProjectName and add the following environment variables.

Variable NameVariable Value
BASIC_USERUsername
BASIC_PASSPassword

Bind Custom Domain#

In the custom domain settings of Pages, add your custom domain. The system will automatically update the DNS records.

Bind KV#

After creating KV, bind it in the Pages settings - Functions, setting the variable name as img_url.

  • The daily free write quota is 1000 times, each new image load will consume this quota.
  • The daily free read operation is up to 100,000 times, each image load (without cache) will consume this quota.
  • The daily free delete operation is up to 1000 times, each deletion of an image record will consume this quota.
  • The daily free list operation is up to 1000 times, each access or refresh of the /admin page will consume this quota.

Redeploy#

After each change, you need to redeploy the project to make the changes take effect. After redeployment, you can access the admin panel at the following address: https://your.domain/admin

Admin Panel Features#

  • Total image count statistics
  • Image name search
  • Blacklist feature
  • Whitelist feature
  • Record deletion feature
Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.