Dub is an open-source link attribution platform for short links, conversion tracking, and affiliate programs, built as an open-source alternative to Bitly. The project reports it powers over 100 million clicks and 2 million links every month, with customers including Twilio, Buffer, Framer, Perplexity, and Vercel. Dub can be used as a hosted service or self-hosted on your own infrastructure.
Dub is built with Next.js, TypeScript, and Tailwind CSS on the frontend, Prisma as the ORM, PlanetScale for the database, Upstash for Redis, and Tinybird for analytics. Auth runs through NextAuth.js, payments through Stripe, transactional email through Resend, and the project deploys on Vercel with Turborepo managing the monorepo.
Dub follows an open-core model. The core platform, about 99% of the codebase, is licensed under AGPLv3 and is fully open source, while a smaller Enterprise Edition under the /ee directory is covered by a separate commercial license for features aimed at larger organizations. A self-hosting guide covers the setup steps for running Dub on your own servers.
Local development uses pnpm on Node v23.11.0 and pnpm 9.15.9, with a dev seed script (pnpm run script dev/seed) that populates the database with test data, and a --truncate flag to wipe existing data first. Contributors follow a local development guide, open GitHub issues for bugs, and submit pull requests for new features or fixes. Recommended version pinning matters here: mismatched Node or pnpm versions are the most common cause of local build failures, and the project's troubleshooting notes point to clearing node_modules, .next, and .turbo directories before reinstalling.
Dub states its infrastructure handles more than 100 million clicks and 2 million links every month, with customers including Twilio, Buffer, Framer, Perplexity, Vercel, and Laravel listed on its customers page. For teams already comfortable running a Next.js and PlanetScale stack, self-hosting Dub means owning that same infrastructure directly rather than depending on a third-party link shortener.