Self-Hosting (Docker, Web & Multi-User Server)
AnimeLab runs cleanly as a headless web server on Linux servers, NAS devices, or Raspberry Pi/VPS hosts via Docker Compose or Python uv.
Quick Start with Docker Compose
git clone https://github.com/loeuf237/animelab.git
cd animelab
docker compose up -d --build --waitOpen http://localhost:8080/app/ in your browser. Desktop and mobile Chromium-based browsers can install it directly as a PWA (Install / Add to Home Screen).
Shared Server & Multi-User Mode
By default, AnimeLab runs in personal single-user mode. For shared households or small groups, you can deploy compose.shared.yaml (or enable authentication in the Desktop Launcher):
docker compose -f compose.yaml -f compose.shared.yaml up -d --build --waitFeatures of Shared Server mode:
- Admin-managed accounts with role permissions and one-time invitation & recovery codes
- Isolated per-user libraries, watch history, source cookies, and download queues
- Strict server-side path & SSRF protections when using proxies or custom sources
Exposing on LAN or Reverse Proxy (ANIMELAB_ALLOWED_HOSTS)
For security, AnimeLab rejects HTTP requests whose Host header is not explicitly allowed (HTTP 400). To access your server from another device on your LAN or behind Nginx / Caddy / Traefik, set ANIMELAB_ALLOWED_HOSTS:
services:
animelab:
environment:
ANIMELAB_HOST: 0.0.0.0
ANIMELAB_PORT: 8080
ANIMELAB_ALLOWED_HOSTS: 127.0.0.1,localhost,192.168.1.50,anime.example.org(Wildcard subdomains like *.example.org are supported; avoid using *.)
Example Caddy Reverse Proxy
anime.example.org {
reverse_proxy 127.0.0.1:8080
}Key Environment Variables
| Variable | Description | Default |
|---|---|---|
ANIMELAB_HOST | Server bind address | 127.0.0.1 |
ANIMELAB_PORT | HTTP listen port | 8080 |
ANIMELAB_ALLOWED_HOSTS | Allowed HTTP Host headers (comma-separated) | 127.0.0.1,localhost |
ANIMELAB_DOWNLOAD_DIR | Default download directory | ~/Downloads/AnimeLab |
ANIMELAB_RELOAD | Auto-reload backend on file changes | true |
ANIMELAB_CHROMIUM_PATH | Chromium binary path for browser verification | Auto-detected |
Run From Source (uv)
uv sync --locked
cd frontend && npm ci && npm run build && cd ..
ANIMELAB_HOST=127.0.0.1 ANIMELAB_RELOAD=false uv run --locked python run.py