# Shlink

> The definitive self-hosted URL shortener

Source: https://talira.ai/catalog/shlink-y1kpeby3
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Web app, API, Command-line tool
- Categories: [business / marketing / link shortening](https://talira.ai/categories/business/marketing/link-shortening), [self hosted](https://talira.ai/categories/self-hosted)
- Platforms: web, docker, linux, cli[^14][^15][^16]
- Licence: MIT[^13]
- Pricing: Free and open source[^12][^13]
- Pricing notes: Free and MIT-licensed; the hosted web client at app.shlink.io is free and only talks to servers you run. The project takes donations.
- Free tier: yes[^12][^13]
- Self-hostable: yes[^12][^14]
- API: yes[^12][^14]
- Backed by: [Shlink](https://talira.ai/orgs/shlink.md)
- Creator: Alejandro Celaya

Shlink is a self-hosted URL shortener written in PHP that serves short links under your own domains, with a REST API and a command-line tool for everything, and shlink-web-client, a progressive web app for managing several Shlink servers that you can self-host or use at app.shlink.io. Every visit is tracked with anonymised stats, bot detection and geolocation (a free MaxMind GeoLite2 key or [Cloudflare](https://talira.ai/catalog/cloudflare-01k5h588.md)'s location headers), and links can have custom or multi-segment slugs, tags, titles, expiry dates, visit limits, QR codes and rules that redirect by device, language, query parameter, IP address or country. It supports multiple domains, API keys limited to one domain or to their own links, imports from [Bitly](https://talira.ai/catalog/bitly-1zdga8md.md), [YOURLS](https://talira.ai/catalog/yourls-dh9mpwm5.md), [Kutt](https://talira.ai/catalog/kutt-bq5erbx1.md), CSV and other Shlink instances, and publishes real-time events to Mercure, [RabbitMQ](https://talira.ai/catalog/rabbitmq-gvasg4ae.md) or [Redis](https://talira.ai/catalog/redis-v917j45s.md) pub/sub. It runs with the official [Docker](https://talira.ai/catalog/docker-engine-9442r3nw.md) image (RoadRunner) or from a dist file on [MySQL](https://talira.ai/catalog/mysql-dy4scprm.md), MariaDB, [PostgreSQL](https://talira.ai/catalog/postgresql-cm55wcnd.md) or SQL Server, and is MIT-licensed by Alejandro Celaya, with no paid edition.

## Links

- Website: https://shlink.io/
- GitHub: https://github.com/shlinkio/shlink
- Docs: https://shlink.io/documentation/

## Ways to install

### On your own server

- [Unraid Community Applications](https://talira.ai/catalog/unraid-community-applications-9jw5an1a.md): <https://ca.unraid.net/apps/shlink-18mbjto0nhwleg>[^1]
- [TrueNAS](https://talira.ai/catalog/truenas-pt2m6pd4.md): <https://apps.truenas.com/catalog/shlink_community/>[^2]
- [Coolify](https://talira.ai/catalog/coolify-0mx3mr9d.md): <https://coolify.io/docs/services/shlink>[^3]
- [Proxmox VE Helper-Scripts](https://talira.ai/catalog/proxmox-ve-helper-scripts-3h36wtyj.md): <https://community-scripts.org/scripts/shlink>[^4]

### Hosted for you

- [PikaPods](https://talira.ai/catalog/pikapods-c2638xaq.md): <https://www.pikapods.com/apps/shlink>[^5]
- [Elestio](https://talira.ai/catalog/elestio-kc92fhjp.md): <https://elest.io/open-source/shlink>[^6]
- [Railway](https://talira.ai/catalog/railway-mczwyt8g.md): <https://railway.com/deploy/shlink>[^7]

## Problems it solves

- a self-hosted Bitly alternative so our short links live on our own domain
- shorten links for marketing campaigns and see how many people clicked, from which countries
- create short URLs from our backend through a REST API with an API key
- send iPhone users to the App Store and Android users to Google Play from one link
- redirect visitors to a different page depending on their browser language
- short links that stop working after a date or a number of clicks
- run branded short links on several domains from one installation
- give each team an API key that can only create links on its own domain
- migrate thousands of links and their stats off Bitly or YOURLS without breaking them
- count how many times a newsletter was opened with a tracking pixel
- exclude bots and crawlers from our link click statistics
- get notified in real time on our message queue whenever someone clicks a short link
- send short-link visits to Matomo so they show up with the rest of our analytics
- manage our short links from the terminal or a shell script
- a free open source URL shortener that runs in a Docker container with PostgreSQL
- custom vanity slugs like /summer/sale for a print campaign
- pass the UTM query parameters from the short link through to the destination page
- a web dashboard to manage short links on several self-hosted shortener servers at once
- shorten a link from the Mac menu bar or an iOS shortcut using our own shortener
- generate a QR code for each short link to print on flyers

## Features

- short URLs under your own domains, with generated codes or custom and multi-segment slugs
- REST API with an OpenAPI spec, and a CLI that does the same (API key management is CLI-only)
- shlink-web-client, a progressive web app that manages several Shlink servers, self-hosted or at app.shlink.io
- visit tracking with anonymised stats, orphan visits and potential-bot detection
- visitor geolocation with a MaxMind GeoLite2 database (free licence key) or Cloudflare location headers
- dynamic redirect rules by device, language, query parameter, IP address, country or city
- short URL titles (fetched automatically if wanted), tags, expiry dates and maximum visits
- query parameter and extra path forwarding to the long URL
- multiple domains, with per-domain fallback redirects
- API key roles: only links the key created, only one domain, or no orphan visits
- import from Bitly, YOURLS, Kutt, a standard CSV or another Shlink instance
- real-time updates through a Mercure hub, RabbitMQ or Redis pub/sub
- email open tracking through a 1-pixel image at /track
- QR codes at /qr-code with size, format, margin and colours (deprecated since 4.5.0)
- sends visits to Matomo
- official PHP and JavaScript SDKs
- MySQL, MariaDB, PostgreSQL and Microsoft SQL Server, plus SQLite for testing
- official Docker image on RoadRunner; also runs on FrankenPHP or a classic web server

## Limitations

- No webhooks: real-time events go through a Mercure hub, RabbitMQ or Redis pub/sub instead, and only with the RoadRunner runtime[^8][^9]
- SQLite isn't supported for production: use MySQL, MariaDB, PostgreSQL or Microsoft SQL Server[^10]
- No visitor geolocation out of the box: it needs a free MaxMind GeoLite2 licence key or Cloudflare in front[^11]

## Capabilities

- Has an API: plan not known
- Has a command line tool: plan not known
- Has official SDKs: plan not known

## Trust

Overall: 0.46 out of 1.
Signals: backing 0.50, extensibility 0.40.

- has a company behind it
- created by Alejandro Celaya

Warnings:

- GitHub activity not fetched yet

## Alternatives

- [Kutt](https://talira.ai/catalog/kutt-bq5erbx1.md): Free modern URL shortener
- [Dub](https://talira.ai/catalog/dub-sp2g1n33.md): Link attribution platform: short links, conversion tracking and affiliate programs
- [YOURLS](https://talira.ai/catalog/yourls-dh9mpwm5.md): Your Own URL Shortener
- [Bitly](https://talira.ai/catalog/bitly-1zdga8md.md): Create, share, and track short links and QR Codes
- [Short.io](https://talira.ai/catalog/short-io-cg4h5rg4.md): URL shortener with custom domains & analytics
- [Chhoto URL](https://talira.ai/catalog/chhoto-url-4bqz4q7e.md): Small self-hosted URL shortener written in Rust

## Sources

[^1]: https://ca.unraid.net/api/apps/shlink-18mbjto0nhwleg (checked 20 Nov 2026)
[^2]: https://apps.truenas.com/catalog/shlink_community/ (checked 20 Nov 2026)
[^3]: https://coolify.io/docs/services/shlink (checked 20 Nov 2026)
[^4]: https://github.com/community-scripts/ProxmoxVE/blob/main/ct/shlink.sh (checked 21 Nov 2026)
[^5]: https://www.pikapods.com/apps/shlink (checked 20 Nov 2026)
[^6]: https://elest.io/open-source/shlink (checked 20 Nov 2026)
[^7]: https://railway.com/deploy/shlink (checked 20 Nov 2026)
[^8]: https://github.com/shlinkio/shlink/blob/develop/UPGRADE.md (checked 20 Nov 2026)
[^9]: https://shlink.io/documentation/advanced/real-time-updates/ (checked 20 Nov 2026)
[^10]: https://shlink.io/documentation/supported-db-engines/ (checked 20 Nov 2026)
[^11]: https://shlink.io/documentation/geolocating-visitors/ (checked 20 Nov 2026)
[^12]: https://shlink.io/ (checked 20 Nov 2026)
[^13]: https://github.com/shlinkio/shlink/blob/develop/LICENSE (checked 20 Nov 2026)
[^14]: https://github.com/shlinkio/shlink/blob/develop/README.md (checked 20 Nov 2026)
[^15]: https://shlink.io/documentation/install-docker-image/ (checked 20 Nov 2026)
[^16]: https://github.com/shlinkio/shlink-web-client/blob/develop/README.md (checked 20 Nov 2026)
