# Self-host Cloudreve

> A self-hosted file management and sharing system with multiple storage backends.

- Page: https://levelrail.com/templates/cloudreve/
- JSON: https://levelrail.com/templates/cloudreve.json
- Category: Storage
- Licence: GPL-3.0 (Copyleft license)
- Source: https://github.com/cloudreve/cloudreve
- Upstream docs: https://docs.cloudreve.org/

## Requirements
- Memory: about 512 MiB
- amd64: published, arm64: published
- Needs configuration before start: no
- Pinned image tag: 4.10.1

## Services

| Service | Image | Tag | Ports | Volumes |
| --- | --- | --- | --- | --- |
| cloudreve | cloudreve/cloudreve | 4.10.1 | 5212 | cloudreve_data -> /cloudreve/data |
| postgres | postgres | 16-alpine | none | postgres_data -> /var/lib/postgresql/data |
| redis | redis | 7-alpine | none | redis_data -> /data |

## Environment

| Service | Variable | Kind |
| --- | --- | --- |
| cloudreve | CR_CONF_Database.Host | preset |
| cloudreve | CR_CONF_Database.Name | preset |
| cloudreve | CR_CONF_Database.Password | generated |
| cloudreve | CR_CONF_Database.Port | preset |
| cloudreve | CR_CONF_Database.Type | preset |
| cloudreve | CR_CONF_Database.User | preset |
| cloudreve | CR_CONF_Redis.Password | generated |
| cloudreve | CR_CONF_Redis.Server | preset |
| postgres | POSTGRES_DB | preset |
| postgres | POSTGRES_PASSWORD | generated |
| postgres | POSTGRES_USER | preset |
| redis | REDIS_PASSWORD | generated |

## Deploy

### CLI

```bash
levelrail-cli templates deploy cloudreve --name my-cloudreve
```

### API

```bash
curl -X POST -H "Authorization: Bearer $TOKEN" \
  https://levelrail.example.com/api/v1/service-templates/cloudreve/deploy
```

Create a token in the dashboard first. This one-click route deploys it as a trial app you can keep or remove.

## Questions

### Can I deploy Cloudreve on Dokploy or Dokku?

The services and pinned images on this page can be run on any Docker host. The public Dokploy templates list has an entry with the id cloudreve for this app, so check that entry as well. Dokku deploys container images with its own commands, so the pinned image cloudreve/cloudreve:4.10.1, postgres:16-alpine, redis:7-alpine is what you deploy there.

Self-host Cloudreve, Cloudreve docker compose file, deploy Cloudreve on a VPS: this page lists the pinned image, ports, volumes and the commands for each.
