Persistent Files (/data) & Storage Limits
Where to save files so they survive redeploys, how to use the file manager, and how account storage quotas work.
Saving persistent files in /data
Every bot gets its own persistent NVMe directory at /data
. Anything saved inside /data
stays intact across deploys, rollbacks, and restarts, and is automatically included in your daily and manual backups.
Use /data
for SQLite databases, JSON config files, user-uploaded assets, transcripts, or custom templates:
import fs from 'node:fs';
const settingsPath = '/data/settings.json';
const settings = fs.existsSync(settingsPath)
? JSON.parse(fs.readFileSync(settingsPath, 'utf8'))
: { prefix: '!' };
from pathlib import Path
import json
settings_path = Path("/data/settings.json")
settings = json.loads(settings_path.read_text()) if settings_path.exists() else {"prefix": "!"}
Using the dashboard file browser
Open any bot's Files tab to browse /data
directly in your browser without needing SFTP:
- Create files & folders: Click + New file or + New folder in any directory.
- Edit text files inline: Click any text file (like
config.ymlorsettings.json) to edit and save it. Your bot sees the saved change immediately — restart it if it only loads the file on startup. - Upload & download: Upload files directly into
/dataor download any file (including SQLite databases) to your computer.
Deployed code vs. persistent files
Files deployed from your Git repository or ZIP archive live in your bot's app folder and are replaced cleanly every time you push a new build. New files your bot creates at runtime persist alongside /data
and are included in backups.
If your bot tries to modify an existing file that was shipped inside your repository, leave those dynamic files in /data
instead — or, if you can't change the path, enable Allow your bot to edit deployed files under Builds (note that edits to shipped files reset on your next deploy).
Storage quotas & grace periods
Your plan's storage limit (2 GB on
Spark
, 5 GB on
Flame
, 10 GB on
Lightning
) is shared across all bots on your account and counts your bots' code, installed packages, and /data
files together. (Managed PostgreSQL/MongoDB databases have their own separate storage quota.)
- 80% used: A warning banner appears on your bot pages.
- 95% used: You receive an email alert so you can clean up large logs/cache files or upgrade before hitting 100%.
- Over 100%: A 72-hour grace period starts with an immediate email and a final notice 24 hours before it ends. If storage is still over the limit when the grace period expires (or spikes past 200% of your plan), your bots are paused until you free up space or upgrade — nothing is deleted automatically, and bots restart on their own once you're back under.
- File count limit: Each bot may keep up to 1,000,000 files.