> For AI agents: the complete documentation index is available at https://www.tteam.icu/llms.txt, the full documentation bundle is available at https://www.tteam.icu/llms-full.txt.

# libretranslate自建翻译

LibreTranslate 是开源的机器翻译服务，适合在个人服务器上搭建一个不依赖第三方账号的翻译接口。

[开源地址](https://github.com/LibreTranslate/LibreTranslate)

:::tip
默认端口为 `5000`。如果需要公网访问，建议放在反向代理后面，并按需增加鉴权或访问限制。
:::

## 快速启动

```sh file="./libretranslate/setup.sh" title="setup.sh"
#!/bin/bash

name=libretranslate

docker rm -f ${name}
docker run -d \
--network=host \
--name ${name} \
libretranslate/libretranslate \
--load-only zh,en,ja
```
