Skip to content

Commit a03f85e

Browse files
authored
add tls configuration guidance (#33)
1 parent 27de9b9 commit a03f85e

File tree

8 files changed

+165
-7
lines changed

8 files changed

+165
-7
lines changed

docs/en/guide/configured/index.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
title: "RustFS configuration guidance"
3+
description: "Improving RustFS Security and Efficiency through Configuration"
4+
---
5+
6+
# RustFS configuration overview
7+
8+
This section outlines the configuration guide for RustFS instances, enabling more efficient and secure operation.
9+
10+
- [TLS configuration](./tls-configured.md)
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
---
2+
title: "RustFS TLS Configuration Guide"
3+
description: "Configure TLS for RustFS instances to access RustFS via HTTPS, ensuring secure file storage and access."
4+
---
5+
6+
# RustFS TLS Configuration
7+
8+
RustFS supports [configuring TLS](../../installation/security-checklists.md#2-network-transport-encryption-tlsssl) to enable more secure access and usage of RustFS instances. You need to specify the certificate path required for TLS using the environment variable `RUSTFS_TLS_PATH`.
9+
10+
## Configuration
11+
12+
### Prerequisites
13+
14+
- A working RustFS instance (see the [installation guide](../../en/installation/index.md) for details)
15+
- An available certificate pair (including the certificate file and the private key file)
16+
17+
**Note**: The certificate pair must be named `rustfs_cert.pem` and `rustfs_key.pem`, and placed in the specified certificate path.
18+
19+
### Configuration Steps
20+
21+
* Linux Installation
22+
23+
1. Edit the RustFS instance configuration file (the default file is `/etc/default/rustfs`) and add the `RUSTFS_TLS_PATH` environment variable.
24+
25+
```bash
26+
# Edit the RustFS instance configuration file
27+
sudo vi /etc/default/rustfs
28+
29+
# Add the RUSTFS_TLS_PATH environment variable
30+
RUSTFS_TLS_PATH="/opt/tls"
31+
```
32+
33+
**Note**: You can specify any path for `RUSTFS_TLS_PATH`, but it must contain both `rustfs_cert.pem` and `rustfs_key.pem`.
34+
35+
2. Restart the RustFS instance to apply the configuration.
36+
37+
```bash
38+
systemctl restart rustfs
39+
```
40+
41+
Access the instance via `https://rustfs.example.com:9000`.
42+
43+
44+
* Docker Installation
45+
46+
1. Mount the certificate path using the `-v` parameter and specify the `RUSTFS_TLS_PATH` environment variable using the `-e` parameter.
47+
48+
```bash
49+
docker pull rustfs/rustfs:latest
50+
docker run -d \
51+
--name rustfs \
52+
-e RUSTFS_TLS_PATH="/opt/tls/"
53+
-v /opt/tls:/opt/tls \
54+
-p 9000:9000 \
55+
-v /data:/data \
56+
rustfs/rustfs:latest
57+
```
58+
59+
2. Restart the RustFS instance container, then access the instance via `https://rustfs.example.com:9000`.
60+
61+
**Note**: Since the RustFS instance container runs as the `rustfs` user by default, make sure the certificate files (`rustfs_key.pem` and `rustfs_cert.pem`) are owned by `rustfs`. Otherwise, the RustFS instance will fail to read the certificate files due to permission issues, causing the TLS configuration to fail.

docs/en/installation/docker.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ docker run -d \
171171

172172
3. Environment variables and command line parameters can be used in a mixed manner, but command line parameters have higher priority
173173

174-
4. If using TLS, additional certificate paths are required:
174+
4. If [using TLS](../guide/configured/tls-configured.md), additional certificate paths are required:
175175
```bash
176176
-v /path/to/certs:/certs \
177177
-e RUSTFS_TLS_PATH=/certs \
@@ -206,7 +206,7 @@ docker run -d \
206206
1. Production environment recommendations:
207207

208208
- Use multi-node deployment architecture
209-
* Enable TLS encrypted communication
209+
* [Enable TLS encrypted communication](../guide/configured/tls-configured.md)
210210
* Configure log rotation policies
211211
* Set up regular backup strategies
212212

docs/en/sidebar.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,13 @@ export const enSidebar = [
9494
{ text: 'Docker Installation', link: '/installation/docker' },
9595
]
9696
},
97+
{
98+
text: 'Configuration Guides',
99+
link: '/guide/configured',
100+
items: [
101+
{ text: 'TLS configuration', link: '/guide/configured/tls-configured' },
102+
]
103+
},
97104
]
98105
},
99106
{
@@ -105,7 +112,7 @@ export const enSidebar = [
105112
{ text: 'Object Management', link: '/guide/bucket/object-upload-and-delete' },
106113
{ text: 'Access Keys', link: '/guide/access-token' },
107114
{ text: 'MinIO Client (mc)', link: '/guide/mc' },
108-
{ text: 'MCP', link: '/guide/mcp' },
115+
{ text: 'MCP Server', link: '/guide/mcp' },
109116
]
110117
},
111118
{

docs/zh/guide/configured/index.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
title: "RustFS 配置指南"
3+
description: "通过配置提升 RustFS 的安全性和高效性."
4+
---
5+
6+
# RustFS 配置概览
7+
8+
本章节分享 RustFS 实例的配置指南,以更高效、安全的方式运行 RustFS 实例。
9+
10+
- [TLS 配置](./tls-configured.md)
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
---
2+
title: "RustFS TLS 配置指南"
3+
description: "为 RustFS 实例配置 TLS,通过 HTTPS 访问 RustFS,实现安全的文件存储和访问."
4+
---
5+
6+
# RustFS TLS 配置
7+
8+
RustFS 支持通过[配置 TLS](../../../zh/installation/security-checklists.md#2-网络传输加密tlsssl)来以更加安全的方式访问和使用 RustFS 实例。需要通过环境变量 `RUSTFS_TLS_PATH` 指定 TLS 所需证书路径。
9+
10+
## 配置
11+
12+
### 前提条件
13+
14+
- 一个可用的 RustFS 实例(安装详情可查看[安装指南](../../../zh/installation/index.md)
15+
- 可用的证书对(包含证书文件和私钥文件)
16+
17+
**注意**:证书对的名称必须为 `rustfs_cert.pem``rustfs_key.pem`,并放置在指定的证书路径中。
18+
19+
### 配置步骤
20+
21+
* Linux 安装
22+
23+
1. 编辑 RustFS 实例的配置文件(默认文件为 `/etc/default/rustfs`),添加 `RUSTFS_TLS_PATH` 环境变量。
24+
25+
```bash
26+
# 编辑 RustFS 实例的配置文件
27+
sudo vi /etc/default/rustfs
28+
29+
# 添加 RUSTFS_TLS_PATH 环境变量
30+
RUSTFS_TLS_PATH="/opt/tls"
31+
```
32+
33+
**注意**:可以为 `RUSTFS_TLS_PATH` 指定任意路径,但是必须包含 `rustfs_cert.pem``rustfs_key.pem` 两个文件。
34+
35+
2. 重启 RustFS 实例,使配置生效。
36+
37+
```bash
38+
systemctl restart rustfs
39+
```
40+
41+
通过 `https://rustfs.example.com:9000` 访问实例。
42+
43+
44+
* Docker 安装
45+
46+
1. 通过 `-v` 参数挂载证书路径,并通过 `-e` 参数指定 `RUSTFS_TLS_PATH` 环境变量。
47+
48+
```bash
49+
docker pull rustfs/rustfs:latest
50+
docker run -d \
51+
--name rustfs \
52+
-e RUSTFS_TLS_PATH="/opt/tls/"
53+
-v /opt/tls:/opt/tls \
54+
-p 9000:9000 \
55+
-v /data:/data \
56+
rustfs/rustfs:latest
57+
```
58+
59+
1. 重启 RustFS 实例容器,然后通过 `https://rustfs.example.com:9000` 访问实例。
60+
61+
**注意**:由于 RustFS 实例容器默认以 `rustfs` 用户运行,因此需要确保证书文件(`rustfs_key.pem``rustfs_cert.pem`)的用户为 `rustfs`,否则会出现 RustFS 实例因为权限问题而无法读取证书文件,导致 TLS 配置失败。

docs/zh/installation/docker.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ docker run -d \
172172

173173
3. 环境变量和命令行参数可以混合使用,但命令行参数优先级更高
174174

175-
4. 如果使用 TLS,需要额外挂载证书路径:
175+
4. 如果[使用 TLS](../guide/configured/tls-configured.md),需要额外挂载证书路径:
176176
```bash
177177
-v /path/to/certs:/certs \
178178
-e RUSTFS_TLS_PATH=/certs \
@@ -205,7 +205,7 @@ docker run -d \
205205

206206
1. 生产环境建议:
207207
- 使用多节点部署架构
208-
- 启用 TLS 加密通信
208+
- [启用 TLS 加密通信](../guide/configured/tls-configured.md)
209209
- 配置日志轮转策略
210210
- 设置定期备份策略
211211

docs/zh/sidebar.ts

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,14 +85,23 @@ export const zhSidebar = [
8585
},
8686
{
8787
text: '安装指南',
88-
link: '/zh/installation/linux',
88+
link: '/zh/installation/index',
8989
items: [
9090
{ text: 'Linux 安装', link: '/zh/installation/linux' },
9191
{ text: 'macOS 安装', link: '/zh/installation/macos/' },
9292
{ text: 'Windows 安装', link: '/zh/installation/windows/' },
9393
{ text: 'Docker 安装', link: '/zh/installation/docker' },
9494
]
9595
},
96+
{
97+
text: '配置指南',
98+
link: '/zh/guide/configured',
99+
collapsed: true,
100+
home: true,
101+
items: [
102+
{ text: 'TLS 配置', link: '/zh/guide/configured/tls-configured' },
103+
]
104+
}
96105
]
97106
},
98107
{
@@ -104,7 +113,7 @@ export const zhSidebar = [
104113
{ text: '对象管理', link: '/zh/guide/bucket/object-upload-and-delete' },
105114
{ text: '访问密钥管理', link: '/zh/guide/access-token' },
106115
{ text: 'mc(MinIO Client) 使用', link: '/zh/guide/mc' },
107-
{ text: 'MCP', link: '/zh/guide/mcp' },
116+
{ text: 'MCP 使用指南', link: '/zh/guide/mcp' },
108117
]
109118
},
110119
{

0 commit comments

Comments
 (0)