Shlink
Released under MIT, Shlink provides URL shortener with REST API and command line interface. Includes official progressive web on self-hosted infrastructure.
Self-hosted link shortening, honestly reviewed. No marketing fluff, just what you get when you run it yourself.
TL;DR
- What it is: Open-source (MIT) self-hosted URL shortener with REST API, CLI, and an optional web UI companion app — think Bitly, but running on your own server with zero per-link pricing [website].
- Who it’s for: Founders, marketers, and ops teams who need branded short links with click analytics but won’t pay Bitly’s $8–$29/month for something this mechanically simple. Also anyone who wants geolocation tracking without routing that data through a third party [2].
- Cost savings: Bitly’s cheapest paid plan runs around $8/month for a limited number of links; the Growth plan is roughly $29/month. Shlink runs on a $5–10 VPS with unlimited links and clicks, forever [website][3].
- Key strength: Feature-complete for serious URL shortening: custom slugs, multi-domain, geo-based dynamic redirects, bot detection, QR codes, GDPR-compliant analytics — all included at zero license cost [features page].
- Key weakness: PHP stack and multi-step setup are harder than alternatives like YOURLS or Kutt.it. Geolocation requires a separate MaxMind license key [2]. No managed cloud option — you own the infrastructure entirely.
What is Shlink
Shlink (short for “short link” — or “shrink” + “link”, or the sound of a sword being drawn, per the project’s own about page) is a PHP-based URL shortener that runs entirely on infrastructure you control [website]. You give it a domain, it shortens long URLs under that domain, tracks who clicked and from where, and exposes everything through a REST API, a CLI, and an optional web UI called shlink-web-client [website][documentation].
The project lives on GitHub under the MIT license, sits at 4,793 stars, and is built on Mezzio, Doctrine, and Symfony — mature PHP components that have been in production at scale for over a decade [website]. Database support spans MySQL, MariaDB, PostgreSQL, Microsoft SQL Server, and SQLite, so it integrates into whatever DB you’re already running [features page].
The scope is deliberately narrow. Shlink doesn’t try to be a marketing platform or a campaign management suite. It’s a URL shortener with unusually good analytics, a clean API, and self-hosting as a first-class concern. The GitHub description calls it “the definitive self-hosted URL shortener” — and based on the feature set, that claim holds up better than most tools’ self-descriptions do.
Why people choose it over Bitly, YOURLS, and Kutt.it
The patterns across the install guides and community comparisons are consistent: Shlink wins on feature depth, API quality, and data ownership, and loses on setup complexity and the PHP dependency [1][2][3].
Versus Bitly. This is the primary cost-escape story. Bitly’s free tier now caps links aggressively. Their paid tiers escalate with link volume and API access, pricing models that extract recurring revenue from marketers who haven’t noticed that link shortening is a commodity. Once you have a domain and a server, Shlink does everything Bitly’s paid tiers do: custom slugs, branded domains, click analytics with geolocation, QR code generation, and API access [2][3][website]. The difference is a one-time setup investment versus a monthly bill that only grows as your link volume does.
Versus YOURLS. YOURLS (Your Own URL Shortener) is the gray-bearded PHP alternative that’s been around since 2009. It works, it’s stable, but the interface is dated, analytics are minimal compared to Shlink’s, and it doesn’t ship multi-domain support or dynamic redirects. Shlink delivers more in a more actively maintained package [3][features page].
Versus Kutt.it. Kutt.it is another open-source link shortener with a cleaner UI than YOURLS and a Node.js stack. SaaSHub lists it as a top Shlink alternative [3]. Trade-off: Kutt.it has a simpler feature set — adequate for basic link shortening — but Shlink’s API is more mature, and its multi-domain and dynamic redirect capabilities are Shlink-specific.
On data ownership. The MakeTechEasier guide [2] makes this explicit: Shlink’s self-hosted nature means your click analytics — visitor location, referrers, device types — stay entirely within your infrastructure. When you route link analytics through Bitly or any other SaaS shortener, you hand a persistent record of who clicked what and from where to a vendor. For founders running campaigns on sensitive products, that’s not a theoretical concern.
Features: what it actually does
Based on the features page, documentation, and install guides:
Core URL management:
- Short URL creation with auto-generated codes or custom slugs [features page]
- Multi-segment custom slugs (e.g.
yourdomain.com/your/campaign/name) [2] - Multi-domain support — run multiple short domains from a single Shlink instance, with the same slug working differently per domain [features page]
- Tags for organizing and filtering link collections [features page]
- Link expiration by date range or maximum visit count — useful for limited-time campaigns [features page]
- Emoji support in URLs, titles, and tags [features page]
- Import existing short URLs from bit.ly or YOURLS [features page]
- QR code generation for any short URL [2]
Analytics and tracking:
- Visit tracking including browser, OS, referrer, and country [features page]
- Geolocation via MaxMind’s Geolite2 database — free to use but requires registering for a separate license key [2]
- Bot detection that excludes likely bot traffic from your stats [features page]
- Real-time visit updates via Mercure or RabbitMQ for live dashboards [features page]
- GDPR compliance built in: IP addresses are anonymized by default [features page]
Dynamic redirects:
- Rule-based redirect logic — send mobile users to an app store, desktop users to a landing page, French visitors to a localized version [features page]
- Configured at the individual link level without additional infrastructure [features page]
Interfaces:
- REST API with full documentation — Shlink positions itself as “API-first” [features page]
- Scoped API key roles: limit a key to specific domains or only to links it created [features page]
- CLI for managing short URLs, viewing stats, and configuring the instance [website]
- shlink-web-client: a progressive web app that connects to your Shlink API and manages multiple instances from one UI [website]
Deployment:
- Official Docker image on Docker Hub [README]
- Supports MySQL, MariaDB, PostgreSQL, MSSQL, and SQLite [features page]
- PHP 8.4 or 8.5 required for non-Docker installs [README]
Pricing: SaaS vs self-hosted math
Shlink has no commercial SaaS tier. It’s MIT license, self-hosted or nothing.
Self-hosted Shlink:
- License: $0 [MIT]
- VPS: $5–10/month (Hetzner, Contabo, DigitalOcean)
- MaxMind Geolite2: $0, free account required [2]
- SSL via Let’s Encrypt: $0 [2]
Bitly (the obvious comparison):
- Free: link caps that make it impractical for active marketing use
- Core: ~$8/month for a modest link allowance
- Growth: ~$29/month with higher caps and API access
- Enterprise: escalates further with team features
YOURLS, Kutt.it, Polr: All free and open source; self-hosted like Shlink [3].
The math for a typical marketing team:
A team creating 200 short URLs per month, tracking clicks, and needing API access for an internal dashboard lands in Bitly’s Growth tier: ~$29/month = $348/year. Self-hosted Shlink on a $6 Hetzner VPS = $72/year plus a one-time 2–4 hour setup. That’s roughly $276/year saved without sacrificing features — and with full ownership of the analytics data.
For higher-volume operations, the Bitly math deteriorates fast. Shlink doesn’t care how many links you create or how many times they’re clicked.
Deployment reality check
The install experience is more involved than SaaS onboarding, and both guides reviewed [1][2] confirm this without sugarcoating it.
Easy path: Docker
The Ojambo guide [1] covers a Podman-based install (Podman runs Docker images) that gets Shlink running in a few commands. The MakeTechEasier guide [2] covers a more production-complete setup: a Docker network, PostgreSQL container, Shlink container, Nginx as reverse proxy, and Let’s Encrypt SSL via Certbot. The full walkthrough is genuinely achievable but has more steps than most tools in this space.
What you actually need:
- A Linux VPS with 1–2 GB RAM minimum (PHP is leaner than Node.js alternatives)
- Docker or Podman — strongly recommended over the raw PHP install
- A database (SQLite works for low volume; Postgres or MySQL for production)
- A domain pointed at your server
- Nginx or Caddy as a reverse proxy for HTTPS
- A free MaxMind account for geolocation [2]
The MaxMind gotcha. The MakeTechEasier guide [2] dedicates a full section to this: geolocation requires signing up with MaxMind, confirming an email, and generating a Geolite2 license key. It’s free, but it’s a separate registration step. Skip it and location-based analytics won’t populate, and geo-based dynamic redirects won’t function. Minor friction but a surprise if you assumed geolocation was bundled.
Non-Docker install. The README documents a PHP 8.4/8.5 path using a dist zip file and the shlink-installer CLI wizard. It works, but managing PHP version requirements and extensions (json, curl, pdo, intl, gd, gmp) on a shared host adds friction. Docker is clearly the intended path [README].
Realistic time estimates:
- Technical user with Docker experience: 30–60 minutes to a working deployment with HTTPS
- Non-technical founder following a guide: 3–6 hours including DNS propagation, SSL setup, and MaxMind registration
- No server experience at all: plan for external help or a one-time deployment service
Pros and cons
Pros
- MIT license, no SaaS dependency. Your short links live on your server indefinitely. No vendor can raise your price, change terms, or deprecate your plan [website].
- Feature-complete. Multi-domain, dynamic geo/device redirects, QR codes, bot detection, import from bit.ly and YOURLS — more depth than most commercial shorteners at any price tier [features page].
- API-first design. Full REST API with scoped key roles makes it straightforward to integrate Shlink into dashboards, marketing tools, or automation workflows [features page].
- GDPR-ready by default. IP anonymization is on out of the box — one less compliance argument to have internally [features page].
- Multiple database options. SQLite for simple deployments, Postgres or MySQL for production — no forced choice [features page].
- Real-time analytics. Mercure and RabbitMQ integration for live visit dashboards when you need them [features page].
- Docker-first deployment. The official image makes installation tractable on any Linux VPS [1][2].
- shlink-web-client. A clean progressive web app for managing multiple Shlink instances — useful if you run more than one short domain [website].
Cons
- PHP stack. Some engineering teams will reject PHP on principle, and the non-Docker install surface (extensions, Composer, installer CLI) is genuinely more involved than Node.js or Go alternatives [README][2].
- Geolocation is not self-contained. Requires a separate MaxMind account and license key. Minor hurdle but a genuine surprise for first-timers [2].
- No managed cloud option. Self-host or nothing. For a team with zero ops capacity, that’s a hard blocker [website].
- No built-in team user management. Multi-user access is managed through API keys — there’s no role-based UI for a marketing team to self-serve access [merged profile].
- Sparse third-party review coverage. Compared to Bitly or other major tools, there’s limited independent review material, making it harder to validate real-world pain points before committing [3].
- Setup friction for non-technical users. Docker, DNS, reverse proxy, and MaxMind registration are prerequisites. Each is manageable individually; together they’re a meaningful barrier [1][2].
Who should use this / who shouldn’t
Use Shlink if:
- You’re paying Bitly $8–$29/month for branded short links and the per-link caps are a recurring irritant.
- You need custom domains on your links — Shlink’s multi-domain support handles this cleanly at no extra cost.
- You want click analytics (geo, device, referrer) that stay entirely within your own infrastructure.
- You need geo-based or device-based redirect logic — sending iOS users to the App Store and desktop users to a landing page, for instance.
- You have someone who can handle a Docker deployment, or you’re willing to pay once for setup.
- You’re building something that needs programmatic link creation via REST API.
Skip it (use Kutt.it) if:
- You want open-source URL shortening with a simpler setup and a Node.js stack.
- You don’t need multi-domain support or dynamic redirect logic.
- A minimal feature surface is a feature, not a gap.
Skip it (stay on Bitly free) if:
- You create fewer than 10 links per month and analytics don’t matter.
- You have zero technical capacity and no budget for a one-time setup.
Skip it (use YOURLS) if:
- You’re already running YOURLS and it covers your needs — the switching cost isn’t justified unless you specifically need Shlink’s API depth or multi-domain routing.
Alternatives worth considering
From the SaaSHub comparison data [3] and feature overlap:
- YOURLS — the veteran PHP alternative. Simpler to install, smaller feature set, active plugin community. Good for basic needs [3].
- Kutt.it — open-source, Node.js, custom domains, basic analytics. Cleaner UI than YOURLS, less feature-complete than Shlink [3].
- Polr — open-source and PHP-based like Shlink but minimal features and development has slowed [3].
- Bitly — the incumbent SaaS. Easiest onboarding, largest integrations, most expensive at volume, analytics data leaves your infrastructure.
- Short.io — commercial SaaS with custom domains, branded link management, cleaner UI than Bitly [3].
- T.LY — commercial SaaS link management with analytics and branded short links [3].
For a non-technical founder escaping Bitly costs, the realistic shortlist is Shlink vs Kutt.it. Pick Shlink if you need the REST API, multi-domain support, or geo-based redirects. Pick Kutt.it if you want something faster to spin up with fewer moving parts.
Bottom line
Shlink is the most complete self-hosted URL shortener available. If your use case goes beyond basic link shortening into multi-domain management, geo-based redirects, or API-driven link creation, Shlink covers it under an MIT license with no per-link pricing ever. The setup cost is real — Docker, a database, Nginx, a MaxMind account — and non-technical founders will need a guide or help for the initial deploy. But once it’s running, it does everything Bitly’s paid tiers do and several things they don’t, on infrastructure that cannot change its terms on you.
If you’re paying more than $72/year for a link shortener, Shlink pays for itself in the first month.
Sources
- Edward, Ojambo — “How to Self-Host Shlink: An Open-Source URL shortener” (Nov 21, 2025). https://www.ojambo.com/how-to-self-host-shlink-an-open-source-url-shortener
- Make Tech Easier — “How to Host Your Own bit.ly Server with Shlink in Linux”. https://www.maketecheasier.com/host-link-shortening-service-with-shlink-in-linux/
- SaaSHub — “Shlink Alternatives & Competitors” (updated Dec 15, 2025). https://www.saashub.com/shlink-alternatives
Primary sources:
- Official website: https://shlink.io
- Features page: https://shlink.io/features/
- Documentation: https://shlink.io/documentation/
- GitHub repository: https://github.com/shlinkio/shlink (4,793 stars, MIT license)
- Docker Hub: https://hub.docker.com/r/shlinkio/shlink
Features
Integrations & APIs
- Plugin / Extension System
- REST API
Related Self-Hosting Tools Tools
View all 212 →Rustdesk
110KOpen-source remote desktop software with self-hosted servers — a secure alternative to TeamViewer and AnyDesk with full data sovereignty.
Ladybird
61KLadybird is a truly independent web browser built from scratch, with no code from Chrome, Firefox, or Safari. Backed by a non-profit foundation.
TipTap
36KA suite of content editing and real-time collaboration tools. Build editor experiences like Notion in weeks, not years.
Awesome Sysadmin
33KA curated list of amazingly awesome open-source sysadmin resources.
restic
33KBackups done right. A modern backup program for Linux, BSD, Mac and Windows with strong encryption.
Homepage by gethomepage
29KA modern, fully static, fast, secure, highly customizable application dashboard with integrations for over 100 services.