Laravel uploads disappearing? Keep storage/ on persistent storage

Uploads on your Laravel site gone after a release or a wake from sleep? Keep the whole storage/ folder on BrewInTH's persistent storage, with no code changes.
You had your AI build a Laravel site where members upload a profile picture, or an admin page where staff add product photos. Everything worked in testing. A few days later the pictures are broken image icons, users complain they keep getting logged out, and the log file you wanted to check for clues is empty.
The cause is Laravel's storage/ folder: on BrewInTH it is writable, but temporary. This guide explains which files go missing and when, then shows how to keep the whole storage/ folder on persistent storage without changing your code, which you can do since 4 November 2026. You'll also get a prompt to paste to your AI and a quick test that proves your files stay put.
In short
🗂️ Laravel'sstorage/on BrewInTH is writable, but it goes back to what shipped with your code every time the app starts: at each new release, each wake from sleep and each restart
🖼️ What disappears: files your users uploaded, sessions stored as files, and logs written to files. Your database is not affected
🤖 Have your connected AI callstorage_setwith the folderstorage, and the whole folder moves to persistent storage while your app keeps the same paths
📦 Send a ZIP through Upload & go live, and the platform spots code that keeps files and movesstorage/appto persistent storage for you
✅ Do it before real users start uploading, then test: upload, restart the app, open the same picture again
Why files in Laravel's storage/ disappear
Every release of a site on BrewInTH is built into a fixed set of files that cannot be changed, so the site always runs exactly the code you sent. Laravel, however, writes to storage/ and bootstrap/cache all the time. So the platform moves those two folders to a temporary area of the running app and refills them with what came with your code each time the app starts. Laravel can write without errors, but whatever it writes only lasts until the next start.
Your app starts again more often than you might expect:
- A new release, whether your AI deployed it or you sent a ZIP
- A wake from sleep: a Free site with no visitors for a while goes to sleep and wakes when someone visits (why a free site is slow to open the first time)
- Restart the app, from the project's ⋯ menu
- A restart by the platform now and then, for example after a package change

Which files are affected
The storage/ folder holds several kinds of files, and losing each one hurts in a different way:
storage/app: files your app saves withStorage::put()or$request->file('slip')->store(), such as payment slips, documents and attachments. All gone.storage/app/public: pictures people open at/storage/..., such as profile pictures and product photos. Gone, leaving broken images.storage/framework/sessions: user sessions whenSESSION_DRIVER=file. Everyone is logged out at once.storage/logs:laravel.logdisappears, along with the error you wanted to track down.storage/framework/cache: the file cache. Laravel simply rebuilds it, so the only cost is a few slower first requests.
What stays safe is the data in your project's database (MySQL, MariaDB, PostgreSQL) and the values in the App settings tab. bootstrap/cache belongs to each release on purpose and does not need to be kept.
The fix: move the whole storage/ folder to persistent storage
Since 4 November 2026, the platform can put Laravel's entire storage/ folder on your project's Persistent storage (/bw-data). Your app still sees the same path, /app/storage, so code that already uses Storage::, store() or storage_path() keeps working as it is. The files themselves now live on the project's own disk, which survives every restart.

Way 1: let your connected AI set it up
If you use a coding agent such as Claude Code, Codex or Cursor, connected to BrewInTH with the Create the AI link and token (automatic) button, the platform already gives it a nudge. Before a release, it reads the Laravel code in your ZIP. When the app keeps files, for example with Storage::, storeAs(), storage_path() or Filament and Livewire upload fields, it warns the AI and names the exact call: storage_set with the folder storage. Most AIs then handle it in one go.
To be explicit, paste this at the end of your existing chat:
This is a Laravel site on BrewInTH, and users can upload pictures and files.
Make sure files in storage/ survive new releases and app restarts:
- Call storage_set with dirs ["storage"] and 1024 MB, or as much as the package allows, before the next release.
- If the app shows pictures under /storage/..., set the project's build command to the current build steps followed by php artisan storage:link, and leave public/storage out of the ZIP.
- Set LOG_CHANNEL=stderr so logs go to the project's Logs tab.
- After releasing, test it: upload one picture, restart the app, and confirm the picture still opens. Then tell me what you changed.
If your package allows less than 1024 MB, the platform tells the AI the maximum and the AI uses that instead. If the site is already live, the platform restarts the app once the setting is saved, so it picks up the new folder.
Way 2: send a ZIP through Upload & go live
If you don't use a coding agent and send your files yourself through Upload & go live (still in BETA), the same check runs. When it finds code that keeps files, it turns on persistent storage and puts storage/app on it for you, both on the first upload and when you send a new ZIP for the same site. The summary after the upload has a line starting with "The app keeps data in files" that names storage/app/ (go live with a ZIP, no coding agent needed).
This page moves only storage/app, not the whole folder, and that is deliberate: a log file that keeps growing could fill the small persistent storage of a smaller package and stop the site, whereas in the temporary area it only makes the app restart. Uploaded files are safe, but file sessions and logs still start over. Add these two values on the App settings tab, in the box of the same name (fill in Name and Value, then press Save); they take effect from the next release:
SESSION_DRIVER=database, so users stay logged in when the app restarts. Your database needs a sessions table; if it doesn't have one, ask your AI to add the migration.LOG_CHANNEL=stderr, so logs appear in the project's Logs tab instead of a file.
Pictures under /storage/... need the link made at build time
Laravel's public disk keeps pictures in storage/app/public and serves them at /storage/... through the public/storage link that php artisan storage:link creates. On BrewInTH, a release's files cannot be changed once it is built, so that link has to be made during the build. The guide your AI reads when it connects to BrewInTH says the same.
Set it on the Releases tab under Advanced options (build / start / port), in the Build command of the project field, which every release uses; or let your AI set it. This field replaces the automatic build entirely, so it must install your packages too, for example:
composer install --no-dev --prefer-dist --no-interaction --optimize-autoloader && php artisan storage:link
If your app also builds its front end with Vite, put that step in the same command (for example npm ci && npm run build). Don't include a public/storage folder in your ZIP; let the build create the link.
If your site goes live through Upload & go live, note that the page doesn't create this link, and once a project has its own build command the page stops offering it, saying "Uses its own build/start commands; release it from the project's release tab". To keep sending ZIPs that way, ask your AI to serve the pictures through a Laravel route instead of the /storage link, for example with Storage::disk('public')->response($path).
Check the move, and prove your files survive
Don't stop at "uploads work". Run through this once:
- Open the App settings tab. The Persistent storage (/bw-data) panel should show the line App folders served from the volume: followed by
/app/storage(or/app/storage/appif the site went live through Upload & go live). - Upload a test picture on the live site and check that it opens.
- Open the project's ⋯ menu, choose Restart the app, and wait for the site to come back.
- Open the same picture again. If it still shows, your files are in the right place.
- Delete the test picture.

