The media on social platforms is unreliable, as it can be blocked, hidden, or removed. For our favorite content, getting a 404 is an extremely annoying thing.
Mediaharbor is here to help you solve this issue. It downloads the media, as well as the description, avatar, and other information, and saves them locally. Unless your disk borked, no one can prevent you from accessing this pleasing content.
- Friendly WebUI interface and convenient installation with Docker.
- Provide various levels of control precision, including post, account, creator, and collection.
- Auto-sync accounts' content, automatically downloading new posts and recording profile changes.
- Built with FastAPI, React & Vite, and MUI, providing modern and fast experiences.
| Platform | Supportable |
|---|---|
| Douyin | ✅ |
| Bilibili | Developing... |
| Xiao Hong Shu | Developing... |
| X | Developing... |
| Developing... | |
| YouTube | Developing... |
Use the docer-compose.yml in the repo.
Change the mount path to your own config. The paths that need to be changed are shown below:
| Path | Description |
|---|---|
| /path/to/data | The data downloaded by Mediaharbor, including videos and photos from avatar to posts. |
| /path/to/cache | The path of log files, temparory hls files and config files. |
| /path/to/postgres | The database storage. |
| /path/to/certs (Optional) | The folder that contains your ssl certification and key. |
- Install
nginxandffmpeg. - Download the latest release.
- Copy the files under
/distto the specificd location in nginx. - To install the necessary pip packages, run the command
pip install -r requirements.txt. - Start the backend api using
uvicorn main:app --host 0.0.0.0 --port 38888under/api - Run
./nginx_entrypoint.shto start nginx.
git clone --recurse-submodules https://github.com/starstreammm/MediaHarbor.git
cd MediaHarbor
npm i
pip install -r requirements.txt
npm run dev
fastapi dev api/main.py --port 38888The path /path/to/certs must be mounted. Inside the folder, the structure must be:
/path/to/certs/
├── cert.crt
├── cert.key
The entrypoint will automatically detect if the certificate and key exist and decide whether to use SSL connection.
Douyin Api: https://github.com/Evil0ctal/Douyin_TikTok_Download_API
FFmpeg: https://ffmpeg.org