← all posts
The Zippy Team

Self-Host URL Shortener: Zippy on Cloudflare in 15 Min

Self-host url shortener guide: deploy Zippy's open-source redirect engine to Cloudflare Workers in 15 minutes, from clone to your own custom domain.

self-host url shorteneropen sourcecloudflare workersdeeplinksagpl
Zippy the lightning-bolt mascot plugging a glowing short link into a Cloudflare-orange cloud server rack.
Zippy, the lightning-bolt mascot

Zippy: you bring the cloudflare account. i bring the redirect engine. fifteen minutes, and most of that is you finding your domain login.

You can self-host a URL shortener that opens native apps instead of the in-app browser in about 15 minutes. Zippy's redirect engine is open source (AGPL) at github.com/zippylink/zippy and runs on Cloudflare Workers with KV storage. A free Cloudflare account is enough to deploy it and serve real traffic.

To be clear about what you're self-hosting: this is not a generic slug-to-URL redirector. It's the engine that detects which app a tap came from and which platform it points at, then routes the user into the installed native app — logged in, cookies intact — instead of the crippled in-app webview. If you're new to why that matters, read why your links die in the in-app browser first.

What do you need before you start?

You need three things: a free Cloudflare account, Node.js 18 or newer, and git. That's the whole list.

  • Cloudflare account — the free Workers plan is enough. No credit card required to deploy.
  • Node.js + npm — to run wrangler, Cloudflare's deploy CLI.
  • Optional: a domain on Cloudflare — if you want short links on your own domain instead of a Workers subdomain. You can add this after everything else works.

No servers, no Docker, no database to babysit. The engine is a single Worker, and links live in Cloudflare KV — a key-value store that replicates to Cloudflare's edge, so redirects resolve close to the person tapping.

How do you deploy Zippy to Cloudflare in 15 minutes?

The whole deploy is six steps: clone, install, authenticate, create a KV namespace, deploy, and point a domain. Exact command names and config keys live in the repo README — the shape of it looks like this:

  1. Clone the repo (1 minute). git clone https://github.com/zippylink/zippy and cd in.
  2. Install dependencies (2 minutes). npm install. This pulls in wrangler, the Cloudflare CLI.
  3. Authenticate wrangler (2 minutes). npx wrangler login opens a browser window; approve it and you're linked to your Cloudflare account.
  4. Create the KV namespace (3 minutes). npx wrangler kv namespace create gives you a namespace ID; drop it into the wrangler config where the README tells you. This is where your links are stored.
  5. Deploy (2 minutes). npx wrangler deploy. Wrangler bundles the Worker and pushes it to Cloudflare's edge. You get a live URL back immediately.
  6. Add your first link and test it (5 minutes). Follow the README to create a link entry, then tap it from inside a social app — a DM you send yourself works. Watch the native app open instead of the webview.
Zippy, the lightning-bolt mascot

Zippy: step six is the fun one. send yourself the link on whatsapp, tap it, watch the real app open. that little jump is the entire product.

If you want your own domain, add it in the Cloudflare dashboard as a custom domain or route on the Worker. Any domain already on Cloudflare takes about two minutes; moving a domain's DNS to Cloudflare first is the one step that can blow the 15-minute budget.

What does the self-hosted engine actually do?

It runs the same platform-detection and native-app routing that powers zipthe.link. When a tap hits your Worker, the engine identifies the platform the click came from and the platform the link points to, then picks the right escape route:

  • On iOS, it uses the destination app's URL scheme with a timed fallback — if the app doesn't take over in time, the user lands on the web version.
  • On Android, it uses intent:// URLs, which carry a native fallback built in.
  • When something's off — an app not installed, a scheme that no longer matches — the link degrades to opening the page in the browser. Never a dead end, never a broken link.

The supported destinations are LinkedIn, Instagram, WhatsApp, Reddit, Product Hunt, YouTube, TikTok, and X. The routing logic per platform has real depth to it — the full mechanics are in how the redirect engine works, and the per-platform behavior quirks are covered in guides like the Instagram deep links guide and the TikTok deep links guide.

Because the code is AGPL, you can read every line of that routing table, modify it, and run it yourself. The one obligation: if you modify the engine and serve it publicly, AGPL requires you to share your modifications. The background on why we open-sourced the core is in why Zippy is open source.

Should you self-host or use Zippy Cloud?

Self-host if you want full control and are happy owning updates; use the hosted cloud if you want the product around the engine. Honest breakdown:

Self-hosted (AGPL)Zippy Cloud
Redirect engineFull engine, all 8 platformsSame engine
CostCloudflare free tier (your account)Free plan; Hero $19/mo or $180/yr; Legend $49/mo
Scheme updatesYou pull from the repo when platforms changeMaintained for you, continuously
AnalyticsWhatever you buildGeo, device, platform, referrer, time (Hero+)
Edit links after postingManual KV editsLiving links, one click in the dashboard
Custom domainYours, via CloudflareIncluded on Legend
GuaranteesNone — it's your deploymentActually-Opens guarantee + 30-day money-back
Link permanenceAs long as your Worker stays deployedLinks never stop redirecting — not on free, not after cancel

The honest version of the trade: the engine is the open part, and it's genuinely the hard part. But the hosted product is where the analytics dashboard, editable "living links," unmetered clicks, and the Actually-Opens guarantee live. Plenty of people self-host for a side project and pay for cloud where money is on the line.

Zippy, the lightning-bolt mascot

Zippy: self-hosting me is free. maintaining me when tiktok changes something on a tuesday is the part you're deciding about.

What are the ongoing costs and maintenance?

For most self-hosters, ongoing cost is zero and maintenance is an occasional git pull and redeploy. Cloudflare's free Workers tier includes roughly 100,000 requests per day — that's a lot of taps before you pay anything, and the paid Workers tier is cheap past that.

The real maintenance is the routing table. Platforms change how their apps handle links, and they don't announce it. When that happens, the engine's degrade behavior means your links keep working — they just fall back to opening the browser instead of the app until you pull the updated routing. On the hosted cloud, that update ships to everyone at once; self-hosted, redeploying is your job.

FAQ

Is Zippy really free to self-host?

Yes. The redirect engine is AGPL-licensed on GitHub, and the free Cloudflare Workers tier covers deployment and meaningful traffic. The AGPL condition is that if you modify the engine and serve it publicly, you must publish your modifications under the same license.

Do self-hosted links keep redirecting forever?

They keep redirecting for as long as your Worker is deployed and your KV namespace exists — you own the infrastructure, so permanence is in your hands. On Zippy Cloud, permanence is a hard product rule: links never stop redirecting, not on the free plan, not after a trial ends, not after you cancel.

What happens when a platform changes its URL scheme?

Your links degrade gracefully: instead of springing the native app, they open the destination in the browser. Nothing 404s and no slug breaks. Pull the latest engine from the repo and redeploy to restore app-opening; on the hosted cloud this happens automatically.

Can I try the hosted product before deciding?

Yes — every new account gets a 14-day full Hero trial with no credit card, then a soft downgrade to the free Sidekick plan. Any links you create keep redirecting either way.

Which platforms does the engine support?

LinkedIn, Instagram, WhatsApp, Reddit, Product Hunt, YouTube, TikTok, and X/Twitter. The engine detects both the app the tap came from and the platform the link points to, and routes accordingly.

Rather skip the wrangler part? zipthe.link is the same engine with the dashboard already plugged in — Zippy insists he's very low-maintenance either way.