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

# libretranslate自建翻译


AI 总结AI 生成

**核心内容**：记录 LibreTranslate 自建翻译服务的部署方式、默认端口和反向代理使用建议。
**内容要点**：
- Docker 部署与默认端口
- 语言模型和翻译接口使用
- 反向代理、鉴权与访问控制建议
适合在个人服务器、家庭实验室或轻量生产环境中按步骤部署与维护时参考。

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
```
