Self-host Shlink
updated Sep 2026deployed by usprices checked · Jul 2026Install verified on Ubuntu 26.04 · Sep 2026 · how we test
We earn commissions when you shop through the links below. Full disclosure →
A self-hosted URL shortener with a REST API and CLI, custom slugs, QR codes and visit tracking. It has no bundled web UI; manage it with the separate Shlink web client or the API.
Key facts
CategoryURL shortener
LicenseMIT
StackPHP
Min RAM256 MB
Official imageyes
Measured idle RAM94 MB
Difficulty
Websiteshlink.io (opens in new tab)
What you need
- Any VPS with at least 256 MB of RAM
- A domain you control — most self-hosted setups need HTTPS in front of them
- Under an hour if you've used Docker before
Where to host itaffiliate disclosure
Hetzner Cloudrun it on
From $23.59/mo · 2 vCPU / 4 GB / 80 GB · EU + USKamaterafree trial
From $4/mo · 1 vCPU / 1 GB / 20 GB · US + EU + AsiaDigitalOceanalso works on
From $6/mo · 1 vCPU / 1 GB / 25 GB · US + EU + AsiaPaid link — we earn a commission if you shop through it.
Install
Run these commands on your server:
# Shlink — official image with its built-in SQLite DB; set DEFAULT_DOMAIN to your short domain
SHLINK_API_KEY=$(openssl rand -hex 32) && echo "Shlink API key: $SHLINK_API_KEY"
docker run -d --name shlink --restart unless-stopped -p 8080:8080 \
-e DEFAULT_DOMAIN=SERVER_IP:8080 -e IS_HTTPS_ENABLED=false \
-e INITIAL_API_KEY="$SHLINK_API_KEY" \
shlinkio/shlink:stable
# add -e GEOLITE_LICENSE_KEY=<free MaxMind key> to geolocate visits
# API: http://SERVER_IP:8080/rest/health — point the Shlink web client at it with the key aboveMore self-hosted tools
URL shortener
Kutt
Node.jsSQLite
easyRead guide →
Invoicing
Akaunting
PHPLaravelVue.jsMariaDB
easyRead guide →
Helpdesk
FreeScout
PHPLaravelMySQL
easyRead guide →
Invoicing
Invoice Ninja
PHPLaravelMySQLRedis
easyRead guide →