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.
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-stoppedGEOLITE_LICENSE_KEY=your_geolite_license_key_here
DB_PASSWORD=your_secure_database_passwordAuto-fetched about 22 hours ago
Auto-fetched about 22 hours ago