Take full control of your links and data with a self-hosted, open-source URL shortening solution. Designed to run on your own domain, it provides a private alternative to third-party link shorteners, ensuring your data remains entirely in your hands. Whether you are managing links for a personal project or a business, the platform offers a robust set of tools to track and optimize your URLs.\n\nKey benefits include:\n* Comprehensive Analytics: Access detailed statistics including historical click reports, referrer tracking, and visitor geo-location.\n* Developer-Friendly API: Integrate link shortening directly into your existing workflows and applications with a powerful API.\n* Highly Extensible: Customize the platform to fit your exact needs using a versatile plugin architecture and dozens of community-built plugins.\n* Complete Ownership: Enjoy free and open-source software with no hidden fees, giving you absolute control over your links and data.
services:
yourls:
image: yourls
restart: always
ports:
- "8080:80"
environment:
YOURLS_DB_HOST: mysql
YOURLS_DB_USER: yourls
YOURLS_DB_PASS: ${YOURLS_DB_PASS}
YOURLS_DB_NAME: yourls
YOURLS_USER: ${YOURLS_ADMIN_USER}
YOURLS_PASS: ${YOURLS_ADMIN_PASS}
YOURLS_SITE: http://localhost:8080
depends_on:
- mysql
mysql:
image: mysql:5.7
restart: always
environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
MYSQL_DATABASE: yourls
MYSQL_USER: yourls
MYSQL_PASSWORD: ${YOURLS_DB_PASS}
volumes:
- ./mysql-data:/var/lib/mysqlYOURLS_DB_PASS=secure_database_password
YOURLS_ADMIN_USER=admin
YOURLS_ADMIN_PASS=secure_admin_password
MYSQL_ROOT_PASSWORD=secure_root_passwordAuto-fetched about 22 hours ago
Auto-fetched about 22 hours ago