Install OneList (onedrive directory program) on Baota Panel, set up reverse generation, and create a personal network disk system

Install OneList (onedrive directory program) on Baota Panel, set up reverse generation, and create a personal network disk system

For reference: OneDriveUploader: a tool for multi-threaded uploading of files/folders to OneDrive, supporting Linux, Windows, and MacOS

1. Introduction to OneList

OneList is based on GoLang
Supports international version, personal free version (home version), and Chinese version (21Vianet).
Supports listing directories of multiple disks at the same time (requires each disk's SubPath to be unique)
Supports more than 200 items in a folder and supports background automatic cache refresh.
Supports special characters in the path.
Support using different directories to encrypt with different accounts and passwords (HTTP 401).
Supports hidden directories and files (skip cache).
Data is stored in memory, and the response is faster.

2. Install the pagoda panel

Install Baota Panel 5.9.1 and manually modify it to the professional version (expiration date: 2999-12-31)

3. Install Go1.12.5

Under SSH:

 wget -O golang_install.sh https://lowvps.cn/wp-content/uploads/2019/05/golang_install.sh && sh golang_install.sh

If the pagoda panel has been installed, skip installing pagoda and install go1.12.5 directly.

Then execute

 source /etc/profile

Make it effective

Execute and check whether it is successful

 go version

4. Install OneList

1. Download OneList and set permissions

 mkdir /opt/OneList && cd $_
wget https://raw.githubusercontent.com/MoeClub/OneList/master/Rewrite/amd64/linux/OneList
chmod +x OneList

2. Authorization and Authentication Click URL on the right to log in and authorize [International Edition, Personal Edition (Home Edition)], [Chinese Edition (21Vianet)].

After authorization, you will get a link that starts with localhost and cannot be opened. Copy the entire link address here, including localhost .

3. Use commands

 Usage of OneList: -a string // 初始化配置文件,添加新配置Setup and Init auth.json. -bind string // 綁定IP地址(公網: 0.0.0.0) Bind Address ( default "127.0.0.1" ) -port string // 綁定端口(HTTP:80) Port ( default "5288" ) -s string // 設置SubPath 項, 需要與-a 一起使用. Set SubPath. [unique per account] ( default "/" ) -c string // 配置文件Config file. ( default "config.json" ) -t string // Index.html 目錄樣式文件Index file. ( default "index.html" ) -cn // 開關// 授權中國版(世紀互聯), 需要此參數. OneDrive by 21Vianet. -ms // 開關// 授權個人版(家庭版), 需要此參數. OneDrive by Microsoft.

4. Generate configuration files

 #國際版,將url換成你上面復制的授權地址,包括http://loaclhost。 ./OneList -a "url" -s "/onedrive01" #個人版(家庭版),將url換成你上面復制的授權地址,包括http://loaclhost。 ./OneList -ms -a "url" -s "/onedrive02" #中國版(世紀互聯),將url換成你上面復制的授權地址,包括http://loaclhost。 ./OneList -cn -a "url" -s "/onedrive03"

If the message Success! Add config. '/path/to/config.json' is displayed, the addition is successful.

It is important to note that:

 1 、授權url地址只能用一次,超過需要重新授權。 2 、命令中的/onedrive01參數為指定網盤地址后綴,比如http: //domain.com/onedrive01。 3 、授權多個網盤的話,重復授權多次即可,參數均會添加到一個配置文件,且后綴不能重復。 4 、地址后綴填錯了的,可以稍后在配置文件中修改。

The default configuration file path for this article is /opt/OneList/config.json , with detailed parameters that can be modified at your own will:

 [ { // 如果是家庭版或者個人免費版, 此項應為true . "MSAccount" : false , // 如果是中國版(世紀互聯), 此項應為true . "MainLand" : false , // 授權令牌"RefreshToken" : "1234564567890ABCDEF" , // 單配置文件中,此項要唯一.將此OneDrive中設置為`RootPath`目錄映射在`http://127.0.0.1:5288/onedrive` 下. / / (只推薦一個盤位的時候使用根目錄"/ ".) " SubPath ": " /onedrive ", // 讀取OneDrive的某個目錄作為根目錄. (支持根目錄" / ") " RootPath ": " /Test ", // 隱藏OneDrive目錄中的文件夾和文件, 條目間使用" |" 分割. (跳過緩存設置的條目.) "HidePath": "/Test/Obj01| /Test/Obj02 ", // 使用用戶名和密碼加密OneDrive目錄. 目錄和用戶名密碼間使用" ? " 分割, 用戶名密碼使用" : " 分割, 條目間使用" | " 分割. 無效條目將跳過. " AuthPath ": " /Test/Auth01?user01 :pwd01|/Test/Auth02?user02 :pwd02 ", // 緩存刷新間隔.(所有項目中的刷新時間取最小值為有效刷新間隔) " RefreshInterval ": 900 } ]

Please note that when mounting multiple drive letters, please do not use / for the SubPath parameter. For a single network disk, it is recommended to use / .

5. Run OneList

I recommend these two modified templates, which can play videos, etc.:

1. https://raw.githubusercontent.com/jackjieYYY/yyy/master/index.html
2. https://raw.githubusercontent.com/MoeClub/OneList/master/Rewrite/%40Theme/HaorWu/index.html
Original version: https://raw.githubusercontent.com/MoeClub/OneList/master/Rewrite/index.html

Replace the following https://raw.githubusercontent.com/MoeClub/OneList/master/Rewrite/index.html

 #下載index.html,與config.json同目錄,即本文默認的/opt/OneList wget https://raw.githubusercontent.com/MoeClub/OneList/master/Rewrite/index.html -P /opt/OneList #監聽8000地址,自行修改nohup /opt/OneList/OneList -bind 0.0.0.0 -port 8000 > /dev/null 2>&1 &

Finally, open ip:端口to access it. If SubPath is / when you mount the network disk, then check it directly through the root directory. If it is /onedrive1 , then check it through ip:端口/onedrive1 . If the path does not exist, it will prompt No Found.

The first run will cache asynchronously, that is, at least one disk will be cached successfully before it will be displayed.

6. Set up reverse proxy and access directly using domain name

Baota installs Nginx, creates a site, and sets up anti-generation

7. Automatic startup

Here we create a simple systemd configuration file, suitable for CentOS 7 , Debian 8+ , Ubuntu 16+ .

Use command:

 #設置你的運行監聽端口,即你可以通過ip:端口訪問程序,這里默認8000。 port= "8000" #將以下代碼一起復制到SSH運行cat > /etc/systemd/system/onelist.service <<EOF [ Unit ] Description=onelist After=network.target [ Service ] Type=simple ExecStart=nohup /opt/OneList/OneList -bind 0.0.0.0 -port 8000 > /dev/null 2>&1 & Restart= on -failure [ Install ] WantedBy=multi-user.target EOF #啟動并設置開機自啟systemctl start onelist systemctl enable onelist

uninstall

 #未設置開機自啟rm -rf /opt/OneList #設置過開機自啟systemctl stop onelist systemctl disable onelist rm -rf /opt/OneList /etc/systemd/system/onelist.service

Finally, if we only want to display certain folders of the network disk, we can mount different directories of the network disk separately. For specific operations, please refer to the configuration file instructions.

OneList open source address: https://github.com/MoeClub/OneList/tree/master/Rewrite

Magic modified template, can play videos, etc.: https://github.com/MoeClub/OneList/tree/master/Rewrite/%40Theme

<<:  Hostsolutions: 50% of the balance will be given for recharging; Romanian hosting, no copyright restrictions

>>:  HostDoc: £25/year/2 cores/2GB memory/20GB SSD space/5TB traffic/1Gbps port/KVM/Kansas/UK, etc.

Recommend

Maple Leaf Hosting 1GB Memory KVM VPS Hong Kong CN2 Simple Review

Maple Leaf Host KVM VPS Details: Maple Leaf Host:...

$9.95/year/10GB space/75GB traffic virtual host - net2hosting

net2hosting is an American hosting company establ...

free-www: $0.8/month/256MB RAM/5GB SSD space/unlimited traffic/KVM/Siberia

free-www, a Russian hosting provider, provides va...

BLUEVM OpenVZ VPS Super Deals

BLUEVM has been introduced by Love8 before, link:...

NodeServ: $13/year/256MB RAM/50GB storage/500GB bandwidth/OpenVZ/Jacksonville

NodeServ, whose KVM VPS was previously introduced...

What is a VPS

VPS (Virtual Private Server) technology is a high...

TuliHost: $5/month/2GB RAM/20GB SSD space/1TB traffic/KVM/German He

TuliHost, a newly established hosting provider, c...

smart2host: $2.5/month/2GB RAM/20GB storage/unlimited traffic/OpenVZ/Romania

Smart2host, a Romanian hosting provider, provides...