Linux

Where Does Payload CMS Store Uploads and Data?

Payload keeps uploads in a media folder per collection while content lives in Postgres or MongoDB via DATABASE_URL.

Last updated

Payload splits state three ways. The payload.config.ts file at the project root defines collections and plugins. Uploaded media lands in a per collection folder such as media, or /app/media in container guides. All content rows live in the database named by DATABASE_URL.

Moves need all three: config for shape, database dump for content, media tree for files. The admin export covers text but not binaries on local storage, so file copies remain part of every migration checklist.

Where Payload stores this, by platform

Linux
/app/media

Container convention for collection upload folders. Set staticDir per collection to change it, or attach a cloud adapter and disable local storage.

Linux
./payload.config.ts

Project root config plus DATABASE_URL env. Migrations and generated types travel with the repo, while media and the database travel separately.

Frequently asked questions

How do I back up a self hosted Payload project?

Back up the database dump plus the media folders together. Rows without files render broken images, and files without rows are invisible to the admin UI.

Should media stay on local disk in production?

Add an S3 style storage adapter for the media collections. Local disk suits single servers, while ephemeral hosts need object storage from day one.

How do I point Payload at a custom config file?

Set PAYLOAD_CONFIG_PATH to the file. Auto detection checks the working directory, tsconfig rootDir, and dist, in that order.

Notice an outdated path? Let us know.