Favicon of Shlink

Shlink

Host a custom URL shortener to manage links under your own domains. Generate custom slugs, track anonymized visit stats, and integrate via REST API or CLI.

Keep complete ownership of your links by hosting a powerful, PHP-based URL shortener on your own infrastructure. Whether you prefer using a dist file or a Docker container, deployment is straightforward and gives you absolute control over your custom domains and data.\n\nManage your links efficiently through multiple interfaces tailored to your workflow. Use the intuitive Progressive Web App to handle multiple instances, leverage the API-first design for seamless integration into your existing applications, or utilize the Command Line Interface to generate links and monitor traffic directly from your terminal.\n\nKey features include:\n* Custom Slugs: Generate unique short codes automatically or create human-friendly custom slugs.\n* Advanced Tracking: Collect anonymized visit statistics and geolocate your audience every time a link is clicked.\n* Flexible Access: Manage domains, list URLs, and review analytics from anywhere with simple authentication.

Directory Structure

shlink
postgres-data
shlink-data
.env
docker-compose.yml

docker-compose.yml

services:
  shlink:
    image: shlinkio/shlink:stable
    container_name: shlink
    restart: unless-stopped
    ports:
      - "8080:8080"
    environment:
      - DEFAULT_DOMAIN=localhost:8080
      - IS_HTTPS_ENABLED=false
      - GEOLITE_LICENSE_KEY=${GEOLITE_LICENSE_KEY}
      - DB_DRIVER=postgres
      - DB_USER=shlink
      - DB_PASSWORD=${DB_PASSWORD}
      - DB_NAME=shlink
      - DB_HOST=database
      - REDIS_SERVERS=tcp://redis:6379
    volumes:
      - ./shlink-data:/etc/shlink/data
    depends_on:
      - database
      - redis

  database:
    image: postgres:16-alpine
    container_name: shlink_db
    restart: unless-stopped
    environment:
      POSTGRES_USER: shlink
      POSTGRES_PASSWORD: ${DB_PASSWORD}
      POSTGRES_DB: shlink
    volumes:
      - ./postgres-data:/var/lib/postgresql/data

  redis:
    image: redis:7-alpine
    container_name: shlink_redis
    restart: unless-stopped

.env

GEOLITE_LICENSE_KEY=your_geolite_license_key_here
DB_PASSWORD=your_secure_database_password
Categories:

Share:

Ad
Favicon

 

  
 

Similar to Shlink

Favicon

 

  
  
Favicon

 

  
  
Favicon