Business Software · Marketing & Customer Engagement
Shlink
A self-hosted URL shortener with REST, CLI, and web interfaces
Shlink is a PHP-based, self-hosted URL shortener for individuals and teams serving links under their own domains. It is released under the MIT license, with REST and command-line interfaces plus an official web client. The project text documents self-hosting and web-client access, but no hosted pricing.
Key facts
- License
- MIT
- Main language
- PHP
- Maintainer
- Shlink community
- First released
- 2016
- Latest release
- v5.1.8, October 21, 2026
- GitHub stars
- 5338, October 2026
- Hosted option
- None
What Shlink is
Shlink is a PHP-based URL shortener that serves shortened links under domains controlled by its operator. The repository was created on April 8, 2016, and its license identifies Alejandro Celaya as copyright holder for 2016 through 2024. The repository lists 5,338 stars, 425 forks, and ten named top contributors, with acelaya accounting for 4,784 contributions. Shlink is maintained through the shlinkio GitHub project, and the current repository description calls it a self-hosted URL shortener. The project text does not identify a backing company or publish funding information. Its intended audience includes people who want control over link domains, link management, API access, and visit data without placing the shortener itself on a hosted service.
How it works
Shlink turns long URLs into generated short codes or custom human-friendly slugs, then serves redirects from the operator's domains. A normal workflow starts with installation and configuration, followed by API-key generation. Users can create and manage links through the command line, REST API, or official progressive web application. The CLI covers URL listing, visit viewing, domain management, and related operations. The web client can manage multiple Shlink instances through the API. Tracking collects anonymized visit statistics and geolocates visitors, while dynamic redirects can select destinations using conditions such as browser type. The project also documents multiple domains, short-URL import, real-time updates, reverse-proxy use, and sending visits to Matomo.
Architecture and recent releases
The main implementation language is PHP, with Mezzio, Doctrine, and Symfony named among its technologies. Shlink supports MySQL, MariaDB, PostgreSQL, Microsoft SQL Server, and SQLite through the corresponding PHP database extensions. Deployment can use an official Docker image, a bundled distribution archive, RoadRunner, FrankenPHP, or a classic web server. Redis or Valkey can be used, including Redis clusters with sentinel ACL authentication. Releases in 2026 include v5.1.0 through v5.1.8. Version 5.1.0 added an indexed binary SHA-256 hash for long URLs, PHP 8.5 Docker images, browser conditions for dynamic redirects, and Redis sentinel authentication support. Version 5.1.8 updated Alpine for PHP security fixes.
License and pricing
The core project uses the MIT License. Its terms permit commercial use, modification, distribution, sublicensing, and sale, subject to including the copyright and permission notices, and disclaim liability. The license text does not impose a SaaS restriction or describe an open-core split. Shlink can be installed from a distribution archive or built from source, and the official Docker image supports container-based infrastructure. The project website also identifies an official web client for managing instances, but the provided text does not publish a hosted Shlink service, enterprise edition, or prices. JetBrains is credited for ongoing IDE-license support. MaxMind GeoLite2 data is included, with a separate GeoLite2 license-key requirement documented.
Limitations and how it compares
Shlink requires PHP 8.4 or 8.5 and database setup, so it demands more operational work than a hosted short-link product. Its documented choices are broader than a minimal single-binary service, but the available text does not state minimum CPU, memory, or storage requirements. Compared with YOURLS, Shlink offers a REST API, CLI, official web client, and documented multi-instance management. Compared with Kutt, it shares a self-hosted open-source focus while using a PHP deployment model and several database engines. Bitly remains the simpler proprietary choice for teams wanting a hosted service. Pick Shlink when owning the domains, deployment, API, and link data matters more than avoiding server administration.
Main features
- Custom short slugs. Create generated short codes or choose human-friendly slugs for links served under domains you control.
- REST API. Use authenticated REST endpoints to access, create, update, and manage shortened URLs from external applications.
- Command-line interface. Manage URLs, visits, domains, and related operations through Shlink’s command-line entry point for streamlined control.
- Progressive web app. Manage multiple Shlink instances through the official web client, which communicates with the REST API.
- Visit analytics. Collect anonymized statistics on visits and geolocate visitors when they click shortened URLs.
- Dynamic redirects. Choose different destinations using conditions including known browser types such as Chrome, Firefox, and Safari.
- Database flexibility. Run with MySQL, MariaDB, PostgreSQL, Microsoft SQL Server, or SQLite through their corresponding PHP extensions for database compatibility.
Self-hosting Shlink
Shlink can run from an official Docker image or a downloaded distribution archive, and it can also be built from source with Composer and the project's build script. The documented runtime requires PHP 8.4 or 8.5, JSON, cURL, PDO, intl, GD, and GMP or BCMath extensions. Supported databases are MySQL, MariaDB, PostgreSQL, Microsoft SQL Server, and SQLite. The installer runs on the target server, which needs write access to the data directory. Redis or Valkey is optional for documented integrations. The project documents updates and release archives, but does not state minimum hardware or backup procedures.
Strengths
- The MIT License permits commercial use, modification, distribution, sublicensing, and sale.
- REST, CLI, and web interfaces cover automation and routine administration.
- Operators can use MySQL, MariaDB, PostgreSQL, Microsoft SQL Server, or SQLite.
- The official Docker image fits container-based infrastructure.
Drawbacks
- PHP 8.4 or 8.5 and several extensions increase installation requirements.
- Operators must manage databases, permissions, upgrades, and domain infrastructure.
- The project text does not publish hosted-service pricing or minimum hardware.
What teams replace with it
Teams usually evaluate Shlink when they want to move off Bitly, Rebrandly, TinyURL.
For side-by-side commercial comparisons, browse our alternatives hub.
Open-source alternatives to Shlink
- YOURLS
- Kutt
- Lstu
- Polr
Frequently asked questions
Is Shlink free to use?
Yes. The Shlink repository is distributed under the MIT License, and the license permits use without restriction, including commercial use, modification, distribution, sublicensing, and sale. Running it still requires infrastructure and a supported PHP database setup. The provided project text does not list a paid hosted Shlink service or hosted subscription price.
Can businesses use Shlink commercially?
Yes. The MIT License permits commercial use, modification, distribution, sublicensing, and sale, subject to retaining the copyright and permission notices in copies or substantial portions. Shlink can therefore be deployed for internal business links or customer-facing services. The license disclaims warranties and limits author liability under its stated terms.
How do you self-host Shlink, and what does it require?
Install the official Docker image or download a distribution archive. Source builds use Git and Composer. The documented runtime requires PHP 8.4 or 8.5 plus JSON, cURL, PDO, intl, GD, and GMP or BCMath. Choose MySQL, MariaDB, PostgreSQL, Microsoft SQL Server, or SQLite, then run the installer on the target server.
How does Shlink compare with YOURLS?
Both are open-source, self-hosted URL shorteners. Shlink documents REST and CLI interfaces, an official web client, multiple database engines, browser-based dynamic redirects, and management of multiple instances through its web client. The provided YOURLS text is not included here, so a more detailed comparison of its current requirements or feature set is not established.
Does Shlink keep link data private?
Self-hosting lets the operator choose where Shlink, its database, and its domains run. Shlink says it collects anonymized visit statistics and geolocates visitors when links are clicked. Operators therefore control deployment and access, while visitor analytics remain a design consideration. The provided project text does not describe encryption defaults, retention settings, or a security policy.
Similar projects to compare
- KuttMITKutt is a self hosted URL shortener for individuals and teams seeking custom domains, link controls, private statistics, user administration, and API access. It runs on Node.js with SQLite, PostgreSQL, MySQL, MariaDB, and optional Redis, uses the MIT License, and supports direct or Docker Compose deployment. Operators manage installations themselves, while Kutt.to offers hosted premium accounts.
- Billion MailAGPL-3.0BillionMail is an AGPL-3.0 mail server, newsletter, and email marketing platform for operators who want to run delivery, contacts, and analytics themselves. The core software is free to download and no hosted SaaS plan is documented. Optional deployment support is listed at $98.9 or $49.9 per instance on its support page.
- Brace.toMITBrace.to is an MIT-licensed bookmark manager for encrypted link storage across web, Android, and iOS. Its client is open source, and a hosted service exists at brace.to. The project uses Stacks-based accounts and lets users choose a data server, while optional features cost about $4.99 per year.
- ChaskiqAGPL-3.0 with Commons Clause; commercial license availableChaskiq is a self-hostable live chat, support, and marketing platform for teams replacing Intercom-style tooling. Its core software combines AGPL-3.0 with Commons Clause terms, while a commercial license is available for proprietary applications. Hosted SaaS and paid installation support are offered.
- ChatwootMIT for Community edition; Enterprise License for enterprise directoryChatwoot is an omnichannel customer-support desk for live chat, email, social channels, voice, help centers, and automation. Its Community edition is MIT licensed, while enterprise functionality has separate licensing. Cloud includes a free Hacker tier, with paid plans starting at $19 per agent monthly. Self-hosted Community is free, with paid support and enterprise plans.
- ContentportAGPL-3.0Contentport is an AGPL-3.0 content platform for technical founders who write, schedule, and analyze posts on X. It trains an AI assistant on a user's successful posts and offers a hosted free tier plus a $20 monthly Pro plan. The source is public and can be self-hosted, but deployment requires several external services and credentials.
Sources
- Shlink GitHub repository and README
- Shlink GitHub releases
- Shlink documentation
- Shlink project website
- Shlink MIT License
Last updated 2026-10-22.