## TL;DR

The rule: anything that must survive a restart does not belong on local disk. - Small app data -> Replit's built-in key/value database (db["user_data"] = data) - Files -> Object Storage (storage.upload_from_text("user_data.json", ...)) - Relational data -> the provisioned PostgreSQL database The agent will happily write a JSON file to disk and call it persistence. The container filesystem is ephemeral.

## Fix

1. The rule: anything that must survive a restart does not belong on local disk. - Small app data -> Replit's built-in key/value database (db["user_data"] = data) - Files -> Object Storage (storage.upload_from_text("user_data.json", ...)) - Relational data -> the provisioned PostgreSQL database The agent will happily write a JSON file to disk and call it persistence.
   Expected: You get the expected result; the problem is gone.

## When to use

- You are setting up or using this Replit feature.
- The symptom matches: the local filesystem is ephemeral, persist with the database.

## When NOT to use

- Unrelated Replit issues (different feature, different failure).
- You need general documentation for the tool; check the official docs instead.

## Compatibility

Reported against Replit.

## Variant phrasings

### the local filesystem is ephemeral, persist with the database

## Why it happens

Web, replit-known-pitfalls skill (github.com/david-coder-hnu/hackerson): anything written to the local filesystem is ephemeral. Data is lost when the container restarts, deploys, or sleeps. Use Replit's persistent storage instead: the built-in key/value database for small data, Object Storage for files, or PostgreSQL for relational data. The rule: if the data must survive a restart, it does not belong on the local disk.

## Edge cases

- If your error message differs even slightly, this is probably a different issue; search the exact text.
- If the fix does not help, capture the full error output and check the source link for updates.