Can I self-host Bitly?

YES · ONE EVENING— setup effort 2 of 4

YES — it's called Shlink. It takes one prompt, a 1024 MB VPS, and about 75 minutes. That is $10 a month you stop paying Bitly — $120 a year on the Core plan.

  • bitly.com
  • Marketing & content
  • prices checked 2026-08-05

Why people pay for Bitly

Stated as the vendor would want it stated. A replacement you pick without knowing what the subscription actually buys is a replacement you abandon in a fortnight.

Bitly's real product is a promise about the future: links shortened on their domain in 2012 still resolve today. You are renting somebody else's commitment to keep a redirect alive, plus the click analytics, the QR codes and the branded domain handling that a marketing team wants in one place.

Bitly plans and list prices
PlanList priceWhat it buys
FreefreeA small monthly allowance of links and QR codes.
Corethe plan this page prices against$10/mo$120 a year on the annual plan, which is how the page presents it.
Growth$35/mo$348 a year on the annual plan, shown as $29/month billed annually.
Premium$300/mo$2,388 a year on the annual plan, shown as $199/month billed annually.
Enterprisequote onlyQuote only.

Vendor list prices in USD, read from the pricing page on 2026-08-05 · confidence: high

Replaced by Shlink

One project, named before the prompt, so you know what you are about to install.

Your own short-link domain, with visit counts and a REST API the existing apps already speak.

  • MIT
  • shlinkio/shlink
  • No upstream compose file — ours is authored from the docs
  • runs on arm64

Gives you the two things that matter and takes on the one that is hard. You get your own short domain, real redirects and per-link visit counts through a documented REST API that the third-party apps already speak. What you take on is the promise: the domain registration, the certificate and the database row are now yours to keep alive, and Bitly's entire pitch is that they do that part for you.

The swap

You're paying

Bitly

$10/mo · $120/yr

is replaced by

You'd run

Shlink

ONE EVENING · ~75 min to running · 1024 MB RAM

Bitly Core · vendor list price · checked 2026-08-05 · source

Before you start

RAM floor
1024 MBfloor from upstream docs — not measured by us yet
Disk
5 GBthe app, its data, and room for one backup
Domain needed
yes, one A recorda hostname pointed at the box before you start — TLS needs it
Time budget
~75 min1–3 hours, through the first backup

The prompt

One prompt, assuming Prompt Zero is done. It installs Shlink — read it before you paste it, which is the whole reason it is on the page instead of behind a download.

authored from upstream docs · not yet machine-verified · Claude Code

303 lines · 12,992 bytes

What this prompt will do
  1. Preflight
  2. Layout
  3. Secrets
  4. compose.yml
  5. Caddy and TLS
  6. Firewall
  7. Start and verify
  8. First backup and restore
  9. Updating later
  10. What will probably go wrong
  11. Out of scope

Read out of the prompt’s own step headings at build time — if the prompt changes, this list changes with it.

paste it into Claude Code in a terminal on your own machine · it runs the install over ssh vps

No terminal agent? Use the chat fallback — slower, you paste the commands

For ChatGPT or Claude in a browser. The model cannot touch your server, so it hands you one command at a time and you run each one. Same install, more of your evening.

agent-readable mirror: /self-host/bitly.md

The files, if you'd rather do it yourself

The same install with no agent involved: three files, in the order you'd use them. The prompt above writes exactly these — if the two ever disagree, the files are the ones CI diffs.

compose.ymlthe services, pinned54 lines

authored from upstream docs, never pasted · 2,338 bytes

Caddyfilethe hostname and TLS26 lines

authored from upstream docs, never pasted · 1,067 bytes

install.shthe same install, no agent151 lines

authored from upstream docs, never pasted · 6,859 bytes

What you're signing up for

The part a vendor's comparison page leaves out. None of it is a reason not to do this; all of it is yours the moment you cancel Bitly.

  • A short domain is a promise you are now making. Every link you hand out lives on a domain you have to keep registered and a database row you have to keep alive, and when either lapses the links die on pages you do not control. That promise is most of what Bitly actually sells.
  • You own a PostgreSQL. Upstream will not support SQLite for production and closed the request to make its file mountable, so there is a real database here that has to be dumped rather than copied.
  • No maps. This install sets DISABLE_IP_TRACKING and asks you for no MaxMind licence key, so visits are counted, referrers and user agents are recorded, and nothing is placed on a country chart.
  • No dashboard. The official web client is a separate application on its own hostname, and this install does not run it. You get the REST API, the command line, and whichever third-party app you point at them.
  • No link-in-bio pages, no QR campaign reporting, no branded-domain management for a team. Those are the paid tiers, not the shortener.

Where this came from

“using SQLite for production is not officially supported, since you can quickly face problems and limitations when dealing with big amounts of data or high traffic.”

  • The image ships a working SQLite database, but upstream states SQLite is not supported for production, which is why this install runs PostgreSQL instead. source
  • Upstream closed the request to move the SQLite file into a mountable directory as not planned, on the grounds that SQLite is not meant for production use. source
  • Shlink listens on port 8080 by default, INITIAL_API_KEY creates an admin API key once during container start-up, and DISABLE_IP_TRACKING turns off visitor location tracking. source
  • Without a GeoLite2 license key Shlink still runs and simply does not geolocate visits, so no MaxMind account is needed. source
  • API calls authenticate with an X-Api-Key header, and a missing, invalid, disabled or expired key returns status 401. source

Questions people actually ask

Answered from this page's own data — the same numbers, in sentences.

  • Can I self-host Bitly?

    Not Bitly itself — the vendor does not ship a version you can run on your own server. What you can self-host is the job people pay it for, and the answer to that is Shlink. Your own short-link domain, with visit counts and a REST API the existing apps already speak. The install is one evening: 2 containers behind Caddy with automatic TLS, secrets generated on the server rather than in a chat window, and a first backup taken before the agent says it is done, in about 75 minutes. The prompt on this page does it; the compose.yml, Caddyfile and install.sh below do the same install with no agent at all.

  • What replaces Bitly?

    Shlink. Your own short-link domain, with visit counts and a REST API the existing apps already speak. Gives you the two things that matter and takes on the one that is hard. You get your own short domain, real redirects and per-link visit counts through a documented REST API that the third-party apps already speak. What you take on is the promise: the domain registration, the certificate and the database row are now yours to keep alive, and Bitly's entire pitch is that they do that part for you. Shlink is MIT-licensed and free; nothing on this page is a hosted service we sell you.

  • What does self-hosting cost compared to Bitly?

    1024 MB of RAM and 5 GB of disk — the smallest tier most VPS hosts sell, about $5 a month. Shlink itself is free and MIT-licensed; the bill is the server, plus a domain you probably already own. What you stop paying: Bitly Core, $10/mo — $120 a year.

  • How hard is it really?

    ONE EVENING — 1–3 hours. The rule that produced that verdict: up to three containers and at most one outside integration. You will type more than one command and read a page of documentation, and it will be running before you go to bed. The tier is derived from seven countable facts about the Shlink install, not from anyone's impression of it, and the whole rubric is published on the methodology page.

Content last checked 2026-08-05. Verdicts are derived from the published rubric on /methodology; corrections go through the issue tracker.