其他技术 ---- Cloudreve 个人公,私有网盘搭建
Cloudreve 个人公,私有网盘搭建
环境
Golang
version = 1.13
yum install golang
MySQL version >= 5.7
安装
安装之前需要有
下载安装文件
Releases · cloudreve/Cloudreve (github.com)
去上面下载地址下载对应版本,这里我选择的是
解压安装文件
#解压获取到的主程序
tar -zxvf cloudreve_VERSION_OS_ARCH.tar.gz
# 赋予执行权限
chmod +x ./cloudreve
添加配置文件
创建一个conf.ini
的配置文件
nano /home/cloud/config.conf
编写配置文件
- 使用
MySQL
[Database]
; 数据库类型,目前支持 sqlite/mysql/mssql/postgres
Type = mysql
; MySQL 端口
Port = 3306
; 用户名
User = root
; 密码
Password = root
; 数据库地址
Host = 127.0.0.1
; 数据库名称
Name = v3
; 数据表前缀
TablePrefix = cd
; 字符集
Charset = utf8
- 使用
redis
[Redis]
Server = 127.0.0.1:6379
Password = your password
DB = 0
- 启用
https
[SSL]
Listen = :443
CertPath = /home/fullchain.pem
KeyPath = /home/privkey.pem
首次启动
使用
cloudreve -c /home/cloud/config.conf
此时会有一个初始的管理员账号密码,最好记录下来。
开放
登录后第一次最好修改管理员密码。
配置开机自启动
- 创建工作目录
mkdir /home/cloud
- 编辑
/usr/lib/systemd/system/cloudreve.service
[Unit]
Description=Cloudreve
Documentation=https://docs.cloudreve.org
After=network.target
Wants=network.target
[Service]
# cloudreve 文件的存放路径,跟上面的一样,请根据自己的情况设置,默认储存策略的文件会储存在其中
WorkingDirectory=/home/cloudreve
# 如果你是mysql,请使用这个
ExecStart=/home/cloud/cloudreve -c /home/cloud/config.conf
Restart=on-abnormal
RestartSec=5s
KillMode=mixed
StandardOutput=null
StandardError=syslog
[Install]
WantedBy=multi-user.target
- 更新
systemctl
systemctl daemon-reload
# 更新配置
systemctl daemon-reload
# 启动服务
systemctl start cloudreve
# 设置开机启动
systemctl enable cloudreve
# 取消开机启动
systemctl disable cloudreve
#查看cloudreve的运行状态
systemctl status cloudreve
安装离线下载Aria2
wget -N --no-check-certificate https://www.lkxin.cn/Aria2/aria2.sh && chmod +x aria2.sh && bash aria2.sh
配置离线下载
进入管理面板
配置
授权令牌需要查看/usr/local/caddy/www/aria2/Download
最后记得测试aria2通信
以上安装就完成了
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 阿里最新开源QwQ-32B,效果媲美deepseek-r1满血版,部署成本又又又降低了!
· AI编程工具终极对决:字节Trae VS Cursor,谁才是开发者新宠?
· 开源Multi-agent AI智能体框架aevatar.ai,欢迎大家贡献代码
· Manus重磅发布:全球首款通用AI代理技术深度解析与实战指南
· 被坑几百块钱后,我竟然真的恢复了删除的微信聊天记录!