2017年12月

更新:
20180208 FileManager 已经更名为 Filebrowser,相应的命令也修改了。

curl -fsSL https://filebrowser.github.io/get.sh | bash
或
wget -qO- https://filebrowser.github.io/get.sh | bash

使用

filebrowser --port 80 --database /etc/fm.db --scope /data

仅适用于 KVM 的 VPS,系统推荐 Debian 和 Ubuntu 新版本。

安装 Docker

apt install curl -y
curl -fsSL get.docker.com -o get-docker.sh && sh get-docker.sh

安装 NextCloud

docker pull wonderfall/nextcloud
docker run -d --name nextcloud -v /data/nextcloud:/data -p 8888:8888 wonderfall/nextcloud

上面这四行命令执行完直接访问你的 IP:8888 就可以用了。

安装 Caddy 实现 https 访问

curl https://getcaddy.com | bash -s personal
vi Caddyfile

配置文件如下

your domain {
    proxy / 0.0.0.0:8888 {
        transparent
    }
    gzip
}

执行

caddy &

刷新文件

不是用 NextCloud 上传的文件需要刷新命令才能显示。

chown -R 991:991 /data/nextcloud    
docker exec -ti nextcloud occ files:scan --all