PixEdge is a professional-grade, open-source media hosting platform built for speed and infinite scalability. It uses Telegram as a free, unlimited storage backend and Upstash Redis for metadata — delivering files via edge redirection with zero storage costs.
v2.0.0 introduces full MTProto support via gramjs, enabling uploads up to 2 GB (vs. the 20 MB Bot API limit), true streaming delivery with flat RAM usage, and an automatic fallback to the Bot API when MTProto is not configured.
| Feature | Details |
|---|---|
| 📦 Unlimited Storage | Powered by Telegram infrastructure — no storage limits, ever |
| 🚀 2 GB Uploads | MTProto (gramjs) mode breaks the 20 MB Bot API cap — upload up to 2 GB |
| 🏎️ Edge Delivery | 302 redirect to Telegram CDN — minimal server bandwidth |
| 🌊 True Streaming | v2 files are streamed in 1 MB chunks with flat RAM usage |
| 👤 User Accounts | Email/password, GitHub OAuth, Google OAuth, and Telegram Login |
| 🗂️ Personal Dashboard | Manage your uploads, view analytics, generate API keys |
| 🔑 API Keys | Generate a personal API key from your dashboard for programmatic access |
| 🔗 Vanity URLs | Custom human-readable slugs with collision detection and suggestions |
| ⏳ Expiry Links | Set links to auto-expire after 1h, 24h, 7d, or 30d (Redis TTL) |
| 📊 Analytics | Per-file view and download counters; platform-wide public stats page |
| 📱 QR Codes | Instant QR code for every upload |
| 🤖 Telegram Bot | Upload via @PixEdge_Bot and link your Telegram account to your web account |
| 📋 Clipboard Paste | Paste images directly from your clipboard on the upload page |
| 🖥️ ShareX Support | Download a ready-to-use .sxcu config from your dashboard |
| 🌙 Dark / Light Mode | Theme toggle with persistence |
- Framework: Next.js 15+ (App Router)
- Auth: NextAuth.js — GitHub, Google, Credentials, Telegram
- Database: Upstash Redis
- Storage (v1): Telegram Bot API — up to 20 MB, zero config
- Storage (v2): MTProto via gramjs — up to 2 GB, streaming
- Styling: Vanilla CSS + Framer Motion
- API: Versioned REST JSON API (
/api/v1)
All authenticated endpoints accept either a session cookie or an X-API-Key header (generate your key at /dashboard).
# Via header
curl -H "X-API-Key: pe_your_key_here" ...
# Or via Bearer token
curl -H "Authorization: Bearer pe_your_key_here" ...POST /api/v1/upload · multipart/form-data
| Field | Type | Required | Description |
|---|---|---|---|
file |
File | Yes | Image or video (max 20 MB without MTProto, up to 2 GB with MTProto) |
customId |
String | No | Custom vanity slug |
expiresIn |
Number | No | Seconds until expiry: 3600, 86400, 604800, 2592000 |
curl -X POST https://your-domain.com/api/v1/upload \
-H "X-API-Key: pe_your_key" \
-F "file=@video.mp4" \
-F "customId=my-video" \
-F "expiresIn=86400"Rate limits: 100 uploads/min for authenticated users · 20/min for anonymous.
GET /api/v1/info/[id]
GET /api/v1/list · Requires auth
Returns your last 50 uploads with URLs, view/download counts, and expiry timestamps.
DELETE /api/v1/delete/[id] · Requires auth · Ownership enforced
curl -X DELETE https://your-domain.com/api/v1/delete/my-video \
-H "X-API-Key: pe_your_key"GET /api/stats · Public
- Go to your Dashboard → API Keys and generate a key.
- Visit
https://your-domain.com/api/sharex?key=pe_your_key— this downloadsPixEdge.sxcu. - Open ShareX → Destinations → Custom Uploaders → Import → select the file.
- Set PixEdge as your active image uploader. Done.
PixEdge includes @PixEdge_Bot for direct uploads from Telegram.
After deployment, register the webhook once:
https://api.telegram.org/bot<YOUR_BOT_TOKEN>/setWebhook?url=https://your-domain.com/api/webhook/telegram
/start— Welcome message/uploador/tgm— Upload an image/help— Usage instructions/link— Link your Telegram account to your PixEdge web account
Send /link to the bot — it returns a one-time URL. Visit it while logged into your PixEdge account to merge the two identities. After linking, bot uploads are tracked under your account.
- A Telegram Bot Token (from @BotFather)
- A Telegram Chat ID (your storage channel — use @userinfobot)
- An Upstash Redis database (free tier)
- Node.js 18+
- (Optional) GitHub / Google OAuth app credentials for social login
- (Optional) Telegram MTProto credentials for 2 GB upload support
git clone https://github.com/GeekLuffy/PixEdge.git
cd PixEdge
npm install
# copy .env.example → .env.local and fill in values
npm run dev.env.local (minimum required)
TELEGRAM_BOT_TOKEN=your_bot_token
TELEGRAM_CHAT_ID=your_storage_channel_id
UPSTASH_REDIS_REST_URL=https://...
UPSTASH_REDIS_REST_TOKEN=your_token
NEXT_PUBLIC_BASE_URL=https://your-domain.com
NEXTAUTH_SECRET=a_random_32_char_secret
NEXTAUTH_URL=https://your-domain.comPixEdge v2 adds an optional MTProto layer powered by gramjs. When configured, the upload route automatically uses MTProto instead of the Bot API, raising the file size limit from 20 MB → 2 GB. Files uploaded via MTProto are streamed back to clients in 1 MB chunks with minimal RAM overhead.
Upload route detects TELEGRAM_API_ID env var
│
├── Present → gramjs MTProto → up to 2 GB
└── Absent → Bot API → up to 20 MB
Step 1 — Get MTProto credentials:
- Go to https://my.telegram.org/apps → create an app.
- Copy App api_id and App api_hash.
Step 2 — Generate a session string:
npm run generate:session
# Enter your phone number and OTP when prompted.
# Copy the printed TELEGRAM_SESSION_STRING.Step 3 — Add to .env.local:
TELEGRAM_API_ID=your_api_id
TELEGRAM_API_HASH=your_api_hash
TELEGRAM_SESSION_STRING=your_session_string
MAX_UPLOAD_SIZE_MB=2000 # optional, default is 2000 (2 GB)
⚠️ Never commitTELEGRAM_SESSION_STRINGto git. Treat it like a password — it grants full access to your Telegram account.
graph LR
User -->|Upload / Auth| Next[Next.js App Router]
Next -->|Store metadata| Redis[Upstash Redis]
Next -->|v1 - Bot API ≤20 MB| Telegram[Telegram CDN]
Next -->|v2 - MTProto ≤2 GB| Telegram
Next -->|302 redirect / stream| Telegram
Redis -->|Metadata| Next
Bot[Telegram Bot] -->|Webhook| Next
PixEdge is open source and welcomes contributions!
- Fork the repo and create a feature branch.
- Open an Issue for bugs or feature requests.
- Submit a PR — UI improvements, API enhancements, and docs are all welcome.
- Join the community: @EdgeBots (updates) · @EdgeBotSupport (support)
MIT License — free to use, modify, and distribute.
Made with ❤️ by Geekluffy