Shlink

From CSCWiki
Revision as of 01:11, 29 August 2022 by R389li (talk | contribs) (Create page)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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 packages.sury.org.

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 csclub.ca (which itself redirects to the CSC homepage) and the web client through links.csclub.uwaterloo.ca.

Usage

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

Use the csctest parameter to disable tracking on test requests.