render-disks
/render-disks
为 Render 服务挂载并管理持久化磁盘——挂载路径、容量、快照、文件传输及单实例约束。当用户需要持久化存储、文件上传、磁盘上的自建数据库、CMS 媒体存储,或需要理解为何服务无法横向扩展或使用零停机部署时使用。触发词:persistent disk、disk、storage、mount path、sizeGB、SSD、file uploads、snapshots、disk restore、ephemeral filesystem。
- Author
- kael-odin ↗
- Repository
- codex-plugins-zh ↗
- Licence
- MIT
- Last repository change
- 25.10.2026
Assessment and security
- Files in this package
- 3
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 0
No signals detected. Repository changed on 25.10.2026, without references to retired models or APIs.
MIT, open: use and modify while retaining author attribution.
What it does and when to use it
为 Render 服务挂载并管理持久化磁盘——挂载路径、容量、快照、文件传输及单实例约束。当用户需要持久化存储、文件上传、磁盘上的自建数据库、CMS 媒体存储,或需要理解为何服务无法横向扩展或使用零停机部署时使用。触发词:persistent disk、disk、storage、mount path、sizeGB、SSD、file uploads、snapshots、disk restore、ephemeral filesystem。
Original author description
为 Render 服务挂载并管理持久化磁盘——挂载路径、容量、快照、文件传输及单实例约束。当用户需要持久化存储、文件上传、磁盘上的自建数据库、CMS 媒体存储,或需要理解为何服务无法横向扩展或使用零停机部署时使用。触发词:persistent disk、disk、storage、mount path、sizeGB、SSD、file uploads、snapshots、disk restore、ephemeral filesystem。
How it works
- When to Use
- Critical Constraints
- Setup
- Mount Path
- Snapshots
- File Transfers
- Common Patterns
- Common Mistakes
- References
- Related Skills
SKILL.md preview
---
name: render-disks
description: "为 Render 服务挂载并管理持久化磁盘——挂载路径、容量、快照、文件传输及单实例约束。当用户需要持久化存储、文件上传、磁盘上的自建数据库、CMS 媒体存储,或需要理解为何服务无法横向扩展或使用零停机部署时使用。触发词:persistent disk、disk、storage、mount path、sizeGB、SSD、file uploads、snapshots、disk restore、ephemeral filesystem。"
license: MIT
compatibility: Render paid web services, private services, and background workers
metadata:
author: Render
version: "1.0.0"
category: storage
---
# Render Persistent Disks
Persistent disks are high-performance SSDs you attach to a Render service to preserve filesystem changes across deploys and restarts. Without a disk, services have an **ephemeral filesystem**—all local file changes are lost on every deploy.
## When to Use
- Storing **file uploads**, CMS media, or user-generated content
- Running a **self-managed database** (MySQL, MongoDB, ClickHouse) on Render
- Deploying **stateful infrastructure** (Elasticsearch, Kafka, RabbitMQ, Mattermost)
- Understanding **why scaling is blocked** or **zero-downtime deploys are disabled**
- **Restoring data** from an automatic disk snapshot
For managed databases, prefer **Render Postgres** (render-postgres) or **Key Value** (render-keyvalue) over self-managed alternatives on disk.
## Critical Constraints
These constraints affect architecture decisions. Understand them **before** attaching a disk:
| Constraint | Impact |
|------------|--------|
| **Single instance only** | Cannot scale horizontally (`numInstances` must be 1, autoscaling not available) |
| **No zero-downtime deploys** | Old instance stops before new instance starts (brief downtime on each deploy) |
| **Runtime access only** | Disk is not available during `buildCommand` or `preDeployCommand` (those run on separate compute) |
| **Not accessible from other services** | Only the attached service can read/write the disk |
| **Not available on cron jobs** | Attach to a web service, private service, or background worker instead |
| **Not available on one-off jobs** | One-off jobs run on separate compute without disk access |
| **Can increase size, cannot decrease** | Start small and grow as needed |
## Setup
### Dashboard
1. Go to your service's **Disks** page
2. Set the **mount path** (absolute path where persistent data is stored)
3. Choose a **size** in GB
4. Click **Add disk** — triggers a new deploy
### Blueprint
```yaml
services:
- type: web
name: cms
runtime: node
plan: starter
region: oregon
buildCommand: npm ci && npm run build
startCommand: npm start
disk:
name: cms-data
mountPath: /var/data
sizeGB: 10
```
## Mount Path
Only files written **under the mount path** are preserved. Everything else remains ephemeral.
| Runtime | Source code path | Example mount path |
|---------|------------------|--------------------|
| Node.js, Python, Ruby, Elixir, Rust | `/opt/render/project/src` | `/opt/render/project/src/uploads` |
| Go | `/opt/render/project/go/src/github.com/<user>/<repo>` | `.../data` |
| Docker | Dockerfile's `WORKDIR` (commonly `/app`) | `/app/storage` |
### Disallowed mount paths
Cannot mount at: `/`, `/opt`, `/opt/render`, `/opt/render/project`, `/opt/render/project/src`, `/home`, `/home/render`, `/etc`, `/etc/secrets`.
Subdirectories of these paths are fine (e.g. `/opt/render/project/src/uploads`).
## Snapshots
- Render creates an **automatic snapshot every 24 hours**
- Snapshots are available for **at least 7 days**
- Restore from the service's **Disks** page in the Dashboard
- **Full restore only** — you cannot restore individual files
- **Destructive** — all changes after the snapshot are lost
**Do not restore snapshots for custom database recovery.** Use database-native backup tools (mysqldump, mongodump) instead—disk snapshots may capture a corrupted database state.
## File Transfers
### SCP (via SSH)
```bash
# Download from service
scp -s YOUR_SERVICE@ssh.YOUR_REGION.render.com:/mount/path/file ./local-file
# Upload to service
scp -s ./local-file YOUR_SERVICE@ssh.YOUR_REGION.render.com:/mount/path/file
```
Requires SSH access enabled for the service.
### Magic-Wormhole
Available on all native runtimes (install manually on Docker):
```bash
# On the service shell
wormhole send /mount/path/file
# On your local machine
wormhole receive
```
## Common Patterns
| Pattern | Service type | Mount path | Notes |
|---------|-------------|------------|-------|
| WordPress / Ghost / CMS | Web Service | `/var/data` or `/app/content` | Media uploads, SQLite |
| Self-managed MySQL | Private Service | `/var/lib/mysql` | Use mysqldump for backups, not disk snapshots |
| File upload API | Web Service | `/opt/render/project/src/uploads` | Single instance constraint |
| Elasticsearch | Private Service | `/usr/share/elasticsearch/data` | Stateful search infrastructure |
## Common Mistakes
| Mistake | Fix |
|---------|-----|
| Expecting horizontal scaling with a disk | Not possible — disk services are single-instance only |
| Mounting at a disallowed path | Use a subdirectory (e.g. `/opt/render/project/src/uploads` not `/opt/render/project/src`) |
| Reading disk during build or pre-deploy | These run on separate compute — move logic to the start command |
| Restoring disk snapshot for a database | Use database-native backups instead |
| Starting with a large disk size | Start small — you can increase but never decrease |
## References
| Document | Contents |
|----------|----------|
| `references/sizing-and-snapshots.md` | Sizing guidance, snapshot lifecycle, restore procedures, cost patterns |
## Related Skills
- **render-web-services** — Deploy lifecycle, health checks (disk disables zero-downtime)
- **render-private-services** — Internal services with disks (Elasticsearch, MySQL)
- **render-blueprints** — `disk` field reference in `render.yaml`
- **render-postgres** — Managed database alternative (no disk management needed)
Files in this package (3)
- SKILL.md 6 KB
- agents/openai.yaml 1 KB
- references/sizing-and-snapshots.md 2 KB
Versions
| Repository | Score | Licence |
|---|---|---|
| This page · kael-odin/codex-plugins-zh | 100 | MIT |
| render-oss/skills | 100 | MIT |
Database snapshot: 13.11.2026 · package version 56495141fac1 (SHA-256 digest of the entire package)
Downloads in the last 30 days: 3 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 100alibabacloud-ecs-disk-ops
Alibaba Cloud ECS disk and snapshot operations. Use for managing cloud disks (attach, detach, expand, create data disk), snapshots (create, restore, delete, policy), and disk category management. Covers system disk and data disk lifecycle. Triggers: "ecs disk", "cloud disk",… - 100gke-storage-troubleshooting
Diagnoses GKE persistent-storage failures — volume attach/mount errors (Regional PD on optimized VMs, fsGroup mount timeouts), disk-performance and node storage-pressure issues, slow-disk Pod-creation failures, volume-expansion problems, Local SSD / Hyperdisk Storage Pool… - 100huawei-cloud-evs-disk-create
Skill specialized for creating EVS disks on Huawei Cloud. Use this skill when users need to create cloud disks (EVS), set disk types, configure disk size, select availability zones, or need guidance on the disk creation process. Trigger conditions: "创建云硬盘", "华为云EVS", "创建磁盘",… - 100render-scaling
为 Render 服务扩缩容——配置自动扩缩目标、选择实例规格、设置手动实例数并优化成本。当用户需要承接更多流量、设置自动扩缩、挑选合适的实例规格、降低成本,或排查诸如缩容缓慢、实例卡住等扩缩行为时使用。 - 100linux-disk-storage
Use when diagnosing disk or inode pressure, performing measured cleanup, managing local storage or swap, or mounting NFS and CIFS shares; use linux-filesystem-snapshots for point-in-time snapshots. - 85documentdb-storage
Storage configuration guidance for Azure DocumentDB — when and how to use Premium SSD v2 high-performance storage, IOPS/bandwidth caps that are gated by compute tier (not disk size), Premium SSD v2 limitations (no CMK, migration paths, disk-hydration sequencing), and storage…