Bolt storage

Cloud Storage Permissions Misconfigured in Bolt App

Your Bolt.new application fails to upload, read, or delete files from cloud storage. Users get permission denied errors when trying to upload profile pictures, access shared documents, or view images that should be publicly visible.

Cloud storage services like Supabase Storage and AWS S3 use policy-based access control. If these policies are too restrictive, legitimate operations fail. If they're too permissive, anyone on the internet can read or modify your files. Bolt's AI often generates storage code without configuring the bucket policies correctly.

This typically surfaces right after connecting cloud storage: uploads fail with RLS policy violations, images return 403 errors, or users can see other users' private files because the policies are set to public.

Error Messages You Might See

StorageApiError: new row violates row-level security policy 403 Forbidden: Access denied to storage object Error: Bucket not found StorageApiError: The resource already exists Policy check failed for storage.objects
StorageApiError: new row violates row-level security policy403 Forbidden: Access denied to storage objectError: Bucket not foundStorageApiError: The resource already existsPolicy check failed for storage.objects

Common Causes

  • Supabase RLS not configured — Storage bucket has Row Level Security enabled but no policies defined, blocking all operations
  • Bucket set to private without access policies — The bucket is private (correct) but no policies allow authenticated users to upload or read their files
  • Public bucket exposing all files — The bucket is set to public, letting anyone access any uploaded file including private user documents
  • Wrong storage bucket name — Code references a bucket name that doesn't exist or is misspelled in the Supabase dashboard
  • Service role key used on client — The Supabase service_role key bypasses RLS in development but the anon key used in production respects RLS policies

How to Fix It

  1. Create proper RLS policies — In Supabase dashboard, add storage policies: allow authenticated users to upload to their own folder (auth.uid()::text = (storage.foldername(name))[1])
  2. Set bucket visibility correctly — Use private buckets for user files and create signed URLs for access: const { data } = await supabase.storage.from('private').createSignedUrl(path, 3600)
  3. Use folder-based isolation — Store files in user-specific folders: uploads/{userId}/filename.jpg and restrict access by folder ownership
  4. Test with anon key — Always test storage operations with the anon key, not service_role, to catch RLS issues before production
  5. Add public bucket for assets — Create a separate public bucket for truly public assets like product images, and keep user uploads in private buckets

Real developers can help you.

Jaime Orts-Caroff Jaime Orts-Caroff I'm a Senior Android developer, open to work in various fields Jared Hasson Jared Hasson Full time lead founding dev at a cyber security saas startup, with 10 yoe and a bachelor's in CS. Building & debugging software products is what I've spent my time on for forever Meïr Ankri Meïr Ankri Full-stack developer specializing in React / Next.js / Node.js with 6+ years of experience. I've worked across various sectors including automotive (Reezocar/Société Générale), healthcare (Medical Link SaaS), and e-commerce (Glasman). I build web apps end-to-end, from architecture to production, with a focus on scalability, performance, and code quality. I also mentor junior developers and contribute to technical decisions and code reviews. Antriksh Narang Antriksh Narang 5 years+ Experienced Dev (Specially in Web Development), can help in python, javascript, react, next.js and full stack web dev technologies. Kingsley Omage Kingsley Omage Fullstack software engineer passionate about AI Agents, blockchain, LLMs. Stanislav Prigodich Stanislav Prigodich 15+ years building iOS and web apps at startups and enterprise companies. I want to use that experience to help builders ship real products - when something breaks, I'm here to fix it. Yovel Cohen Yovel Cohen I got a lot of experience in building Long-horizon AI Agents in production, Backend apps that scale to millions of users and frontend knowledge as well. Mehdi Ben Haddou Mehdi Ben Haddou - Founder of Chessigma (1M+ users) & many small projects - ex Founding Engineer @Uplane (YC F25) - ex Software Engineer @Amazon and @Booking.com Sage Fulcher Sage Fulcher Hey I'm Sage! Im a Boston area software engineer who grew up in South Florida. Ive worked at a ton of cool places like a telehealth kidney care startup that took part in a billion dollar merger (Cricket health/Interwell health), a boutique design agency where I got to work on a ton of exciting startups including a photography education app, a collegiate Esports league and more (Philosophie), a data analytics as a service startup in Cambridge (MA) as well as at Phillips and MIT Lincoln Lab where I designed and developed novel network security visualizations and analytics. I've been writing code and furiously devoted to using computers to make people’s lives easier for about 17 years. My degree is in making computers make pretty lights and sounds. Outside of work I love hip hop, the Celtics, professional wrestling, magic the gathering, photography, drumming, and guitars (both making and playing them) BurnHavoc BurnHavoc Been around fixing other peoples code for 20 years.

You don't need to be technical. Just describe what's wrong and a verified developer will handle the rest.

Get Help

Frequently Asked Questions

Should my Supabase Storage bucket be public or private?

Use private buckets for user-uploaded content (profile photos, documents). Use public buckets only for assets that genuinely need to be accessible to anyone (product images, marketing assets). Always configure RLS policies regardless of visibility.

Why does storage work in development but not production?

In development, you might be using the service_role key which bypasses all RLS policies. In production, the anon key is used and respects RLS. Create proper storage policies that allow authenticated users to manage their own files.

Related Bolt Issues

Can't fix it yourself?
Real developers can help.

You don't need to be technical. Just describe what's wrong and a verified developer will handle the rest.

Get Help