Deployment
Deploy your own high-performance, globally distributed Pixelflare CDN instance on Cloudflare's edge network
Get Started
The infrastructure might seem complex, but deployment is quite simple, and is managed using a set of automated scripts (primarily Terraform, Wrangler and a tiny bit of bash to glue things together).
Deployment Requirements
Before you begin, you'll need:
- ✓ A Cloudflare account, a domain, and a Cloudflare API token
- ✓ A fork of the Pixelflare repo (cloned, with dependencies installed)
- ✓ Git, Terraform, Node, pnpm, wrangler and Make installed
Deployment Methods
You've got several deployment options:
- Automated 1-script deployment Recommended
- Manual deployment via Cloudflare UI
- CI deployment via GitHub Actions
Deployment Process
- Ensure all prerequisites are met
- Fork, clone, cd the repo and install dependencies
- Generate tokens and secrets, and configure the env vars
- Run the deployment command for your chosen method (see diagram below)
- Login and start using your new Pixelflare instance!
- (Optional) configure advanced settings and features
This part might look like a lot, but once you've set your variables everything all handled automatically by the make deploy command
Post-Deployment Configuration
After your instance is deployed, it is all ready to go! But there's some extra features you can enable and some settings you can tweak to make it perfect for you!
- Authentication - Configure Cloudflare Zero Trust, OAuth, or no-auth mode
- Image Transformations - On-the-fly image resizing and optimization
- Queues - Async processing for variants, backups, and custom domains
- Rate Limiting - Prevent API abuse with configurable limits
- Usage Limits - Enforce per-user upload quotas
- Turnstile - Bot protection with Cloudflare's invisible CAPTCHA
- AI Classification - Automatic image tagging and captioning
- Semantic Search - AI-powered natural language image search
- Analytics - Let users track their CDN usage and bandwidth
- Audit Log - Compliance and security audit logging
- S3 Backups - Automatic sync to external S3-compatible storage
- Custom Domains - Let users serve images from their own subdomains
- Encryption - End-to-end encryption for sensitive images
About
Pixelflare is an open source, self-hostable Imgur alternative, built for speed, scalability and ease of use. It comes bundled with an intuitive web UI, powerful REST API, as well as optional features for everything an image CDN could ever need!
Why Cloudflare?
Pixelflare is built and designed to run on Cloudflare's global edge network.
This was done because Cloudflare offers the cheapest and most scalable fast serverless platform currently available. We use D1, R2, Workers, Pages, KV, Zero Trust along with Cloudflare domains, WAF, SSL, log services and more.
Managed Instance
If you don't want to self-host, you can use our managed Pixelflare instance at pixelflare.cc. It comes with a free tier forever, and paid plans for higher usage. The paid tiers are sold at cost-price, so only cover the running cost and Cloudflare fees. You won't ever find a better deal for an image CDN!
Support Us
Pixelflare was able to be developed and open sourced, thanks to the support of our amazing GitHub Sponsors.
The development of Pixelflare was made possible by the generous support of our GitHub Sponsors. If you find Pixelflare useful, please consider sponsoring us on GitHub Sponsors.
Facing Issues?
See our Resolving Issues docs for help.