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.

Tejas Chokhawala Tejas Chokhawala Full-stack engineer with 5 years experience building production web apps using React, Next.js and TypeScript. Focused on performance, clean architecture and shipping fast. Experienced with Supabase/Postgres backends, Stripe billing, and building AI-assisted developer tools. 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 Dor Yaloz Dor Yaloz SW engineer with 6+ years of experience, I worked with React/Node/Python did projects with React+Capacitor.js for ios Supabase expert Pratik Pratik SWE with 15+ years of experience building and maintaining web apps and extensive BE infrastructure Caio Rodrigues Caio Rodrigues I'm a full-stack developer focused on building practical and scalable web applications. My main experience is with **React, TypeScript, and modern frontend architectures**, where I prioritize clean code, component reusability, and maintainable project structures. I have strong experience working with **dynamic forms, state management (Redux / React Hook Form), and complex data-driven interfaces**. I enjoy solving real-world problems by turning ideas into reliable software that companies can actually use in their daily operations. Beyond coding, I care about **software quality and architecture**, following best practices for componentization, code organization, and performance optimization. I'm also comfortable working across the stack when needed, integrating APIs, handling business logic, and helping transform prototypes into production-ready systems. My goal is always to deliver solutions that are **simple, efficient, and genuinely useful for the people using them.** Matthew Butler Matthew Butler Systems Development Engineer @ Amazon Web Services zipking zipking I am a technologist and product builder dedicated to creating high-impact solutions at the intersection of AI and specialized markets. Currently, I am focused on PropScan (EstateGuard), an AI-driven SaaS platform tailored for the Japanese real estate industry, and exploring the potential of Archify. As an INFJ-T, I approach development with a "systems-thinking" mindset—balancing technical precision with a deep understanding of user needs. I particularly enjoy the challenge of architecting Vertical AI SaaS and optimizing Small Language Models (SLMs) to solve specific, real-world business problems. Whether I'm in a CTO-level leadership role or hands-on with the code, I thrive on building tools that turn complex data into actionable value. rayush33 rayush33 JavaScript (React.js, React Native, Node.js) Developer with demonstrated industry experience of 4+ years, actively looking for opportunities to hone my skills as well as help small-scale business owners with solutions to technical problems 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. 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