---
title: "Deploy Cloudreve"
description: "A powerful self-hosted file manager for multi-cloud storage and sharing."
category: "Storage"
url: https://railway.com/deploy/cloudreve-2
---

# Deploy Cloudreve

A powerful self-hosted file manager for multi-cloud storage and sharing.

**[Deploy Cloudreve on Railway](https://railway.com/template/cloudreve-2)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/cloudreve-2/manifest.json

- **Creator:** INF Labs
- **Category:** Storage

## Template content

### Postgres https://devicons.railway.app/i/postgresql.svg

- **Image:** ghcr.io/railwayapp-templates/postgres-ssl:18

### Cloudreve https://raw.githubusercontent.com/cloudreve/frontend/master/public/static/img/logo192.png

- **Image:** cloudreve/cloudreve:v4
- **Public domain:** Yes

### Redis https://cdn.sanity.io/images/sy1jschh/production/0ce0bfdcfbdbf69662b1116671f97c2dd788b655-157x157.svg

- **Image:** redis:8.2
- **Start command:** `/bin/sh -c "rm -rf $RAILWAY_VOLUME_MOUNT_PATH/lost+found/ && exec docker-entrypoint.sh redis-server --requirepass $REDIS_PASSWORD --save 60 1 --dir $RAILWAY_VOLUME_MOUNT_PATH"`

## Documentation

# Deploy and Host Cloudreve on Railway

Cloudreve is a self-hosted file management and multi-cloud storage platform that provides a modern web interface for uploading, organizing, sharing, and managing files across local and external storage providers.

This Railway template deploys Cloudreve with PostgreSQL and Redis for a more production-ready setup.

## About Hosting Cloudreve

This template deploys Cloudreve using the official `cloudreve/cloudreve:v4` container image.

Cloudreve provides a full web-based user interface and API through port `5212`. PostgreSQL is used as the primary database, while Redis provides cache and supporting runtime functionality.

A persistent Railway volume is mounted at `/cloudreve/data` to preserve Cloudreve application data across deployments and restarts.

Only the Cloudreve service is exposed publicly. PostgreSQL and Redis remain accessible through Railway's private network.

After deployment, open the generated Railway domain and register your first Cloudreve account. The first registered user becomes the administrator.

> ⚠️ **Important:** Register the first account immediately after deployment. The first registered account receives administrator privileges.

## Common Use Cases

* Self-hosted file management and private cloud storage
* File upload, download, organization, and sharing
* Multi-user file hosting
* Personal or team cloud drive
* Managing multiple storage providers through one interface
* Creating public or private file-sharing links
* Using S3-compatible or external object storage
* Building a self-hosted alternative to traditional cloud-drive platforms

## Dependencies for Cloudreve Hosting

* **Cloudreve** — Main web application, API, and file management interface
* **PostgreSQL** — Persistent relational database
* **Redis** — Cache and supporting runtime services
* **Railway Volume** — Persistent Cloudreve application storage mounted at `/cloudreve/data`

## Deployment Architecture

```text
                         Internet
                            │
                            │ HTTPS
                            ▼
                  ┌──────────────────┐
                  │    Cloudreve     │
                  │                  │
                  │   Web UI + API   │
                  │     :5212        │
                  └────────┬─────────┘
                           │
                 Railway Private Network
                           │
              ┌────────────┴────────────┐
              ▼                         ▼
      ┌───────────────┐         ┌───────────────┐
      │  PostgreSQL   │         │     Redis     │
      │     :5432     │         │     :6379     │
      └───────────────┘         └───────────────┘

Cloudreve Persistent Volume
/cloudreve/data
```

## Service Configuration

| Service    | Public Access |   Port | Persistent Storage |
| ---------- | ------------: | -----: | ------------------ |
| Cloudreve  |        ✅ HTTP | `5212` | `/cloudreve/data`  |
| PostgreSQL |     ❌ Private | `5432` | Railway managed    |
| Redis      |     ❌ Private | `6379` | Railway managed    |

Cloudreve communicates with PostgreSQL and Redis over Railway's private network, keeping database services isolated from the public internet.

## Persistent Storage

Cloudreve uses the following Railway volume mount:

```text
/cloudreve/data
```

This volume preserves application data that should survive container restarts and redeployments.

Because Railway supports one persistent volume per service, the volume is attached directly to the Cloudreve service.

## First Login and Administrator Account

Cloudreve does not require a predefined administrator username or password through Railway environment variables.

After the deployment finishes:

1. Open the generated Railway public domain.
2. Register a new Cloudreve account.
3. The first registered account becomes the administrator.
4. Access the administration interface at:

```text
https://your-cloudreve-domain/admin
```

For security, complete the initial registration shortly after deployment.

## Storage Providers

Cloudreve can act as a unified file-management layer for different storage backends.

Depending on your Cloudreve configuration, storage options can include:

* Local persistent storage
* S3-compatible object storage
* OneDrive
* Aliyun OSS
* Tencent COS
* Other Cloudreve-supported storage providers

The default Railway template keeps the infrastructure minimal and does not require an external object-storage service during initial deployment.

Additional storage providers can be configured later from Cloudreve.

## Railway Bucket

A Railway Bucket is not required for the base template.

Cloudreve already supports configurable storage policies, including S3-compatible storage. Users who need object storage can connect a compatible provider after the initial Cloudreve deployment.

Keeping object storage optional makes the default template simpler and easier to deploy.

## Cloudreve vs Alternatives

| Feature                              | Cloudreve | Nextcloud | File Browser | MinIO |
| ------------------------------------ | --------: | --------: | -----------: | ----: |
| Web file manager                     |         ✅ |         ✅ |            ✅ |     ✅ |
| Multi-user support                   |         ✅ |         ✅ |            ✅ |     ✅ |
| File sharing                         |         ✅ |         ✅ |            ✅ |     ✅ |
| Multi-storage backend                |         ✅ |         ✅ |            ❌ |     ❌ |
| S3-compatible storage integration    |         ✅ |         ✅ |            ❌ |     ✅ |
| Lightweight deployment               |         ✅ |         ❌ |            ✅ |     ✅ |
| Full collaboration suite             |         ❌ |         ✅ |            ❌ |     ❌ |
| Designed primarily as object storage |         ❌ |         ❌ |            ❌ |     ✅ |
| Modern self-hosted cloud-drive UI    |         ✅ |         ✅ |            ✅ |    ⚠️ |

Cloudreve is particularly suitable when you want a relatively lightweight self-hosted cloud-drive interface with support for multiple storage backends without deploying a larger collaboration suite.

## Why Deploy Cloudreve on Railway?

Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.

By deploying Cloudreve on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, storage services, and more on Railway.


## Similar templates

- [Garage S3 Storage](https://railway.com/deploy/garage-s3-storage) — Ultra-light S3 server: fast, open-source, plug-and-play.
- [Redis](https://railway.com/deploy/redis-1) — Self Host Latest Redis with Railway
- [EasyImg](https://railway.com/deploy/easyimg) — Simple self-hostable Nuxt.js personal image hosting system.

Open this page in a browser: https://railway.com/deploy/cloudreve-2
