secubox-openwrt/package/secubox/secubox-app-nextcloud/README.zh.md
CyberMind-FR ccfb58124c docs: Add trilingual documentation (French and Chinese translations)
Add complete French (fr) and Chinese (zh) translations for all documentation:

- Root files: README, CHANGELOG, SECURITY, BETA-RELEASE
- docs/: All 16 core documentation files
- DOCS/: All 19 deep-dive documents including embedded/ and archive/
- package/secubox/: All 123+ package READMEs
- Misc: secubox-tools/, scripts/, EXAMPLES/, config-backups/, streamlit-apps/

Total: 346 translation files created

Each file includes language switcher links for easy navigation between
English, French, and Chinese versions.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-20 10:00:18 +01:00

3.7 KiB
Raw Blame History

SecuBox Nextcloud

Languages: English | Francais | 中文

在 OpenWrt 上的 Debian LXC 容器中运行的自托管文件同步和协作平台。包含 MariaDB 数据库、Redis 缓存和 Nginx Web 服务器。

安装

opkg install secubox-app-nextcloud luci-app-nextcloud

快速开始

# 安装 Nextcloud创建 LXC 容器)
nextcloudctl install

# 启动服务
/etc/init.d/nextcloud start

# 访问 Web 界面
# http://router-ip:8080

配置

UCI 配置文件:/etc/config/nextcloud

uci set nextcloud.main.enabled='1'
uci set nextcloud.main.domain='cloud.example.com'
uci set nextcloud.main.http_port='8080'
uci set nextcloud.main.admin_user='admin'
uci set nextcloud.main.memory_limit='1G'
uci set nextcloud.main.upload_max='512M'
uci commit nextcloud

CLI 命令

nextcloudctl install          # 创建 Debian LXC安装 Nextcloud 堆栈
nextcloudctl uninstall        # 删除容器(保留数据)
nextcloudctl update           # 更新 Nextcloud 到最新版本
nextcloudctl start            # 启动 Nextcloud 服务
nextcloudctl stop             # 停止 Nextcloud 服务
nextcloudctl restart          # 重启 Nextcloud 服务
nextcloudctl status           # 显示服务状态JSON
nextcloudctl logs [-f]        # 显示容器日志
nextcloudctl shell            # 在容器中打开 shell

nextcloudctl occ <cmd>        # 运行 Nextcloud OCC 命令
nextcloudctl backup [name]    # 创建数据和数据库备份
nextcloudctl restore <name>   # 从备份恢复
nextcloudctl list-backups     # 列出可用备份

nextcloudctl ssl-enable <domain>  # 使用 HAProxy 注册 SSL
nextcloudctl ssl-disable          # 移除 HAProxy 注册

架构

+---------------------------------------------------------+
|                     OpenWrt 主机                          |
|  +---------------------------------------------------+  |
|  |              LXC: nextcloud (Debian 12)           |  |
|  |  +---------+  +---------+  +---------+  +-------+ |  |
|  |  | Nginx   |  |Nextcloud|  | MariaDB |  | Redis | |  |
|  |  | :8080   |->| PHP-FPM |->| :3306   |  | :6379 | |  |
|  |  +---------+  +---------+  +---------+  +-------+ |  |
|  |                    |                              |  |
|  |         /srv/nextcloud (bind 挂载)                 |  |
|  +---------------------------------------------------+  |
|                          |                               |
|  +---------------------------------------------------+  |
|  |           HAProxy可选 SSL 终止)                   |  |
|  |      cloud.example.com:443 -> nextcloud:8080      |  |
|  +---------------------------------------------------+  |
+---------------------------------------------------------+

功能特性

  • 通过 Web、桌面和移动客户端进行文件同步和共享
  • 日历和联系人CalDAV/CardDAV
  • 协作文档编辑
  • 端到端加密支持
  • 带有 PHP 8.2 的 Debian LXC 容器
  • 带有优化设置的 MariaDB 数据库
  • Redis 缓存以提高性能
  • 针对 Nextcloud 优化的 Nginx 配置
  • HAProxy 集成实现 SSL/HTTPS
  • 自动备份和恢复
  • 通过 cgroups 进行内存限制
  • 开机自动启动

数据位置

/srv/nextcloud/
├── data/           # Nextcloud 用户数据
├── config/         # Nextcloud config.php
└── backups/        # 自动备份

使用 HAProxy 的 SSL

# 通过 HAProxy 和 Let's Encrypt 启用 HTTPS
nextcloudctl ssl-enable cloud.example.com

# 通过 HTTPS 访问
https://cloud.example.com

依赖

  • lxc - 容器运行时
  • lxc-common - LXC 工具
  • tar, wget-ssl, unzip, xz - 归档工具
  • jsonfilter - JSON 解析
  • openssl-util - SSL 工具

许可证

Apache-2.0