> For the complete documentation index, see [llms.txt](https://doc.duaer.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.duaer.com/zh/hosting/configuration.md).

# 配置自托管 Duaer

加密密钥、环境变量、数据库与任务运行器。生产环境优先 Postgres，并固定 DUAER_ENCRYPTION_KEY。
## 配置入口

- [加密密钥](/zh/hosting/configuration/encryption-keys.md)：凭证落库前加密；队列模式所有 worker 同一把钥匙。
- [环境变量](/zh/hosting/configuration/environment-variables.md)：进程、`.env` 或容器注入。
- [支持的数据库](/zh/hosting/configuration/supported-databases-settings.md)：SQLite 或 Postgres。
- [任务运行器](/zh/hosting/configuration/task-runners.md)：内部或外部 runner。
- [配置示例](/zh/hosting/configuration/configuration-examples.md)：可直接套用的完整写法。
## Questions

### 自托管 Duaer 最先要配什么？

加密密钥、数据库（生产用 Postgres）、以及你会改的环境变量。队列模式还要让所有 worker 共用同一把密钥。

