Skip to content

Shlink

Self-hosted PHP URL shortener with REST API and CLI for your own domain

Permissive (OSI) · MIT
  • Self-hosted

Listed by , founder & editor

83

Health

Thriving

Overview

Stars

5,440

Last commit

2 days ago

Nov 2026

Repository age

10 years

since Apr 2016

Latest version

v5.1.9

Nov 2026

Contributors

–

4 active in 90 days

Releases

13

last 12 months

Docker pulls

37M

shlinkio/shlink

Language

PHP

Shlink is a URL shortener you run yourself and serve under your own domain. It is written in PHP and is controlled through a command line tool and a REST API. You create an API key with a CLI command and then use it to talk to the API.

You can deploy it with the official Docker image, configured through environment variables, or install it on your own host. The manual route needs PHP 8.4 or 8.5 with several extensions, plus MySQL, MariaDB, PostgreSQL, Microsoft SQL Server or SQLite. A dist zip is provided for each supported PHP version, and an installer script walks you through setup. RabbitMQ integration is available.

It is a self-hosted equivalent of Bitly for teams that want links on their own domain. It has no link-in-bio pages and no built-in UTM builder. The code is MIT licensed.

Who it's for

Teams that want branded short links

Links are served from your own domain and managed by REST API or CLI.

Skip if: You need link-in-bio pages or a UTM builder.

Developers adding short links to an app

The REST API and API keys make it easy to create links from code.

Skip if: You want a hosted service with no server to maintain.

Self-hosters with an existing database

It supports MySQL, MariaDB, PostgreSQL, SQL Server and SQLite.

Skip if: You cannot run PHP 8.4 or later or Docker.

The problem it solves

Public shortener services put their own domain on your links and keep your click data. Shlink lets you run the service on your own domain and server.

Strengths

  • Official Docker image configured through environment variables
  • Works with five database engines
  • REST API plus a full CLI
  • Dist packages for each supported PHP version
  • MIT license, 12 releases in the last year

Trade-offs

  • No link-in-bio pages
  • No built-in UTM builder
  • Manual install needs PHP 8.4 or 8.5 and several extensions
  • You run and update the server yourself

Shlink replaces

Self-host Shlink

Self-hostable
Yes
Docker image
shlinkio/shlink
Docker Compose
The repository ships a Compose file

In the community

Frequently asked questions

Is Shlink free?

Yes. It is MIT licensed and free to self-host.

Can I run it with Docker?

Yes. An official image is available and takes its configuration from environment variables.

Which databases work?

MySQL, MariaDB, PostgreSQL, Microsoft SQL Server and SQLite.

Does it replace Bitly?

For short links on your own domain with an API, yes. It lacks link-in-bio pages and a UTM builder.

Other Bitly alternatives

Compare all 5 Bitly alternatives →

Similar tools in Marketing and customer engagement tools

Formbricks

Marketing and customer engagement tools

Self-hosted survey platform for product teams running in-app and link surveys

13k 2.6k today Thriving AGPL-3.0

Replaces Google FormsQualtricsTypeform

Postiz

Marketing and customer engagement tools

Self-hostable social media scheduler with AI features and a public API

42k 8.1k today Thriving AGPL-3.0

Replaces BufferHootsuite

serpbear

Marketing and customer engagement tools

Self-hosted Google keyword rank tracker with email alerts, for site owners and SEO teams

2.2k 315 24 days ago Slowing MIT

YOURLS

Marketing and customer engagement tools

Self-hosted PHP URL shortener with stats and plugins for your own domain

12k 2.1k 4 days ago Active MIT

Kutt

Marketing and customer engagement tools

Self-hosted URL shortener with custom domains, passwords and OIDC login

11k 1.5k 36 days ago Active MIT

Replaces Bitly

littlelink-server

Marketing and customer engagement tools

Self-hosted link-in-bio page configured entirely through environment variables

1.2k 187 9 days ago Slowing MIT