Files
Auto_Bangumi/docs/en/deploy/docker-cli.md
Estrella Pan b129c4437a chore(release): 准备 4.0.0
- 部署文档、升级指南与 README 改为正式版说法:latest = 4.0,3.3 固定为 3.3.7
- docs/changelog/4.0.md 新增 4.0.0 汇总(升级前必读、破坏性变更、新功能、主要修复),链接改为绝对地址
- 文档站与插件市场改为从 main 发布,插件上架 PR 的目标分支改为 main
- 文档站页脚版本 v4.0.0;en/ja README 的 star history 地址
2026-10-24 11:46:50 +02:00

63 lines
2.1 KiB
Markdown

# Deploy with Docker CLI
::: tip Upgrade from 3.3
The commands on this page use the `latest` tag, which installs the 4.0 stable release. If you use 3.3 now, read [Upgrade from 3.3 to 4.0](./upgrade-4.0) before you pull the new image. To stay on 3.3, set the tag to `3.3.7`. The 4.0 hard link plugin also needs the media library directory mounted into the container. Refer to [Bangumi Manager](../config/manager).
:::
## Note on New Versions
Since AutoBangumi 2.6, you can configure everything directly in the WebUI. You can start the container first and then configure it in the WebUI. Environment variable configuration from older versions will be automatically migrated. Environment variables still work but only take effect on the first startup.
## Create Data and Configuration Directories
To ensure AB's data and configuration persist across updates, we recommend using Docker volumes or bind mounts.
```shell
# Using bind mount
mkdir -p ${HOME}/AutoBangumi/{config,data}
cd ${HOME}/AutoBangumi
```
Choose either bind mount or Docker volume:
```shell
# Using Docker volume
docker volume create AutoBangumi_config
docker volume create AutoBangumi_data
```
## Deploy AutoBangumi with Docker CLI
Copy and run the following command.
Make sure your working directory is AutoBangumi.
```shell
docker run -d \
--name=AutoBangumi \
-v ${HOME}/AutoBangumi/config:/app/config \
-v ${HOME}/AutoBangumi/data:/app/data \
-p 7892:7892 \
-e TZ=Asia/Shanghai \
-e PUID=$(id -u) \
-e PGID=$(id -g) \
-e UMASK=022 \
--network=bridge \
--dns=8.8.8.8 \
--restart unless-stopped \
--log-opt max-size=10m \
--log-opt max-file=3 \
ghcr.io/estrellaxd/auto_bangumi:latest
```
If using Docker volumes, replace the bind paths accordingly:
```shell
-v AutoBangumi_config:/app/config \
-v AutoBangumi_data:/app/data \
```
The AB WebUI will start automatically, but the main program will be paused. Access `http://abhost:7892` to configure it.
AB will automatically write environment variables to `config.json` and start running.
We recommend using _[Portainer](https://www.portainer.io)_ or similar Docker management UIs for advanced deployment.