Guides
Deploy to Supabase Cloud
Deploy your local Supabase setup including database migrations, storage, and edge functions to Supabase Cloud.
Deploy to Supabase Cloud
Supabase Cloud
Supabase offers cloud services for deploying your local setup including database migrations, storage, and edge functions.
Setup
To configure your Supabase cloud project:
- Create an account at Supabase
- Create an organization and new project in the Supabase dashboard
- Authenticate locally:
Terminal
npm run supabase:login- Connect your local setup to your cloud project:
Terminal
npm run supabase:linkDeploy to Cloud
Database and policies:
Terminal
npm run supabase:pushStorage configuration:
Supabase treats storage as seed data rather than migrations. Use this SQL for default storage setup:
INSERT INTO storage.buckets(id, name, owner_id, public)
VALUES ('profile_images', 'profile_images', 'authenticated', true);
CREATE POLICY "allow insert for authenticated users on bucket profile_images"
ON storage.objects FOR INSERT TO public
WITH CHECK (bucket_id = 'profile_images');
CREATE POLICY "allow select for authenticated users on bucket profile_images"
ON storage.objects FOR SELECT TO public
USING (bucket_id = 'profile_images');
INSERT INTO storage.buckets(id, name, owner_id, public)
VALUES ('cover_images', 'cover_images', 'authenticated', true);
CREATE POLICY "allow insert for authenticated users on bucket cover_images"
ON storage.objects FOR INSERT TO public
WITH CHECK (bucket_id = 'cover_images');
CREATE POLICY "allow select for authenticated users on bucket cover_images"
ON storage.objects FOR SELECT TO public
USING (bucket_id = 'cover_images');Execute this in your project's SQL Editor, then click run.
Edge functions:
Terminal
npm run supabase:fn-deployWebhook functions (without JWT verification):
Terminal
npm run supabase:webhook-deployOr for custom function names:
Terminal
npx supabase@latest functions deploy <function-name> --no-verify-jwt