Skip to content

Shlink

x86-64 arm64 · 🐳 Docker · Documentation · http://<your.IP>:8085

Shlink is a self-hosted URL shortener. It turns long links into short ones on your own domain, with custom slugs, tags, expiry dates and QR codes. Manage links with the REST API, the shlink command line or the Shlink web client.

Install from armbian-config → Software → Web Hosting → Shlink

The app has no separate image. Install an Armbian OS image first, then the app. For help with the app, read its documentation.

CLI install
armbian-config --cmd SHL001

The install asks for the domain of the short links, for example go.example.com.

  • A domain without a port uses HTTPS. Shlink then listens on 127.0.0.1:8085 only. Put a reverse proxy with a certificate in front, for example SWAG.
  • Keep the default <your.IP>:8085 to use Shlink on the local network only.
  • For an unattended install, set the domain in the environment:
Bash
sudo SHLINK_DOMAIN=go.example.com armbian-config --api module_shlink install

The install creates an API key. Read it from the settings file:

Bash
sudo grep INITIAL_API_KEY /armbian/shlink/shlink.env

Create a short link. Use your short domain over HTTPS. The http://<your.IP>:8085 form is for local network installs only.

Bash
1
2
3
curl -X POST https://go.example.com/rest/v3/short-urls \
  -H "X-Api-Key: <key>" -H "Content-Type: application/json" \
  -d '{"longUrl": "https://docs.armbian.com/", "customSlug": "docs"}'
Bash
docker exec -it shlink shlink short-url:create https://docs.armbian.com/
docker exec -it shlink shlink short-url:list
  • Settings and API key: /armbian/shlink/shlink.env
  • Data: /armbian/shlink/data/
Bash
docker logs -f shlink

All armbian-config commands

Action Command
Install armbian-config --api module_shlink install
Shlink remove armbian-config --api module_shlink remove
Shlink purge with data folder armbian-config --api module_shlink purge
Status armbian-config --api module_shlink status
Help armbian-config --api module_shlink help

Part of Armbian’s Web server, LEMP, reverse proxy, Let’s Encrypt SSL software.