Dub
MarketingThe open source link management platform — branded short links, analytics and an API.
About this project
Dub is the open-source link-management platform — a modern, self-hostable alternative to Bitly. It provides branded short links, QR codes, deep click analytics, and a powerful API, making it the backbone for marketing attribution and link-based products.
Market opportunity
Bitly charges $8–$300+ per month and gates analytics and custom domains behind higher tiers. Short links are core marketing infrastructure (campaigns, affiliate tracking, social), so a developer-friendly open-source option with a real API is well positioned for both internal use and resale.
Technical overview
- Stack: TypeScript + Next.js, with MySQL (PlanetScale), Redis, and Tinybird for analytics; built to run on edge infrastructure for fast redirects.
- API-first: create and track links programmatically — ideal for embedding link features into other apps.
- Features: custom domains, QR codes, click analytics, geo/device targeting, and team workspaces.
Who's it for
Marketing teams, affiliate marketers, and developers building link/attribution features into their own products.
How to use it
Get started
Use the hosted app at dub.co, or self-host:
git clone https://github.com/dubinc/dub
cd dub
pnpm install
cp .env.example .env # configure database, Redis, and your domain
pnpm dev
Add a custom domain, create a short link, and read click analytics in the dashboard or via the API.
💡 How to make a business with it
How to make money with it
1. Branded link SaaS for a niche. Offer short links + analytics to a specific audience (real-estate agents, podcasters, creators) on subscription.
- Example: $12/month to 500 users = $72k ARR.
2. Affiliate/attribution tooling. Build a link-tracking product for affiliate marketers on top of Dub's API and charge per seat.
3. Add link features to your app. Embed self-hosted Dub so your product can offer trackable links as a premium feature.
Need technical help?
Want help setting up Dub, customizing it, or building your product on top of it? Knock me — let's talk.