---
title: "Deploy cloudreve"
description: "Cloudreve 4.19: self-hosted cloud drive with sharing, WebDAV and previews."
category: "Storage"
url: https://railway.com/deploy/cloudreve-3
---

# Deploy cloudreve

Cloudreve 4.19: self-hosted cloud drive with sharing, WebDAV and previews.

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

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

- **Creator:** Agaz Self-Host
- **Category:** Storage

## Template content

### cloudreve https://raw.githubusercontent.com/cloudreve/frontend/19da0fe1ecd40971fafa813983d769fdce41573c/public/static/img/logo512.png

- **Image:** cloudreve/cloudreve:4.19.1
- **Start command:** `sh -c 'printf "%s\n" "$CLOUDREVE_SEED" > /tmp/seed.py; supervisord -c /cloudreve/aria2.supervisor.conf; ./cloudreve & pid=$!; trap "kill -TERM $pid; wait $pid; exit 0" TERM INT; python3 /tmp/seed.py & wait $pid'`
- **Health check:** /api/v4/site/ping
- **Public domain:** Yes

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

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

## Documentation

# Deploy and Host Cloudreve on Railway

Cloudreve is a self-hosted cloud drive. It gives users a web file manager with uploads, sharing links, WebDAV, previews for images, video, audio, documents and code, offline downloads through aria2, and storage policies that can keep files locally or in S3, OneDrive and other backends.

## About Hosting Cloudreve

This template runs the official `cloudreve/cloudreve:4.19.1` image with a Railway Postgres database. On first boot a small script registers the admin account from `CLOUDREVE_ADMIN_EMAIL` and a generated `CLOUDREVE_ADMIN_PASSWORD`, then turns public sign-up off, so nobody else can claim the instance. Files use the local storage policy on a Railway volume at `/cloudreve/data`, which also holds the config. Thumbnails use the bundled ffmpeg, vips and LibreOffice. It fits the Hobby plan for light use; size the volume for your files. Cloudreve logs its database settings at start, including the password, so keep deploy logs private.

## Common Use Cases

- A private Google Drive or Dropbox replacement
- Sharing files with expiring links and passwords
- Mounting cloud storage over WebDAV on desktops and phones

## Dependencies for Cloudreve Hosting

- `cloudreve/cloudreve:4.19.1` (official image)
- Railway Postgres
- A Railway volume at `/cloudreve/data`

### Deployment Dependencies

- [Cloudreve documentation](https://docs.cloudreve.org/)
- [Cloudreve 4.19.1 release](https://github.com/cloudreve/cloudreve/releases/tag/4.19.1)
- [Railway volumes](https://docs.railway.com/reference/volumes)

### Implementation Details

| Service | Source | Networking | Storage |
| --- | --- | --- | --- |
| cloudreve | `cloudreve/cloudreve:4.19.1` | public domain on 5212 | volume at `/cloudreve/data` |
| Postgres | Railway Postgres | private | Railway volume |

| Variable | Default | Purpose |
| --- | --- | --- |
| `CLOUDREVE_ADMIN_EMAIL` | `admin@example.com` | First admin account |
| `CLOUDREVE_ADMIN_PASSWORD` | generated | Its password |
| `CLOUDREVE_URL` | `https://` | Site URL set on first boot |
| `CR_CONF_Database__*` | Postgres references | Database connection |

Notes:

- Sign-up is closed after the admin is created; re-enable it in Admin → Settings → User if you want public accounts.
- The seed only runs while no account exists; later changes to the admin variables have no effect.

This is a community-maintained deployment package and does not imply affiliation with or endorsement by the Cloudreve project.

## 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, 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-3
