cloudreve私有云盘配置后台运行

    科技2025-03-04  40

    第一、在/usr/lib/systemd/system目录下创建一个服务cloudreve.service

    通过vi打开服务配置:

    vi /usr/lib/systemd/system/cloudreve.service

    输入如下内容:

    [Unit] Description=Cloudreve Documentation=https://docs.cloudreve.org After=network.target Wants=network.target [Service] Type=simple WorkingDirectory=/home/software/cloudreve ExecStart=/home/software/cloudreve/cloudreve Restart=on-abnormal RestartSec=5s KillMode=mixed StandardOutput=null StandardError=syslog [Install] WantedBy=multi-user.target

    2、更新重启服务

    # 更新配置 systemctl daemon-reload # 启动服务 systemctl start cloudreve # 设置开机启动 systemctl enable cloudreve

    管理命令

    # 启动服务 systemctl start cloudreve # 停止服务 systemctl stop cloudreve # 重启服务 systemctl restart cloudreve # 查看状态 systemctl status cloudreve
    Processed: 0.010, SQL: 8