Shlink
A self-hosted PHP URL shortener that lets you create short links under your own domain with analytics and API support.
Smart Download
Visit Project Homepage
No installer available yet — head to the source repository
Self-host your own short links with full control over data and analytics.
Core Features
- Custom domain support for branded short links
- Detailed click analytics with geolocation
- Full REST API and CLI for automation
- Official web client available
- Docker deployment, multiple database support
What It Can't Do
- •No built-in UI – needs the separate web client; API key management is CLI-only; geolocation features require optional GeoLite2 database setup.
Use Cases
- Personal link management for blogs or social media
- Marketing campaign tracking and attribution
- Branded short links for trust and recognition
- Privacy-focused alternative to commercial services
Detailed Introduction
Shlink is an open-source, self-hosted URL shortening service built with PHP. It allows you to create and manage short links under your own custom domain, providing detailed click analytics, geolocation data, and a powerful REST API. You can run it on your own server using Docker or manual installation, supporting MySQL, PostgreSQL, SQLite and other databases. Unlike commercial services, Shlink gives you full control over your data and link management, with CLI and web client options for ease of use.
Troubleshooting & FAQ (2)
TroubleshootingWhy can't I create a pull request after forking and making changes?
Some projects restrict pull requests to repository collaborators. If your PR is blocked, the workaround is to open an issue and mention your fork's branch name, asking a maintainer to pull it. Check the project's contributing guide (e.g., DEVELOPING.md or AGENTS.md) for any updated instructions.
TroubleshootingHow to rotate Shlink API keys when running in Docker?
The INITIAL_API_KEY env var only sets the key on first container run. To rotate it, you can use a custom startup script that replaces the Docker entrypoint. The script should: 1) Calculate a deterministic key name (e.g., hash of the original key). 2) If a key with that name exists, delete it. 3) Create a new API key with the current INITIAL_API_KEY value. 4) Rename the key to the deterministic name. Pseudo-code:
$API_KEY_NAME = hash($INITIAL_API_KEY)
if $API_KEY_NAME exists
delete all existing keys
create api key using api-key:initial $INITIAL_API_KEY
rename $INITIAL_API_KEY to $API_KEY_NAMERestart the container after updating INITIAL_API_KEY. Note: This is a community workaround, not officially supported. Future Shlink versions may offer an API-based key management.
Tags
Getting Started
Download installer
Click the button above to download the installer for your system
Install the software
Double-click the downloaded installer and follow the prompts
Step 1: Ensure Docker (or PHP 8.4+ with a database) is installed
Step 2: Run docker run -p 8080:8080 -e DEFAULT_DOMAIN=your.domain shlinkio/shlink
Step 3: Generate an API key via bin/cli api-key:generate
- Step 1: Ensure Docker (or PHP 8.4+ with a database) is installed
- Step 2: Run docker run -p 8080:8080 -e DEFAULT_DOMAIN=your.domain shlinkio/shlink
- Step 3: Generate an API key via bin/cli api-key:generate
Checksum not available
This project has not published a SHA-256 checksum on its GitHub Release page
SHA256 Checksum
No checksum available
Download directly from GitHub Releases and verify file integrity yourself
All SHA-256 checksums on this platform are extracted from the project's official GitHub Release page, without any modification. You can independently verify them on the GitHub Releases page.
Open Source Transparency
View GitHub SourceUninstall Info
Remove Docker container and image (docker rm shlink && docker rmi shlinkio/shlink); for manual install, delete project directory and database.
No Extra Dependencies
Ready to use after download. No additional runtime required.
Having issues? Check the FAQ below
2 FAQs
Similar Projects
Umami
Umami is a simple, fast, privacy-focused web analytics tool that gives you full control over your data.
Immich
High performance self-hosted photo and video management solution with automatic backup, AI search, facial recognition, and multi-user support.
Vaultwarden
A lightweight, self-hosted Bitwarden server alternative written in Rust, compatible with official clients.