# 安装CasaOS (Docker)

## 4、安装CasaOS（ Docker）

{% hint style="danger" %}
安装CasaOS需要的文件位于github，因此建议挂代理访问来加速下载过程。
{% endhint %}

<figure><img src="/files/05MHGpOs65ICjMOqWPPg" alt=""><figcaption><p>一般在深度deepin系统下是无法使用CasaOS的会报错</p></figcaption></figure>

<pre class="language-bash"><code class="lang-bash"># 打补丁
# 安装深度deepin缺少的依赖包udevil
wget https://mirrors-i.tuna.tsinghua.edu.cn/debian/pool/main/u/udevil/udevil_0.4.4-3_amd64.deb
sudo dpkg -i udevil_0.4.4-3_amd64.deb
# 安装深度deepin缺少的依赖包mergerfs
wget https://mirrors.sohu.com/deepin/pool/main/m/mergerfs/mergerfs_2.24.2-4_amd64.deb
sudo dpkg -i mergerfs_2.24.2-4_amd64.deb
<strong>
</strong></code></pre>

{% hint style="info" %}

```
由于CasaOS暂时没有适配深度deepin v23系统,但适配了标准的Debian 12。
而深度deepin系统恰好是基于debian 12制作的，嘿，那就先伪装一下debian 12/bookworm 
从而让CasaOS的脚本顺利通过。
暂时修改一下/etc/os-release 中的ID和VERSION_CODENAME
```

{% endhint %}

#### <mark style="color:red;">备份一下配置文件</mark>

```bash
# 备份一下原始文件
sudo cp /etc/os-release /etc/os-release.backup

```

#### 修改系统名称和代号，待CasaOS安装成功后，还原回来。

```bash
sudo sed -i -e 's/^ID=.*$/ID=debian/' -e 's/^VERSION_CODENAME=.*$/VERSION_CODENAME=bookworm/' /etc/os-release

```

<figure><img src="/files/hvEsdk3h8qQKHMp24clv" alt=""><figcaption></figcaption></figure>

```bash
# 在深度deepin v23（debian 12） 系统下安装CasaOS
curl -fsSL https://get.casaos.io | sudo bash
```

## <mark style="color:red;">安装成功后,记得将系统名称还原回来</mark>

```bash
# CasaOS安装成功之后,要记得还原配置文件
sudo mv /etc/os-release.backup /etc/os-release

```

#### 如何卸载 CasaOS

```
casaos-uninstall
```

## 配置docker国内镜像

```bash
sudo mkdir -p /etc/docker
sudo tee /etc/docker/daemon.json <<-'EOF'
{
  "registry-mirrors": [
    "https://0b27f0a81a00f3560fbdc00ddd2f99e0.mirror.swr.myhuaweicloud.com",
    "https://ypzju6vq.mirror.aliyuncs.com",
    "https://registry.docker-cn.com",
    "http://hub-mirror.c.163.com",
    "https://docker.mirrors.ustc.edu.cn"
  ]
}
EOF
sudo systemctl daemon-reload
sudo systemctl restart docker
```

## 测试一下Jellyfin等app


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://didiboy0702.gitbook.io/copy-of-bi-ji/ban-gong-nas-all-in-one/an-zhuang-casaos-docker.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
