Open-source project
dubinc/dub avatar
dubinc/dub

dubinc/dub: self-hosting the open-core link attribution platform

The modern link attribution platform. Loved by world-class marketing teams like Framer, Perplexity, Superhuman, Twilio, Buffer and more.

25,221 stars3,410 forksTypeScriptNOASSERTION

At a glance

What is it?
Dub is an AGPLv3 link shortener with conversion tracking, built as a Next.js monorepo on Prisma, PlanetScale, Upstash and Tinybird. The repository is open, but the self-hosting path runs through the vendor's own documentation, and the enterprise features sit behind a commercial licence.
Who is it for?
Adopt dubinc/dub if you want short links and conversion tracking in one AGPLv3 codebase and you are willing to run a Next.js app plus a PlanetScale database, Redis and an analytics backend. Do not adopt it if you need a single-container deploy with no external services, or if you need enterprise features without a commercial licence, because those live in the /ee directory.
Can I use it commercially?
Check first. The repository uses a licence we do not classify automatically, so read its LICENSE file before any commercial use.
Is it still maintained?
Yes. The repository last received commits 27 days ago.
What is it written in?
Mainly TypeScript, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on November 23, 2026, and from our analysis. They are not legal advice.

From daily snapshots

Star history

  • dubinc/dub25,221 ★ · +419
Star history
Repository2026-09-222026-11-23
dubinc/dub24.8k25.2k

419 Stars in the last 62 days, measured from the daily GitHub snapshot. Compare with other projects

Editorial analysis

What dubinc/dub actually replaces

Most link shorteners stop at redirects. Dub's README describes it as a link attribution platform for short links and conversion tracking. That combination is the point. If you run paid campaigns, you normally stitch together a shortener and a click warehouse, then reconcile them by hand. Dub puts the redirect and the click record in the same application.

The audience is marketing engineering rather than general backend work. The README names Twilio, Zillow, Jobber, Vercel and Raycast as users, and states the platform powers 250M+ clicks and 12M+ links monthly. Treat that as a vendor figure from the README, not an independent measurement. It does tell you the intended scale: this is not a toy URL shortener for a side project.

The repository is a pnpm monorepo. Top-level entries include apps/, packages/, turbo.json and pnpm-workspace.yaml, so the web application and the shared packages are versioned together. That layout matters later, because a self-hosted deployment means building the app, not dropping in a binary.

The stack you inherit when you self-host Dub

The README lists the full stack: Next.js and TypeScript for the application, Tailwind for styling, Prisma as the ORM, PlanetScale as the database, Upstash for Redis, Tinybird for analytics, NextAuth.js for authentication, BoxyHQ for SAML/SSO, Turborepo for the monorepo, Stripe for payments, Resend for email and Vercel for deployments.

Read that list as an operational contract. Prisma means a relational database behind a schema, and the README's troubleshooting section confirms the workflow: when you see "The table <table-name> does not exist in the current database.", it tells you to run pnpm prisma:push to push the Prisma schema state to the database without migration files. Redis is a separate service. Tinybird is a separate analytics service. Stripe and Resend are third-party APIs with their own keys. A self-hosted Dub is a small constellation, not one process.

The README does not document the data flow between these components, so anyone planning capacity should read the self-hosting guide.

One design consequence is worth stating plainly: because analytics is delegated to Tinybird, the click data path is not fully inside your infrastructure unless you also self-host or replace that dependency. The README does not describe a supported alternative for it.

Installing Dub locally and seeding real data

The README does not give a full install walkthrough. It points to the local development guide at dub.co/docs/local-development for setting up a dev environment, and to dub.co/docs/self-hosting/guide for production self-hosting. What the README does specify is the toolchain, in a recommended versions table: node v23.11.0 and pnpm 9.15.9. The root package.json pins packageManager to [email protected], so the two agree.

Clone the repository and install dependencies with pnpm from the root, since this is a pnpm workspace:

bash
pnpm install

Before the app will run, the database schema has to exist. The README's troubleshooting entry for missing tables gives the command:

bash
pnpm prisma:push

That pushes the current Prisma schema to the database without creating migration files, which is the right call for a fresh local database and the wrong call for a production database where you want a migration history.

Once the schema is in place, the repository ships a seed script for development data. It runs from apps/web, not from the repository root, and the root script entry echoes "Run this script in apps/web" to make that explicit:

bash
cd apps/web
pnpm run script dev/seed

The README documents a second form that wipes existing rows first. It prompts for confirmation before deleting anything:

bash
cd apps/web
pnpm run script dev/seed --truncate

If the build fails, the README's advice is version-related: confirm node and pnpm match the recommended versions, delete every node_modules, .next and .turbo directory under apps and packages, then run pnpm install and pnpm build again. That is a real signal about the project's tolerance for version drift. Match the pinned versions rather than debugging a build against a newer runtime.

The open-core boundary and what it means for adopters

The licence field on the repository is NOASSERTION, which is the honest answer here. The README explains why: Dub Technologies, Inc. describes itself as a commercial open-source company, with roughly 99% of the core under AGPLv3 and the remaining 1% under a commercial licence in the /ee Enterprise Edition directory. The root package.json declares AGPL-3.0-or-later, and the README links to LICENSE.md.