If the picture is gone, send your AI this: "I uploaded a picture, restarted the app, and the picture disappeared. Find where the app stores files and use storage_set to put that folder on persistent storage."
What changes after the move
- A new release has a short pause. Persistent storage attaches to one copy of the app at a time, so the current version stops before the new one starts. Meanwhile the platform holds visitors' requests for up to 30 seconds; if it takes longer, visitors see an "Updating the site" page that opens the site by itself when it is ready.
- Compiled views start fresh every time. The platform clears
storage/framework/viewswhen the app starts, so each release always uses its own Blade templates, even when you roll back to an older version. - Files on persistent storage count towards your package. One project can use up to 80% of the package's storage, about 16 MB on Free (20 MB) and about 160 MB on Starter (200 MB). At 60% full the platform grows it by 50% at a time, up to that limit (how BrewInTH counts your storage).
- It is backed up with everything else. The Volume backups (/bw-data) panel on the App settings tab backs up the whole volume,
storage/included. The Backups add-on (฿99 a month) does it daily and keeps 7 copies (back up and restore /bw-data).
Things to watch
- Do it before real users upload. Files uploaded before the move live only in the running app's temporary area, and they are lost when the app restarts to use the new folder. If your site is already live and holds files you need, download them from your site first and upload them again after the move.
- Don't ship real data inside storage/ in your ZIP. Files that come with the ZIP are copied to persistent storage the first time, and on every start the platform puts back any of them that are missing, without overwriting existing files. A test picture your app deleted can therefore come back. Ship
storage/as Laravel's empty folder structure. - The Free package has little room. About 16 MB is enough for trials or resized pictures. If people will upload photos in earnest, use a paid package and have your AI resize images before saving them.
FAQ
Do I need to change my Laravel code?
No. The app still reads and writes /app/storage as before, so Storage::put(), store() and storage_path() work straight away. The only addition you may need is php artisan storage:link in the build command, if your app shows pictures under /storage/....
Is turning on persistent storage in App settings enough?
Not for Laravel. The Persistent storage (/bw-data) panel only sets a size, which gives you a disk at /bw-data, while Laravel's storage/ stays where it was. Putting the storage folder on that disk is done by your AI with storage_set, or by the Upload & go live page. The panel shows you which folders have moved.
My app already writes files to /bw-data. Do I need to change anything?
No. Files your app writes to /bw-data (or /data, the older name of the same place) are already on persistent storage. The approach in this guide is for apps that use Laravel's standard storage/ and would rather not change their disk configuration.
I already store uploads on S3 or another external service. Do I need this?
Not for uploads. With FILESYSTEM_DISK=s3, files go to the external service from the start and never touch storage/. File sessions and logs still live in storage/, though, so set SESSION_DRIVER=database and LOG_CHANNEL=stderr as well.
Can I move only storage/app, or bootstrap/cache too?
You can ask for storage/app alone, which is what Upload & go live chooses. For anything deeper, such as storage/app/public, the platform asks you to request the whole storage folder instead. bootstrap/cache cannot be moved, because it belongs to each release.
What about plain PHP sites or WordPress?
Same idea, different folder. A PHP site that keeps files in a folder of its own, such as uploads/, can use storage_set with that folder. For WordPress sent through Upload & go live, the platform puts wp-content/uploads on persistent storage for you (move your WordPress site to BrewInTH).
Summary
Laravel's storage/ on BrewInTH is writable, but it starts over every time the app starts, so uploaded pictures, file sessions and logs vanish without an error. The fix is to keep storage/ on persistent storage: have your AI call storage_set with the folder storage, or send a ZIP through Upload & go live, which moves storage/app for you. Add php artisan storage:link to the build command if your app shows pictures under /storage/..., then test with an upload, a restart and a second look at the same picture. Do it once, before users start uploading, and their files will survive every release.
Open your project in the console →
