Skip to content

Installation

MCmoderSD edited this page Oct 31, 2026 · 4 revisions

Installation

Requirements

  • Docker with Compose v2 (the docker compose command): Docker Desktop on Windows and macOS, or Docker Engine on Linux. The image exists for linux/amd64, linux/arm64 and linux/arm/v7, so it also runs on a Raspberry Pi 2 or newer, with a 32-bit or a 64-bit system.
  • Debrid-Link Premium and an API key.
  • Free disk space of about twice the size of what you download: the archives stay until everything is unpacked and sorted.

There are two ways to get the image: run the one that is published (A), or build it from the source code yourself (B). Configuration and usage are the same for both.

A. Run the published image

GitHub Actions builds the image for amd64, arm64 and arm/v7 and publishes it as mcmodersd/anilink-downloader on Docker Hub and as ghcr.io/mcmodersd/anilink-downloader on GitHub. These tags exist:

Tag Meaning
latest The newest release.
3 The newest 3.x release: updates that stay within version 3.
3.0 The newest 3.0.x release: bug fixes only.
3.0.0 Exactly this release. It never changes.
edge The newest state of the master branch. It is not a release and may be rough.

The compose file uses latest. To stay on a version, change the image: line, for example to mcmodersd/anilink-downloader:3.

1. Create the folder and the compose file

Create a folder, for example anilink, with an empty folder downloads inside it. Create the downloads folder yourself, before the first start. On Linux, Docker would otherwise create it for root, and the container, which runs as user 1000, could not write into it.

Next to it, create the file docker-compose.yaml:

services:
  anilink:
    image: mcmodersd/anilink-downloader:latest
    container_name: AniLink-Downloader
    restart: unless-stopped
    pull_policy: always
    user: 1000:1000
    build: .
    environment:
      Concurrent_Downloads: 3
      Debrid_Request_Delay: 500
      Debrid_ApiKey: ${DEBRID_API_KEY}
      Archive_Password_0: ${ARCHIVE_PASSWORD_0:-}
      Archive_Password_1: ${ARCHIVE_PASSWORD_1:-}
    ports:
      - 8080:8080/tcp
    volumes:
      - ./downloads:/downloads

networks:
  default:
    name: AniLink-Network

The build: . line is only used when you build the image yourself (B) and can stay as it is. What the settings in this file mean is described on the Configuration page.

2. Create .env

Next to it, create the file .env with your key. The default archive passwords are optional:

DEBRID_API_KEY=your-api-key

ARCHIVE_PASSWORD_0=www.example.org
ARCHIVE_PASSWORD_1=

3. Start it

docker compose up -d

Open http://localhost:8080. Within a minute docker compose ps shows the container as healthy. If it does not come up, docker compose logs tells why (see Troubleshooting).

B. Build the image yourself

Do this to run a version that is not published yet, to try your own changes, or to avoid pulling a ready-made image. The repository contains the Dockerfile, and the compose file points at it with build: ..

git clone https://github.com/MCmoderSD/AniLink-Downloader.git
cd AniLink-Downloader
cp .env.example .env          # on Windows: copy .env.example .env
mkdir downloads
# now fill in .env as described in step 2 above
docker compose up -d --build

--build builds the Dockerfile, tags the result as mcmodersd/anilink-downloader:latest and starts exactly that image. Nothing is pulled. The build runs four stages, and only the last one ends up in the image, which takes about 120 MB on disk and about 55 MB to download (Docker Desktop adds the two up and lists about 190 MB):

Stage Base image What it does
frontend node:26-alpine Installs the npm packages and builds the web page. Runs on the CPU of the machine that builds.
backend dotnet/sdk:10.0-alpine Restores the NuGet packages and publishes the API. Runs on the CPU of the machine that builds.
sevenzip alpine:3 Downloads the newest official 7-Zip for the CPU and checks that it reads RAR5.
runtime dotnet/aspnet:10.0-alpine Takes the results of the three, runs as user 1000:1000 and starts the API.

The build needs internet access (Docker Hub for the base images, the npm and NuGet registries, and GitHub for 7-Zip). The first build takes a few minutes; later ones reuse every layer that did not change, so editing the backend does not install the npm packages again. Your .env, the downloads folder and appsettings.Local.json are excluded by .dockerignore, so no secret can end up in an image layer.

Commands you will need to build and update:

Command What it does
docker compose build Builds the image and does not start anything.
docker compose up -d --build Builds, then (re)creates and starts the container.
docker compose up -d --pull never Starts the image already on this machine, without asking a registry.
docker compose build --pull Builds, and fetches newer base images first.
docker compose build --no-cache Builds from scratch, including the newest 7-Zip.

The 7-Zip version is looked up while the image is built, and Docker reuses a cached stage, so a cached build keeps the 7-Zip it had. To fetch the newest one and keep everything else cached, pass any number that changed since the last build:

docker compose build --build-arg SEVENZIP_REFRESH=$(date +%s)

In PowerShell, use $(Get-Date -UFormat %s) for $(date +%s).

To update your own build to a newer version of the code:

git pull
docker compose up -d --build

Warning

After building, start the container with docker compose up -d --build or docker compose up -d --pull never, not with a plain docker compose up -d. The compose file says pull_policy: always, so a plain up pulls the published image first, and once that image exists, it replaces the one you built.

To make a plain docker compose up -d use only your own build, put a file named docker-compose.override.yaml next to docker-compose.yaml. Compose reads it automatically and it is yours, so do not commit it:

services:
  anilink:
    image: anilink-downloader:local
    pull_policy: never

Now docker compose up -d builds the image anilink-downloader:local if it does not exist yet, and never pulls. After git pull, rebuild it with docker compose build.

Building for another CPU

To build for another CPU, for example for a Raspberry Pi on your PC, use Buildx and name the CPU: linux/arm64 for a 64-bit system, linux/arm/v7 for a 32-bit one. The web page and the API are built on your own CPU, and only a few small steps run in emulation:

docker buildx build --platform linux/arm64 -t anilink-downloader:arm64 --load .
docker buildx build --platform linux/arm/v7 -t anilink-downloader:armv7 --load .

Docker Desktop includes the emulation. On Linux, install it once with docker run --privileged --rm tonistiigi/binfmt --install all.

Clone this wiki locally