- Notifications
You must be signed in to change notification settings - Fork1
Use opentracker in docker. 在docker中使用 opentracker tracker 服务器
License
ryjer/docker-opentracker
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
opentracker is a open and free bittorrent tracker project. It aims for minimal resource usage and is intended to run at your wlan router.
If you want to run a open tracker, just pull the docker image and start up a container:
docker run -d --name opentracker \ --restart=always \ -p 6969:6969/udp \ -p 6969:6969/tcp \ ryjer/opentracker
or use docker-compose
version:'3.0'services:tracker:image:ryjer/opentrackercontainer_name:opentrackerrestart:alwaysports: -6969:6969/tcp -6969:6969/udpvolumes: -/etc/opentracker:/configdeploy:resources:limits:cpus:'1'memory:128Mlogging:driver:"json-file"options:max-size:"1m"
Then,open firewall 6969 TCP port and 6969 UDP port.
Stats information:http://domain:6969/stats orhttp://IP:6969/stats
Detail stats information:http://domain:6969/stats?mode=everything orhttp://IP:6969/stats?mode=everything
Other information:
http://domain:6969/stats?mode=top100http://domain:6969/stats?mode=top10
Opentracker 是一个用C语言实现的高性能 Bt tracker 服务器。其对硬件配置要求较低,甚至可以在低配置的路由器运行。
你可以在制作Bt种子文件的时候将服务器的地址添加到服务器列表中以使用本服务器。
本仓库将 opentracker 服务器封装为一个 docker 容器,并使用 Alpine 作为基础镜像,将镜像总体积控制在 8MB 以内。
如果你想运行一个公共的tracker服务器,可以运行以下命令开启一个容器:
docker run -d --name opentracker \ --restart=always \ -p 6969:6969/udp \ -p 6969:6969/tcp \ ryjer/opentracker
或者不分行,一行
docker run -d --name opentracker --restart=always -p 6969:6969/udp -p 6969:6969/tcp ryjer/opentracker
或者使用 docker-compose 创建一个配置文件,比如opentracker.yaml,其内容如下
version:'3.0'services:tracker:image:ryjer/opentrackercontainer_name:opentrackerrestart:alwaysports: -6969:6969/tcp -6969:6969/udpvolumes: -/etc/opentracker:/configdeploy:resources:limits:cpus:'1'memory:512Mlogging:driver:"json-file"options:max-size:"1m"
然后使用以下命令部署此容器
docker compose -f opentracker.yaml up -d
注意:
需要同时打开防火墙的 6969 TCP端口 和 6969 UDP端口,请注意检查操作系统的防火墙设置。如果你可以访问下面的统计信息网址,说明防火墙 tcp 端口已打开。
有的云服务商还会在外层再加一层防火墙,这种情况下你需要将两层防火墙的对应端口(例如 6969端口) 全部打开。
统计信息注:以下 domain 表示你的域名,IP表示运行 opentracker 容器主机的对外公网IP地址
简略统计信息网址http://domain:6969/stats 或http://服务器IP地址:6969/stats
详细统计信息http://domain:6969/stats?mode=everything 或http://服务器IP地址:6969/stats?mode=everything
排序的详细信息:
http://domain:6969/stats?mode=top100http://domain:6969/stats?mode=top10
如果你想自定义一些配置,请将容器的 /conf/opentracker.conf 文件映射到你指定的一个配置文件夹。然后编辑映射目录中的 opentracker.conf 配置文件(提示:因为没有编译,白名单和黑名单不可用)
docker run -d --name opentracker \ --restart=always \ -v /etc/opentracker/opentracker.conf:/conf/opentracker.conf \ -p 6969:6969/udp \ -p 6969:6969/tcp \ ryjer/opentracker
如果你想实现 https 访问,请借助 Apache 或 Nginx 等服务器进行反向代理。
制作种子添加Tracker服务器时,对应服务器地址后需要添加 /announce 路径,示例如下:
# 如果你有域名(例如 tracker.abc.com),这么写http://tracker.abc.com:6969/announce# 如果只有IP,这么写http://服务器IP地址:6969/announce
opentracker 同时也支持 udp 协议,所以也可以添加 udp 地址。
# 如果你有域名(例如 tracker.abc.com),这么写udp://tracker.abc.com:6969/announce# 如果只有IP,这么写udp://服务器IP地址:6969/announce
如果希望长期使用的话,建议使用域名而非IP地址。
不要使用带有test标签的镜像,此类标签都是用于测试的不稳定镜像
About
Use opentracker in docker. 在docker中使用 opentracker tracker 服务器
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
Packages0
Uh oh!
There was an error while loading.Please reload this page.