Skip to content
This repository has been archived by the owner on Jun 2, 2022. It is now read-only.

Commit

Permalink
Add en README
Browse files Browse the repository at this point in the history
  • Loading branch information
wy580477 committed May 8, 2022
1 parent 677bcc3 commit 927dc32
Show file tree
Hide file tree
Showing 3 changed files with 188 additions and 6 deletions.
22 changes: 16 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
[Click here for English version](https://github.com/wy580477/Aria2-AIO-Container/blob/main/README_en.md)

## 鸣谢

- [alexta69/metube](https://github.com/alexta69/metube) 简洁好用的yt-dlp前端。
Expand All @@ -18,7 +20,7 @@
[Heroku版本传送门](https://github.com/wy580477/Heroku-All-In-One-APP)

![image](https://user-images.githubusercontent.com/98247050/165260584-764dbf11-55e7-44c1-a303-bf60aff62b6b.png)

1. 开箱即用,只需要准备rclone.conf配置文件, 容器一切配置都预备齐全。
2. AMD64/Arm64/Armv7多架构支持。
3. 由caddy反代所有web服务和远程控制路径,均有密码保护,可自定义基础URL防爆破,并可使用caddy自动申请证书开启https。
Expand All @@ -31,29 +33,36 @@
10. 支持PUID/GUID方式以非root用户运行容器内进程。

## 快速部署

1. 建议使用docker-compose方式部署,方便修改变量配置。
2. 下载[docker-compose文件](https://raw.githubusercontent.com/wy580477/Aria2-AIO-Container/master/docker-compose.yml)
3. 按说明设置好变量,用如下命令运行容器。

```
docker-compose up -d
```

4. 按ip地址或域名+基础URL就可打开导航页,随后打开AriaNg,将变量中的密码填入AriaNg设置中的RPC密钥即可连接Aria2。
5. 打开Filebrowser页面,将事先准备好的rclone.conf配置文件上传到config目录下,运行如下命令重启容器即可让Aria2—Rclone联动功能生效。

```
docker restart allinone
```

### 更多用法和注意事项

1. 命令行调用yt-dlp方法:

```
docker exec allinone yt-dlp
# 可以使用alias设置别名方便使用:
alias dlpr="docker exec allinone yt-dlp --exec ytdlptorclone.sh -P /mnt/data/videos"
# 下载到/mnt/data/videos目录并与rclone联动,受POST_MODE变量控制。注意要用容器内部路径,不是主机路径。
dlpr https://www.youtube.com/watch?v=rbDzVzBsbGM
```
```

2. 考虑安全原因Filebrowser初始用户无管理员权限,如需要管理员权限,执行下列命令:

```
docker exec -it allinone sh
# 进入容器shell
Expand All @@ -63,11 +72,12 @@ filebrowser -d /mnt/config/filebrowser.db users add 用户名 密码 --perm.admi
# 新建管理员用户。也可以使用users update 用户名 --perm.admin命令赋予现有用户管理员权限。
sv start filebrowser
# 启动filebrowser服务
```
```

3. 删除config目录下filebrowser.db文件可重置filebrowser所有设置。
4. 无法通过Rclone Web UI远程设置需要网页认证的远程存储配置,建议在本地桌面系统上运行rclone config使用命令行配置或者rclone rcd使用Web UI网页配置。
5. caddy如果频繁申请证书会被限制导致启动失败,所以如果使用自动https功能,config目录下caddy目录不要随意删除/移动。
6. config/aria2目录下为Aria2相关配置文件。script.conf为Aria2自动化配置文件,可以更改文件自动清理设置和指定Rclone上传目录。
6. config/aria2目录下为Aria2相关配置文件。script.conf为Aria2自动化配置文件,可以更改文件自动清理设置和指定Rclone上传目录。
tracker.sh为自动更新tracker脚本,每24小时自动执行,注意会覆盖原tracker设置。如需要关闭,改名或删除tracker.sh即可。
7. config/homer_conf目录下为导航页配置文件和图标资源,配置文件详解见:https://github.com/bastienwirtz/homer/blob/main/docs/configuration.md
7. config/homer_conf目录下为导航页配置文件和图标资源,配置文件详解见:<https://github.com/bastienwirtz/homer/blob/main/docs/configuration.md>
添加到此目录下的图标文件,要在配置文件中以./assets/tools/example.png这样的路径调用。
87 changes: 87 additions & 0 deletions README_en.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
## Acknowledgments

- [alexta69/metube](https://github.com/alexta69/metube) Simple and easy-to-use yt-dlp frontend.
- [P3TERX/aria2.conf](https://github.com/P3TERX/aria2.conf) Rely on the Aria2 script from P3TERX to automatically trigger the Rclone upload after the Aria2 downloads completed.
- [wahyd4/aria2-ariang-docker](https://github.com/wahyd4/aria2-ariang-docker) Inspiration for this project.
- [bastienwirtz/homer](https://github.com/bastienwirtz/homer) A very simple static homepage for your server.
- [mayswind/AriaNg](https://github.com/mayswind/AriaNg) | [filebrowser/filebrowser](https://github.com/filebrowser/filebrowser) | [aria2/aria2](https://github.com/aria2/aria2) | [rclone/rclone](https://github.com/rclone/rclone) | [yt-dlp/yt-dlp](https://github.com/yt-dlp/yt-dlp)

[Overview](#Overview)

[Deployment](#Deployment)

[First run](#first)

[More usages and precautions](#more)

## <a id="Overview"></a>Overview

This project integrates metube yt-dlp web frontend, Aria2 + WebUI, Rclone + WebUI with auto-upload function, customizable portal page, Filebrowser.

[Lite version(without yt-dlp web frontend metube)](https://github.com/wy580477/Aria2-AIO-Container/tree/lite)
This version still has yt-dlp and only costs 40MB memory while idling.

[Stand alone Aria2 container with Rclone auto-upload function](https://github.com/wy580477/Aria2-Container-for-Rclone)

[Heroku version](https://github.com/wy580477/Heroku-All-In-One-APP)

![image](https://user-images.githubusercontent.com/98247050/165260584-764dbf11-55e7-44c1-a303-bf60aff62b6b.png)

1. Rclone auto-upload function only needs to prepare rclone.conf file, and all other configurations are set to go.
2. AMD64/Arm64/Armv7 multi-architecture support.
3. All web services and remote control paths are behind caddy reverse proxy and protected by password. You can customize base URL to hide you web services from brute force attack, and enable auto-https function from caddy.
4. Customizable portal page.
5. Rclone have multiple auto-upload modes, copy, move, and uploading while seeding.
6. YT-dlp Web front-end metube also supports Rclone auto-upload after downloads completed.
7. Rclone runs in daemon mode, easy to manually transfer files and monitor transfers in real time on WebUI.
8. Rclone which runs in standalone container can have customized parameters in docker-compose file.
9. You can connect to Aria2 and Rclone from other frontends such as AriaNg/RcloneNg running on other hosts.
10. All configurations are stored in config data volume for easy migration.
11. [runit](http://smarden.org/runit/index.html)-based process management, each service can be started and stopped independently.
12. Support using PUID/GUID env to run processes in container under non-root users.
The standalone container runs in daemon mode, which is convenient for monitoring transmissions on the WebUI in real time, and can customize the running parameters in the docker-compose file.

## <a id="Deployment"></a>Deployment

1. Download [docker-compose file](https://raw.githubusercontent.com/wy580477/Aria2-AIO-Container/master/docker-compose_en.yml)
2. Set envs and run container with following command:
```
docker-compose -f docker-compose_en.yml up -d
```
3. Visit IP address/domain name + base URL to open portal page, then open AriaNg and fill in RPC secret token with PASSWORD env value in AriaNg settings to connect to Aria2.
4. Open Filerowser page and upload prepared rclone.conf file to config folder, then run following command to to enable auto-upload function.
```
docker restart allinone
```

## <a id="more"></a>More usages and precautions

1. How to use yt-dlp via command line:
```
docker exec allinone yt-dlp
# Set alias:
alias dlpr="docker exec allinone yt-dlp --exec ytdlptorclone.sh -P /mnt/data/videos"
# Download videos to /mnt/data/videos folder, then send job to Rclone according to POST_MODE env.
dlpr https://www.youtube.com/watch?v=rbDzVzBsbGM
```

2. Considering security reasons, the initial user of Filebrowser doesn't have administrator privileges. If administrator privileges are wanted, run following commands:

```
docker exec -it allinone sh
# enter container shell
sv stop filebrowser
# stop filebrowser service
filebrowser -d /mnt/config/filebrowser.db users add 用户名 密码 --perm.admin
# add new account with admin privileges
sv start filebrowser
# start filebrowser service
```

3. To reset filebrowser settings, delete filebrowser.db file under config folder.
4. You can't config Rclone remote via Rclone WebUI. It is recommended to run rclone config on local desktop OS.
5. If you frequently apply for certificates, caddy will be throttled and cause startup failures. So if you are using auto-https function, caddy directory under config folder should not be deleted/moved frequently.
6. Under config/aria2 folder there are Aria2 related config files. script.conf is Aria2 automation configuration file which allows you to change the automatic file cleanup settings and specify the Rclone upload directory.
tracker.sh automatically updates Aria2 tracker list every 24 hours. Noting that original tracker list will be overwritten. If you need to disable this fuction, rename or delete tracker.sh.
7. Under config/homer_conf folder there are portal page config file and icon resources, for more information of config file: https://github.com/bastienwirtz/homer/blob/main/docs/configuration.md
After icons added to this folder, set icon path to such as ./assets/tools/example.png to use newly added icons.
85 changes: 85 additions & 0 deletions docker-compose_en.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
version: '3.4'
x-env:
# Global envs
environment: &env
USER: admin
# Username for all web services.
PASSWORD: password
# Password for all web services, double as Aria2 RPC token. Recommend strong password.
PUID: 0
PGID: 0
# If you are running container as an unprivileged user, pay attention to permissions of volumes.
TZ: Asia/Shanghai
# Timezone
x-global: &global
# Other global options
volumes:
- ./data:/mnt/data
# Volume for storing downloaded data.
- ./config:/mnt/config
# Volume for storing config files.
restart: unless-stopped
network_mode: host
logging:
driver: "journald"
options:
tag: "{{.Name}}"
services:
allinone:
<<: *global
image: ghcr.io/wy580477/aria2-aio-container:latest
container_name: allinone
environment:
<<: *env
DOMAIN:
# If value is set to a valid domain name (it can be resolved to your host) and port 80 is open to internet, caddy's auto-https function will be enabled.
# Set value to http://localhost, http service is provided at local loopback address.
# If you set value to blank, http service will open to external IP.This is not recommended other than using in home LAN.
EMAIL: internal
# Email address for receiving notification emails from certification authority, you can use fake address.
# If set to "internal", caddy will use self-signed cert.
WEB_PORT: 443
# Port for web services. If you want to disable auto-https from caddy, set to non-443 port.
LANGUAGE: en
PORTAL_PATH: /portal
# Portal page & base URL for all web services. Do not set to blank or '/'
ARIA_IPV6: "false"
# If you want to enable IPv6 support in Aria2, set value to "true".
POST_MODE: move
# Rclone auto-upload mode, dummy: Do nothing,move: Move files to local finished folder after Aria2 download & seeding completed.
# move_remote: Move files to local finished folder after Aria2 download & seeding completed,then move to Rclone remote storage.
# move_remote_only: Move files to Rclone remote storage after Aria2 download & seeding completed.
# copy_remote_first: Copy files to Rclone remote storage after Aria2 download completed, triggered before seeding for bittorrent tasks.
# copy_remote: Copy files to Rclone remote storage after Aria2 download & seeding completed.
# custom: set Aria2 Event Hook options in aria2 configure file by yourself.
# Under move_remote & move_remote_only modes, videos downloaded by mutube will be moved to Rclone remote storage.
# Under copy_remote & copy_remote_first modes, videos downloaded by mutube will be copied to Rclone remote storage.
AUTO_DRIVE_NAME: "true"
# If set to true, Rclone remote name which is used for auto-upload will be extracted from the first line of rclone config file.
# Otherwise you need to specify Rclone remote name in script.conf file under config folder.
RCLONE_ADDR: http://localhost:56802
# Rclone Remote Control address, default value is for host network mode.
# Set value to "http://rclone:5572" if you are using bridge network mode.
YTDL_OPTIONS: "{\"postprocessors\":[{\"key\":\"Exec\",\"exec_cmd\":\"ytdlptorclone.sh\"}],\"noprogress\":true}"
# metube yt-dlp options. Default value will send job to rclone according to RCLONE_AUTO_MODE after download completed. For more information: https://github.com/alexta69/metube#configuration-via-environment-variables
# Rclone may fail to upload some videos with special characters in title, add following in the YTDL_OPTIONS env: "restrictfilenames":true
YTDL_OUTPUT_TEMPLATE: "%(webpage_url_domain)s_%(title)s_%(uploader)s.%(ext)s"
# metube yt-dlp output filename template. For more information: https://github.com/yt-dlp/yt-dlp#output-template
rclone_daemon:
<<: *global
image: ghcr.io/wy580477/rclone-daemon-container:latest
container_name: rclone_daemon
hostname: rclone
environment:
<<: *env
command:
- --rc-serve
- --rc-addr=localhost:56802
# Default setting is for host network mode. Set to ":5572" if you are using bridge network mode.
- --config /mnt/config/rclone.conf
- --rc-allow-origin=*
- --use-mmap
- --buffer-size 4M
- --transfers 4
# - --copy-links
# For more options: https://rclone.org/flags/

0 comments on commit 927dc32

Please sign in to comment.