So the repository is not uniformly open source, and the README says so directly rather than burying it. The practical question for an adopter is which directory your use case touches. Enterprise features are built by the company's full-time core team, per the README, which is also a statement about where future enterprise work will land.

AGPLv3 is the part that deserves attention before you deploy. It is a copyleft licence with a network clause, and the README does not discuss what modifications trigger source disclosure obligations. That is a question for your own legal review against LICENSE.md and the /ee directory contents, not something this article can settle. What can be said from the repository is narrower: the licence badge on the README points at the repository's licence file, and the README itself states that some parts require a commercial licence.

Where Dub is the wrong tool

If you want a URL shortener that runs as a single container against SQLite, Dub is the wrong shape. The documented stack assumes a relational database, a Redis instance, an analytics service and third-party API keys for payments and email. The README's own troubleshooting section exists because local builds fail when versions drift, which tells you the project expects a managed toolchain rather than a minimal one.

The second boundary is analytics ownership. Because Tinybird handles analytics per the README, a fully air-gapped deployment is not described. If your requirement is that no click data leaves infrastructure you control, the README does not document a path for that, and the self-hosting guide is the place to check before you commit.

The third is enterprise identity. SAML/SSO comes from BoxyHQ and the README places enterprise features in the /ee directory under a commercial licence. The README does not say whether SAML/SSO sits inside /ee, so check that directory if you need SSO.

Finally, there is a documentation gap worth naming. The README links to the self-hosting guide but does not reproduce it, does not list required environment variables, and does not document rollback or upgrade procedures. Anyone evaluating Dub has to leave the repository to answer the operational questions, and the README is silent on those points.

Dub against a plain shortener like Shlink

The closest comparison in kind is a self-hosted shortener such as Shlink, which is built around redirects and click statistics. The difference is scope rather than quality. Shlink's model is a link shortener with an API and a database; Dub's model is a link shortener plus conversion tracking, with the analytics layer pushed to Tinybird and the application built on Next.js and Prisma.

That difference shows up in what you operate. A redirect-focused shortener typically needs one database and one web process. Dub, per its README, expects PlanetScale or a compatible relational database, Upstash or compatible Redis, Tinybird for analytics, and credentials for Stripe and Resend. You get conversion attribution in exchange for that footprint.

It also shows up in licensing. Dub's core is AGPLv3 with a commercially licensed /ee directory, while the README does not claim the whole repository is open source. If your organisation is sensitive to copyleft network terms, that difference matters more than any feature comparison. If you only need redirects and click counts, the smaller tool is the smaller commitment.

Maintenance, upgrades and what to check before adopting

The repository is not archived, and the last push was on 2026-10-27. That is the strongest maintenance signal available here, and it is a fact about commit activity, not a promise about release cadence. The repository publishes no releases, so there is no version history to inspect and no changelog to read for upgrade guidance.

Upgrade cost is the real unknown. The README documents a build-failure remedy, not an upgrade procedure: it tells you to align node and pnpm with the recommended versions, clear node_modules,.next and.turbo across apps and packages, then reinstall and rebuild. For a self-hosted deployment that means every upgrade is a full monorepo rebuild, and the README does not describe database migration steps for an existing installation. The prisma:push command it recommends is explicitly the no-migration-files path, which is a development convenience rather than an upgrade strategy.

On licensing, the repository supports one concrete statement: the README says the core is AGPLv3 and that some parts require a commercial licence under /ee, and the root package.json declares AGPL-3.0-or-later. Whether your specific use triggers obligations is a question for your own review of LICENSE.md. This article does not offer legal advice, and the README does not attempt to either.

Editorial conclusion

Adopt dubinc/dub if you want short links and conversion tracking in one AGPLv3 codebase and you are willing to run a Next.js app plus a PlanetScale database, Redis and an analytics backend. Do not adopt it if you need a single-container deploy with no external services, or if you need enterprise features without a commercial licence, because those live in the /ee directory. Before committing, verify the current self-hosting guide at dub.co/docs/self-hosting/guide, confirm which parts of the codebase your use touches, and check the licence terms in LICENSE.md rather than assuming the AGPLv3 badge covers everything.

Frequently asked questions

Is dub.co legit?

The project is a real open-source repository at dubinc/dub with a documented stack and a self-hosting guide, and the README states it powers 250M+ clicks and 12M+ links monthly for named customers. That figure comes from the vendor's own README and is not independently verified here.

Is dub.co open-source?

Partly. The README describes an open-core model where roughly 99% of the core is licensed under AGPLv3 and the remaining 1% sits in the /ee Enterprise Edition directory under a commercial licence. The root package.json declares AGPL-3.0-or-later.

What is a dub account?

The README does not describe account creation or the hosted signup flow, so this cannot be answered from the repository. What the repository does cover is the self-hosted application, where authentication is handled by NextAuth.js per the README's stack list.

What is the dub sh website?

The README does not mention a dub.sh domain or describe any website beyond the project homepage at dub.co and the documentation links to dub.co/docs. The repository covers the codebase and the self-hosting guide, not domain details.

Official sources

  1. dubinc/dub on GitHub
  2. Issues
  3. Project website
  4. README
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/dubinc-dub.svg)](https://hysenlabs.com/projects/dubinc-dub)

Star history chart for your README

markdown
[![Star history](https://hysenlabs.com/chart/dubinc-dub.svg)](https://hysenlabs.com/projects/dubinc-dub)

Was this useful?