A favicon of Shlink

Shlink

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

Open Source Alternative to:

Screenshot of Shlink websiteVisit Shlink

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.

Share:
Details:
  • Stars


    5,265
  • Forks


    414
  • Last commit


    5 days ago
  • Repository age


    10 years
  • License


    MIT
  • Version


    5.1.6
  • Repository


    shlinkio/shlink

Auto-fetched from GitHub .

Ad

 

 
 
 
 

Open source alternatives similar to Shlink:

 

 
 
  • Stars


  • Forks


  • Last commit


 

 
 
  • Stars


  • Forks


  • Last commit


 

 
 
  • Stars


  • Forks


  • Last commit


Shlink: Open Source Alternative to Bitly, Rebrandly and Short.io – Unvendored