← Tous les guides
Shlink
A self-hosted URL shortener with a full REST API, visit-tracking analytics, and an optional web UI (Shlink Web Client) — your own private bit.ly.
Ce guide est élaboré à partir de la documentation officielle de Shlink, dont le lien figure ci-dessus — vérifiez toujours les noms exacts des paquets/versions avant d'exécuter ces commandes sur un serveur de production, car les versions de la distribution et du projet évoluent avec le temps.
1Run the Shlink server container
Set your own domain as DEFAULT_DOMAIN so generated short links use it instead of a placeholder.
docker run -d \ --name shlink \ -p 8082:8080 \ -e DEFAULT_DOMAIN=links.yourdomain.com \ -e IS_HTTPS_ENABLED=true \ -v ./shlink/data:/etc/shlink/data \ --restart unless-stopped \ shlinkio/shlink:stable2Generate an API key
Shlink has no built-in login UI on its own -- the server is API-first, so you create an API key from inside the running container.
docker exec -it shlink shlink api-key:generate3Run the Shlink Web Client (optional)
A separate official container gives you a normal web dashboard for creating and managing short links using the API key from the previous step.
docker run -d --name shlink-web-client -p 8083:8080 --restart unless-stopped shlinkio/shlink-web-client:stable