https://github.com/cloudreve/Cloudreve/releases
https://docs.cloudreve.org/getting-started/install
https://blog.zephyrxt.net/?post=381
下载适用于您目标机器操作系统、CPU架构的主程序,直接运行即可。
解压程序包 tar -zxvf cloudreve_VERSION_OS_ARCH.tar.gz
赋予执行权限 chmod +x ./cloudreve
启动 Cloudreve ./cloudreve
进程守护
以下两种方式可任选其一。
Systemd
编辑配置文件
vim /usr/lib/systemd/system/cloudreve.service
[Unit]
Description=Cloudreve
Documentation=https://docs.cloudreve.org
After=network.target
After=mysqld.service
Wants=network.target
[Service]
WorkingDirectory=/root/cloud
ExecStart=/root/cloud/cloudreve
Restart=on-abnormal
RestartSec=5s
KillMode=mixed
StandardOutput=null
StandardError=syslog
[Install]
WantedBy=multi-user.target
更新配置
systemctl daemon-reload
启动服务
systemctl start cloudreve
设置开机启动
systemctl enable cloudreve
启动服务
systemctl start cloudreve
停止服务
systemctl stop cloudreve
重启服务
systemctl restart cloudreve
查看状态
systemctl status cloudreve
配置https conf.ini
[System]
Mode = master
Listen = :8880
SessionSecret = ???
HashIDSalt = ???
[SSL]
; SSL 监听端口
Listen = :8443
; 证书路径
CertPath = /root/key/fullchain.cer
; 私钥路径
KeyPath = /root/key/zephyrimg.com.key
acme.sh --installcert -d zephyrimg.com -d *.zephyrimg.com \
--ca-file /root/key/ca.cer \
--cert-file /root/key/zephyrimg.com.cer \
--key-file /root/key/zephyrimg.com.key \
--fullchain-file /root/key/fullchain.cer \
--reloadcmd "systemctl restart cloudreve"