Skip to content

Deploy with Docker Compose

Using Docker Compose you can deploy multiple containers to support Cloudreve's operation, including database and Redis.

Prerequisites

Please refer to the Docker Compose installation documentation to install Docker and Docker Compose.

Prepare docker-compose.yml File

Create a directory to store the Docker Compose file, for example:

bash
mkdir -p ~/cloudreve
cd ~/cloudreve

Save the obtained docker-compose.yml file to this directory.

Save the docker-compose.yml file from the GitHub repository to your server.

Start

Run the following command in the directory where the docker-compose.yml file is located:

bash
docker compose up -d

Next Steps

At this point, Cloudreve has started successfully and is listening on port 5212. Please continue to the Next Steps page to complete your deployment.

Common Issues

Container keeps restarting?

First, find the restarting container, then check the logs:

bash
docker logs -f container_ID
Cloudreve reports Please specify license key by ...

Please check whether you have correctly set the CR_LICENSE_KEY environment variable before starting. Its value should be the authorization key obtained from the Pro license management panel.

How to upgrade Cloudreve?
bash
# Shut down the currently running containers
docker compose down

# Update the Cloudreve image
docker compose pull

# Start new containers
docker compose up -d

You also need to refer to the Upgrade Cloudreve page to complete the subsequent process.