Persistent Volumes on Raseef: Keep Uploads Across Deploys
Configure persistent storage for app uploads, verify files across restarts and deploys, and understand single-replica rollout, backup and rollback limits.
Will uploaded files survive the next deployment?
If your SaaS accepts invoices, attachments or profile pictures, a successful upload is only half the job. The file must still exist after the application container is replaced. On Raseef, a persistent volume keeps files across restarts and deployments, provided your application writes inside its mount path. A volume is not a backup, and it changes how your service rolls out.
This guide is for developers deciding where to store application-generated files. Platform behavior below was checked against Raseef’s official documentation on 19 November 2026. The exercise is a reproducible acceptance procedure, not a claim that we ran a customer workload or measured production durability.
Choose what actually needs persistence
Keep application code and build output in the image. Put disposable caches and regenerated thumbnails on temporary storage only when losing them is acceptable. User uploads and local application state that cannot be recreated need a durable storage strategy.
A useful first split is:
- Relational records: use a database, rather than making a directory of JSON files your accidental database.
- Files needed by one application replica: a volume can be appropriate.
- Files that must be shared by several replicas or delivered independently of the app: evaluate object storage and its access model. This is an architectural alternative, not a claim that Raseef supplies an object-storage product.
Do not assume that every path in a container persists. A configured disk protects its mounted directory, not arbitrary writes elsewhere in the filesystem. Do not assume an existing image directory will be copied into a newly attached volume; explicitly initialize any required files and test that behavior.
Add a volume on Raseef
The current volume documentation specifies this sequence:
- Open the service’s Storage section.
- Enter an absolute Mount path such as
/dataor/app/uploads. - Choose Add volume.
- Deploy the service to start using it.
Raseef allows one volume per service. Mount paths can be up to eight levels deep and cannot be system paths such as /etc, /usr, /proc or /tmp. Scheduled jobs cannot have a volume. Starting capacity and maximum capacity depend on the plan; verify those values for your service rather than assuming a size from this article.
For an existing service, attaching a volume is not a migration plan for files already written elsewhere. Inventory those files first and prepare a separate, verified copy procedure. Avoid deleting the original until you have checked the destination and application behavior.
Make the application use the mounted directory
Use one explicit storage root rather than a path relative to the process working directory. For a Node.js app, a small startup check can detect a missing directory or a permissions problem early:
import { mkdir, writeFile, readFile, unlink } from 'node:fs/promises';
import { join } from 'node:path';
import { randomUUID } from 'node:crypto';
const root = process.env.UPLOAD_DIR || '/data/uploads';
await mkdir(root, { recursive: true });
const probe = join(root, `.write-check-${randomUUID()}`);
await writeFile(probe, 'storage-check', { flag: 'wx' });
if (await readFile(probe, 'utf8') !== 'storage-check') {
throw new Error('Storage check failed');
}
await unlink(probe);This check proves that the process can write and read that path at that moment. It does not prove that a Raseef volume is mounted there: creating the same directory on temporary storage would also pass. Persistence needs the replacement test below.
If you set UPLOAD_DIR in Raseef, apply it with a deployment. See when environment variables take effect. Keep the configuration free of user-controlled path components. Real upload handlers also need authentication, authorization, size limits and filename handling; the snippet is a storage probe, not an upload endpoint.
A reproducible persistence acceptance test
Run this on an isolated test service with synthetic data, not production uploads. Use your normal application upload and download routes; do not expose a public file-writing or shell endpoint for the test.
- Record the configured mount path and running revision. Confirm that the application’s effective upload directory is beneath that mount.
- Create a synthetic text file containing a unique marker. Save its local SHA-256 checksum, upload it and record its application identifier.
- Download it through the application and compare the checksum. A matching filename alone is insufficient.
- Restart the service, wait for it to become ready, download the same identifier and compare again.
- Deploy a harmless new application revision without changing the mount path. Confirm the running revision changed, then repeat the download and checksum comparison.
- Record each outcome, the revision identifiers and the timestamps. A failed read or mismatch means the acceptance test failed; investigate before storing important data.
On a machine with Node.js, this dependency-free command prints the checksum of the synthetic file:
node --input-type=module -e 'import {readFileSync} from "node:fs"; import {createHash} from "node:crypto"; console.log(createHash("sha256").update(readFileSync(process.argv[1])).digest("hex"))' ./storage-probe.txtThis procedure tests file retrieval across those specific lifecycle events. It does not establish a service-level durability percentage, disaster recovery, concurrent-write correctness or the recoverability of every database format. Preserve the results rather than turning one passing test into a broad reliability claim.
The deployment trade-off: one replica and an interruption
A Raseef service with a volume runs one replica. The old replica stops before the new one starts because the volume is used by one replica at a time. Expect a short interruption on each deploy; do not promise zero downtime for this configuration.
This is different from the ordinary rolling deployment described in the deployment guide. Readiness still matters for startup behavior, but cannot remove the volume’s single-replica constraint. For the distinction between opening a port and application readiness, see the Node.js readiness guide.
If independent horizontal scaling is a requirement, revisit the storage architecture before adding a volume to the web service. A database or external file store may allow the web tier to stay stateless, but you must separately assess connectivity, access control and failure behavior.
Persistence, rollback and backups are different
Application rollback restores the service’s settings and image, not database or volume data. If a release deletes files or changes their format, rolling back the image does not undo that data change. Plan backward-compatible changes or an explicit data recovery procedure.
The current volume docs distinguish paid-plan backups from the free plan: paid-plan volumes have daily and weekly backups, while free-plan volumes have no backups. They describe whole-volume, point-in-time crash-like copies, with restoration through support. Do not infer your private-pilot backup entitlement from the existence of a volume; confirm it for your service.
For databases, the docs additionally recommend logical dumps stored outside Raseef. More generally, define what data you can afford to lose and how long recovery may take, then test an appropriate recovery process. A backup you have never restored is not evidence that your application can recover correctly.
Deleting a volume removes it from service settings immediately, and the next deploy runs without it. Documentation currently provides a 48-hour data recovery window from the volume card, after which deletion is permanent. That grace period is not a backup strategy or an invitation to test deletion on production data.
Troubleshooting files that disappear or cannot be written
- Files vanish after a deploy: compare the effective write path with the mount path. Look for relative paths, a different working directory or an overridden upload directory.
- Permission denied: check the user running the image and directory ownership. Fix permissions narrowly; do not solve it by making every directory world-writable.
- Files seem missing immediately after attaching storage: confirm that the mount is not hiding files baked into the image, and check whether the original uploads lived at another path. Do not claim data loss before checking both locations.
- Scaling is limited to one replica: this is documented volume behavior, not necessarily a failed scale action.
- Disk full: inspect storage growth and retention. Raseef can grow volumes in 512 MiB steps while the service runs; volumes cannot shrink. Verify the plan maximum before relying on expansion.
- A rollback did not restore an upload: that is expected; restore data through a separate, validated recovery path.
Sources and next step
Primary sources checked on 19 November 2026: Volumes, Deployments and Platform limits. The cover is a generated conceptual illustration, not a dashboard screenshot or evidence of a deployed service.
Raseef is currently in private pilot. Request access and describe your upload volume, recovery needs and scaling requirements so the storage choice can be evaluated alongside your first service.