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 Compose Files

Clone the Docker Compose repository to your server:

bash
git clone https://github.com/cloudreve/docker-compose.git ~/cloudreve
cd ~/cloudreve

Copy the example environment file:

bash
cp .env.example .env

The repository contains the following compose files:

FileDescription
docker-compose.ymlBase stack: Cloudreve + PostgreSQL + Redis
docker-compose.pro.ymlPro edition override: switches to Pro image and adds license key
docker-compose.fts.ymlFull-text search addon: adds Apache Tika and Meilisearch, see Full-text Search

Start

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

bash
docker compose up -d

Next Steps

Cloudreve will listen on port 5212 by default. You can access Cloudreve by visiting http://localhost:5212 in your browser. Please register an account; the first registered account will be set as the administrator.

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.