MirrorNest
← Todas las guías

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.

Sistema: Any Docker hostURL-shortenerself-hostedDockerSitio oficial ↗Documentación oficial ↗
Esta guía se elaboró a partir de la documentación oficial de Shlink, enlazada arriba — verifica siempre ahí los nombres exactos de paquetes/versiones antes de ejecutar estos comandos en un servidor de producción, ya que las versiones de la distribución y del proyecto cambian con el tiempo.
  1. 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:stable
  2. 2Generate 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:generate
  3. 3Run 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