> ## Documentation Index
> Fetch the complete documentation index at: https://autclaw.shop/llms.txt
> Use this file to discover all available pages before exploring further.

# autClaw Docker 运维命令

> 使用 Docker 和 Docker Compose 查看 autClaw 日志、重启、删除、更新容器，并配置飞牛 OS 或群晖 DSM 持久化目录。

本页用于已部署后的日常容器维护。你可以查看日志、重建容器、拉取最新镜像，或用 Docker Compose 统一管理飞牛 OS 和群晖 DSM 的持久化目录。

## 查看日志

```bash theme={null}
docker logs -f autclaw
```

## 停止并删除容器

```bash theme={null}
docker rm -f autclaw
```

## 更新到最新镜像

```bash theme={null}
docker pull nolan1121953/autclaw:latest
docker rm -f autclaw
docker run -d \
  --name autclaw \
  --restart unless-stopped \
  --network bridge \
  -p 8200:8200 \
  -v /opt/autclaw:/opt/autclaw \
  nolan1121953/autclaw:latest
```

## 使用 docker compose

```bash theme={null}
AUTCLAW_HOST_DATA_DIR=/opt/autclaw AUTCLAW_HTTP_PORT=8200 docker compose up -d
```

可选环境变量：

| 变量                      | 说明                                      |
| ----------------------- | --------------------------------------- |
| `AUTCLAW_HOST_DATA_DIR` | 宿主机持久化目录，默认建议 `/opt/autclaw`。           |
| `AUTCLAW_HTTP_PORT`     | 宿主机访问端口，默认 `8200`。                      |
| `AUTCLAW_IMAGE`         | 自定义镜像，默认 `nolan1121953/autclaw:latest`。 |

## 飞牛 OS compose 示例

```bash theme={null}
AUTCLAW_HOST_DATA_DIR=/vol1/1000/docker/autclaw AUTCLAW_HTTP_PORT=8200 docker compose up -d
```

## 群晖 compose 示例

```bash theme={null}
AUTCLAW_HOST_DATA_DIR=/volume1/docker/autclaw AUTCLAW_HTTP_PORT=8200 docker compose up -d
```

## 相关文档

* 第一次安装见 [如何用 Docker 部署 autClaw](/cn/getting-started/deploy)。
* 持久化路径含义见 [autClaw 运行目录和持久化路径](/cn/getting-started/runtime-paths)。
* 应用内在线升级见 [如何升级 autClaw](/cn/getting-started/upgrade)。
