
Deploy yourls on Your Own Server
YOURLS is a set of PHP scripts that will allow you to run Your Own URL Shortener.
📦 Other
想更快部署 yourls到服务器?试试 Senate,一条命令完成部署,自动配置 HTTPS 和监控。
什么是 yourls?
YOURLS is a set of PHP scripts that will allow you to run Your Own URL Shortener.
自托管 yourls
按照以下步骤在您的服务器上部署。
1
安装 Docker
如果服务器上已安装 Docker,可跳过此步骤。
curl -fsSL https://get.docker.com | sh
2
配置
自定义以下设置。大多数情况下使用默认值即可。
General
3
部署
复制配置并在服务器上运行。
services:
yourls:
image: yourls:1.9.2
environment:
YOURLS_DB_HOST: yourls-db:3306
YOURLS_DB_NAME: yourls
YOURLS_DB_PASS: 9a619509b29f09be
YOURLS_DB_USER: yourls
YOURLS_PASS: ""
YOURLS_SITE: ""
YOURLS_USER: ""
volumes:
- yourls-plugins:/usr/src/yourls/plugins
depends_on:
- yourls-db
yourls-db:
image: mysql:5.7
environment:
MYSQL_DATABASE: yourls
MYSQL_PASSWORD: 9a619509b29f09be
MYSQL_ROOT_PASSWORD: 9a619509b29f09be
MYSQL_USER: yourls
volumes:
- yourls-db-data:/var/lib/mysql
volumes:
yourls-plugins: {}
yourls-db-data: {}
然后运行:
docker compose up -d
4
访问
启动后,访问您的应用: http://localhost:80
为什么要自托管 yourls?
完全数据所有权
数据保存在您的服务器上,无第三方访问。
无月费
只需支付服务器费用,无按席位或用量收费。
完全控制
按您的需求自定义、备份和扩展。
隐私与合规
满足 GDPR、HIPAA 或内部安全要求。
技术细节
Docker 镜像
yourls:${yourls_version}想更快部署?
尝试 Senate!Senate 帮您处理 Docker、HTTPS、更新和监控。一条命令部署 300+ 应用。
在任意 Linux 服务器上安装:
sh -c "$(curl -sSL https://get.senate.sh)"