Chrome disables disk cache for untrusted HTTPS certs — and Unraid ships with one. A 5-minute mkcert fix makes the GUI feel instant.
The Hidden Performance Tax
The Fix: mkcert
Setup (One-Time)
Bash
# macOS
brew install mkcert
mkcert -install # adds local CA to System keychain
# Linux
sudo apt install mkcert # or use go install
mkcert -install
# Windows
choco install mkcert
mkcert -install
Generate & Deploy
Bash
# Generate cert for all your Unraid access methods
# Replace with your server's IP, hostname, domain, Tailscale IP, etc.
mkcert -cert-file /tmp/unraid.pem -key-file /tmp/unraid-key.pem \
"unraid.example.com" "192.168.1.100" "Tower.local"
# Unraid expects a PEM bundle (cert + key concatenated)
# Filename must be {ServerName}_unraid_bundle.pem
cat /tmp/unraid.pem /tmp/unraid-key.pem > /tmp/Tower_unraid_bundle.pem
# Backup the original cert, then deploy
ssh your-unraid "cp /boot/config/ssl/certs/Tower_unraid_bundle.pem \
/boot/config/ssl/certs/Tower_unraid_bundle.pem.bak"
scp /tmp/Tower_unraid_bundle.pem \
your-unraid:/boot/config/ssl/certs/Tower_unraid_bundle.pem
# Reload nginx — no reboot needed
ssh your-unraid "nginx -t && nginx -s reload"
Important: Replace Tower with your actual Unraid server name (Settings → Identification). The cert bundle filename must match the pattern {ServerName}_unraid_bundle.pem.
Verify
Bash
# Check the cert chain
echo | openssl s_client -connect 192.168.1.100:443 \
-CAfile "$(mkcert -CAROOT)/rootCA.pem" 2>&1 | grep "Verify return"
# Expected: Verify return code: 0 (ok)
- ✅ "Certificate is valid" in the site info popup
- ✅ (disk cache) entries in the Network tab on second load
Before & After
| Self-signed cert | mkcert cert | |
|---|---|---|
| Chrome trust | ❌ "Not Secure" | ✅ "Certificate is valid" |
| Disk cache | ❌ Disabled | ✅ Enabled |
| Page reload | Re-downloads everything | Instant (cached assets) |
| Dashboard feel | Sluggish | Snappy |
Gotchas
Renewal
When to Use Something Else
Let AI Do It
Bash
I want to set up mkcert SSL for my Unraid server to fix Chrome's disk cache issue.
Reference: https://mjshao.fun/blog/mkcert-unraid-ssl
My setup:
- Unraid IP: [ask me]
- Server name: [ask me]
- SSH alias/config: [ask me]
- Extra SANs (domain, Tailscale IP, etc.): [ask me]
Steps:
1. Install mkcert if not present (brew/apt/choco based on my OS)
2. Run mkcert -install if local CA not yet trusted
3. Generate cert with all my SANs
4. Create PEM bundle in {ServerName}_unraid_bundle.pem format
5. Backup existing cert on Unraid, deploy new one via scp
6. Reload nginx on Unraid, verify with openssl s_client
7. Remind me to fully restart Chrome (Cmd+Q / full exit)
Chrome 对不受信任的 HTTPS 证书会悄悄禁用磁盘缓存——而 Unraid 自带的就是这种证书。用 mkcert 花 5 分钟搞定,GUI 立马飞起。
隐藏的性能税
方案:mkcert
初始设置(一次性)
Bash
# macOS
brew install mkcert
mkcert -install # 把本地 CA 加到系统钥匙串
# Linux
sudo apt install mkcert # 或者 go install
mkcert -install
# Windows
choco install mkcert
mkcert -install
生成并部署
Bash
# 生成覆盖所有访问方式的证书
# 把下面替换成你的服务器 IP、主机名、域名等
mkcert -cert-file /tmp/unraid.pem -key-file /tmp/unraid-key.pem \
"unraid.example.com" "192.168.1.100" "Tower.local"
# Unraid 需要 PEM bundle 格式(证书+密钥拼在一起)
# 文件名必须是 {服务器名}_unraid_bundle.pem
cat /tmp/unraid.pem /tmp/unraid-key.pem > /tmp/Tower_unraid_bundle.pem
# 备份原证书,然后部署
ssh your-unraid "cp /boot/config/ssl/certs/Tower_unraid_bundle.pem \
/boot/config/ssl/certs/Tower_unraid_bundle.pem.bak"
scp /tmp/Tower_unraid_bundle.pem \
your-unraid:/boot/config/ssl/certs/Tower_unraid_bundle.pem
# 重新加载 nginx —— 不需要重启
ssh your-unraid "nginx -t && nginx -s reload"
注意:把 Tower 换成你的 Unraid 服务器名(Settings → Identification)。证书文件名必须是 {服务器名}_unraid_bundle.pem 格式。
验证
Bash
# 检查证书链
echo | openssl s_client -connect 192.168.1.100:443 \
-CAfile "$(mkcert -CAROOT)/rootCA.pem" 2>&1 | grep "Verify return"
# 期望输出: Verify return code: 0 (ok)
- ✅ 站点信息显示"证书有效"
- ✅ Network 标签里能看到 (disk cache)
对比
| 自签名证书 | mkcert 证书 | |
|---|---|---|
| Chrome 信任 | ❌ "不安全" | ✅ "证书有效" |
| 磁盘缓存 | ❌ 禁用 | ✅ 启用 |
| 页面刷新 | 全部重新下载 | 秒开(缓存命中) |
| Dashboard 体感 | 卡顿 | 丝滑 |
踩坑
续期
什么时候用别的方案
让 AI 帮你搞定
Markdown
帮我给 Unraid 服务器配置 mkcert SSL 证书,解决 Chrome 磁盘缓存被禁用的问题。
参考:https://mjshao.fun/blog/mkcert-unraid-ssl
我的环境:
- Unraid IP:[问我]
- 服务器名:[问我]
- SSH 连接方式:[问我]
- 其他 SAN(域名、Tailscale IP 等):[问我]
执行步骤:
1. 检查并安装 mkcert(brew/apt/choco,根据我的系统)
2. 如果本地 CA 还没信任,执行 mkcert -install
3. 生成包含所有 SAN 的证书
4. 创建 PEM bundle,文件名格式 {服务器名}_unraid_bundle.pem
5. 备份 Unraid 上的原证书,scp 部署新证书
6. 在 Unraid 上 reload nginx,用 openssl s_client 验证
7. 提醒我完全重启 Chrome(Cmd+Q / 彻底退出)