Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AniHub Docker Bundle

English | 中文 | 日本語

This project is intended to quickly set up the AniHub server-side environment, and assumes you have public network access, a domain, and Cloudflare integrated. If your situation does not match, you will need a different setup approach.

If you do not have a public IP, use the independent Cloudflare Tunnel setup.

Single docker-compose.yml repository that runs:

  • Caddy (HTTPS + WebDAV + Aria2 RPC reverse proxy)
  • Aria2
+-----------+ +-----------+ +-----------+
|Device A💻 | |Device B📱 | |Device C🖥️|
+-----------+ +-----------+ +-----------+
      \            |            /
       \           v           /
        +--------------------+
        |   Caddy 🔐 HTTPS   |
        +---------+----------+
                  / \
                 v   v
      +-----------------------------+
      | docker compose stack        |
      | +--------+   +----------+   |
      | |aria2⬇️ |   |WebDAV📁  |   |
      | +--------+   +----------+   |
      +-----------------------------+

Quick start

  1. Get project files (HTTPS clone or download ZIP):

    git clone https://github.com/ihciah/AniHubDocker.git
    cd AniHubDocker

    Or open the repository page in browser and click Code -> Download ZIP.

  2. Copy env template:

    cp .env.example .env
  3. Create a Cloudflare API Token:

    • Open: https://dash.cloudflare.com/profile/api-tokens
    • Click Create Token, and choose Create Custom Token.
    • Make sure to use a scoped API token, NOT a global API key.
    • It will need two permissions:
    • Zone - Zone - Read
    • Zone - DNS - Edit
    • Save the generated token for .env.
  4. Edit .env:

    • set domains
    • set HTTPS_PORT if you do not want to use 443
    • set DATA_DIR to a large external disk path
    • replace CLOUDFLARE_API_TOKEN
    • replace ARIA2_RPC_SECRET (must be non-empty)
    • set WEBDAV_AUTH_PAIRS (for example: admin:pass1;guest:pass2)
  5. Start:

    docker compose up -d
  6. Check status:

    docker compose ps
    docker compose logs -f caddy
    docker compose logs -f aria2

Notes

  • This setup uses network_mode: host, which is typically for Linux hosts.
  • Caddy HTTPS listen port can be changed by HTTPS_PORT in .env (default 443).
  • Download/WebDAV data is mapped from external DATA_DIR (not in repo).
  • aria2 RPC secret is not stored in aria2.conf; it is injected from .env.
  • WebDAV users are configured by WEBDAV_AUTH_PAIRS; password hashes are generated at container startup.
  • All previously hardcoded secrets are removed and replaced by environment values.
  • WEBDAV_AUTH_PAIRS format is user:password;user2:password2.
  • Do not use ; in usernames/passwords, and do not use : in passwords.
  • Aria2 state data is stored in ./aria2/data by default.

About

Setup aria2 and caddy with one click.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages