Shlink
PHP self-hosted URL shortener that serves short links from your own domain, driven by a REST API and a command line tool.

Shlink is a self-hosted URL shortener written in PHP, built so the short links you hand out carry your own domain rather than somebody else's. Nothing about the links depends on a third party service staying in business.
There are two ways to drive it and they overlap almost entirely. The command line exposes every operation through a single entry point that is easy to symlink into your path, while a documented REST API covers the same ground for anything programmatic. API key management is the one job reserved for the terminal.
Getting a working install involves a few decisions.
- Distribution: prebundled dist files are published for every supported PHP version, or you build from source with Composer.
- Runtime: PHP 8.4 or 8.5 with the json, curl, pdo, intl, gd and gmp or bcmath extensions.
- Database: MySQL, MariaDB, PostgreSQL, Microsoft SQL Server or SQLite, each with its matching pdo driver.
- Guided setup: an installer script walks through configuration on the server itself, then generates your first API key.
- Web client: a separate front end can be self-hosted or used from the project's own hosted instance.
An official Docker image takes the same configuration through environment variables, which is the shortest path for most people. The apcu extension is recommended unless you plan to run under RoadRunner, and sockets plus bcmath are needed to integrate with RabbitMQ. Geolocation of visits uses MaxMind GeoLite2 data.
Stars
5,265Forks
414Last commit
5 days agoRepository age
10 yearsLicense
MITVersion
5.1.6Repository
shlinkio/shlink
Auto-fetched from GitHub .
Open source alternatives similar to Shlink:
Stars
Forks
Last commit
Stars
Forks
Last commit
Stars
Forks
Last commit