What Cloudreve is for

Cloudreve is an open-source personal cloud drive platform with support for multiple storage backends. It can be used to set up a private or team-based file sync service quickly, making it easier to handle cross-platform file synchronization, file sharing, offline downloads, and collaborative work across different devices.

Deploying it with Docker Compose

Start by creating a working directory for the project:

mkdir -p cloudreve && cd cloudreve

Next, prepare the required folders and files:

mkdir -vp cloudreve/{uploads,avatar} \
&& touch cloudreve/conf.ini \
&& touch cloudreve/cloudreve.db \
&& mkdir -p aria2/config \
&& mkdir -p data/aria2 \
&& chmod -R 777 data/aria2

After that, create a docker-compose.yml file with the following configuration:

services:
  cloudreve:
    container_name: cloudreve
    image: cloudreve/cloudreve:latest
    restart: unless-stopped
    ports:
      - "5212:5212"      # 映射访问端口
    volumes:
      - temp_data:/data
      - ./cloudreve/uploads:/cloudreve/uploads
      - ./cloudreve/conf.ini:/cloudreve/conf.ini
      - ./cloudreve/cloudreve.db:/cloudreve/cloudreve.db
      - ./cloudreve/avatar:/cloudreve/avatar
    depends_on:
      - aria2
  aria2:
    container_name: aria2
    image: p3terx/aria2-pro
    restart: unless-stopped
    environment:
      - RPC_SECRET=aria_rpc_token-kmcxadiikjcxCCAA7890    # 随意设置个强密码
      - RPC_PORT=6800
    volumes:
      - ./aria2/config:/config
      - temp_data:/data
volumes:
  temp_data:
    driver: local
    driver_opts:
      type: none
      device: $PWD/data
      o: bind

This setup runs two services:

  • cloudreve as the main application
  • aria2 for offline download support

Cloudreve is exposed on port 5212, and both containers share the same bound data volume so downloaded files can be handled correctly.

Starting the containers

Bring the stack up in detached mode:

docker compose up -d

Once the containers are running, check the Cloudreve logs to find the default administrator account information:

docker logs cloudreve

Access from the public internet

After the basic setup is complete, you can place port 5212 behind a reverse proxy and enable HTTPS for secure external access. If needed, this can be done with a web server or reverse proxy such as Caddy.