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:
git clone https://github.com/cloudreve/docker-compose.git ~/cloudreve
cd ~/cloudreveCopy the example environment file:
cp .env.example .envThe repository contains the following compose files:
| File | Description |
|---|---|
docker-compose.yml | Base stack: Cloudreve + PostgreSQL + Redis |
docker-compose.pro.yml | Pro edition override: switches to Pro image and adds license key |
docker-compose.fts.yml | Full-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:
docker compose up -dNext 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:
docker logs -f container_IDCloudreve 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?
# Shut down the currently running containers
docker compose down
# Update the Cloudreve image
docker compose pull
# Start new containers
docker compose up -dYou also need to refer to the Upgrade Cloudreve page to complete the subsequent process.