MiBlog

Build A Personal Video Platform with AList

2023-09-13


中文版:AList建站笔记

Video Hosting Platform Built with AList

I’ve been working on a personal project these past few days since the pressure of exams isn’t too high. I thought it would be nice to have a platform for hosting gaming videos. Current platforms in China either have slow upload speeds or are not friendly to overseas resources, so I decided to give it a try.

Introduction to AList

The platform I chose is AList. From its external UI, it looks like a web-based file manager that can help you manage your files. However, its core functionality is to help you integrate all your data across various cloud storage services, even those on servers you’ve set up yourself. With high-speed internet, you can achieve an experience similar to NAS. As far as I know, whatever traditional NAS can do, AList can do better.

Resources Used

Relying on Baidu

AList supports most of the cloud drives on the market, including Baidu Cloud Drive. Other supported cloud drives can be found in its official documentation. The main issue here is configuring Baidu Cloud Drive. Since the default port for AList is reserved on Windows 10, you’ll need to change it. I used port 80 for easy access since I’m using an EC2 server.

You can follow the settings in the image below. Tokens can be found in AList’s official documentation. Be careful when configuring Baidu Cloud Drive. I suggest setting a password for the entire directory in “Metas” to prevent your files from being searchable and to avoid token leaks.

Alt text

Using Baidu Cloud for hosting may violate user agreements to some extent, which could lead to account suspension. Although the risk is almost zero with limited sharing, I also explored using object storage (similar to setting up your own server for data storage, upload, and download).

Using Cloudflare R2 Object Storage

The next day, I implemented R2’s object storage service to help me build my own online cloud drive, which I can fully control. I can also give others permission to upload and download, perfectly meeting my expectations.

The specific steps are to first create a “bucket,” then create a token to grant yourself or users upload and download permissions. You can set the token’s expiration time when creating it. I suggest not sharing or using tokens with admin permissions unless necessary.

To import R2 resources into AList’s default storage, simply select “Object Storage.” For resource uploads, I recommend using rclone, which is incredibly convenient. Just download and enter:

rclone config

Follow the prompts to enter the required parameters. These include:

This command helps you upload file_name.mp4 from your local directory to the folder_1 folder under the bucket_name bucket in the cloud using the r2name configuration.

Special thanks to Anwen, one of the contributors to AList, for pointing me in the right direction.

Now you can access the site using the account and password “cnapex”.