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:

  1. Create an account at Supabase
  2. Create an organization and new project in the Supabase dashboard
  3. Authenticate locally:
Terminal
npm run supabase:login
  1. Connect your local setup to your cloud project:
Terminal
npm run supabase:link

Deploy to Cloud

Database and policies:

Terminal
npm run supabase:push

Storage 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-deploy

Webhook functions (without JWT verification):

Terminal
npm run supabase:webhook-deploy

Or for custom function names:

Terminal
npx supabase@latest functions deploy <function-name> --no-verify-jwt
AvatarEnda Kelly

© 2026 Enda Kelly, trading as CloudNua. All rights reserved.

Ireland