From CSCWiki
Jump to navigation Jump to search

Shlink is a self-hosted URL shortener. We run an instance on caffeine, currently for exec-use only.

Installation Details

Shlink was installed manually (as of F2022 there is currently no Debian package for it). Its files are in /usr/local/lib/shlink on caffeine, with a symlink of bin/cli (the Shlink CLI) to /usr/local/bin/shlink as recommended by Shlink's docs. Due to Shlink only supporting PHP 8.2, which is in debian-unstable at the moment, the installation and CLI scripts were modified to use the php8.2 binary installed from

The web client (used to manage shortlinks graphically, the other option being the CLI) sources are located in /usr/local/bin/shlink/web-client/. Apache is configured (through sites-available/csc-links.conf and sites-real/csc-links) to serve actual shortlinks through (which itself redirects to the CSC homepage) and the web client through


Links can be managed at, or through the CLI (currently restricted to the staff group).

When you open it for the first time, you will see an interface that looks like this. Click Add a server.
Enter the details as follows. Name: URL: API key: The exec API key (in the usual exec passwords location, or ask an exec for it if you aren't one)

On the next interface, custom slug is the part of the URL that can be customized. If it is left blank, a random 4-character slug will be generated.

Use the csctest parameter to disable tracking on test requests.