How to Migrate Supabase to a Self-Hosted Version (for CHEAP)

Published: 26 September 2024
on channel: Theo in Tech
1,724
51

Book a call: https://cal.com/team/dev-sunmoon

In this video, we walk you through the process of migrating your Supabase project to a self-hosted version. Whether you're looking for more control, cost optimization, or flexibility with your infrastructure, this guide will help you smoothly transition from the managed Supabase platform to a self-hosted environment. 🚀

🔧 What You'll Learn:
Why you might want to self-host Supabase
How to set up your own Supabase instance
Migrating your Supabase database and storage
Configuring authentication, real-time, and API services
Ensuring backups, scalability, and performance

Prerequisite Coolify Setup:    • Ultimate Self-Hosting Guide for NextJ...  

Commands (dumping the database):
npx supabase db dump --db-url "url" --file dump/roles.sql --role-only
npx supabase db dump --db-url "url" --file dump/schema.sql --debug
npx supabase db dump --db-url "url" --file dump/data.sql --debug --data-only --use-copy

Commands (execute from VPS):
sudo docker cp schema.sql e27eb47bab6b:/schema.sql
sudo docker cp roles.sql e27eb47bab6b:/roles.sql
sudo docker cp data.sql e27eb47bab6b:/data.sql
sudo docker exec -it 07b025efd3da psql -U postgres -W postgres -f /schema.sql
sudo docker exec -it 07b025efd3da psql -U postgres -W postgres -f /roles.sql
sudo docker exec -it 07b025efd3da psql -U postgres -W postgres -f /data.sql

00:00 Introduction
00:29 Connection URL
01:22 Initial Setup Environment
01:44 Dump the database
05:46 Coolify Setup
06:30 VPS database restoration
12:55 Migrated database validation


Watch video How to Migrate Supabase to a Self-Hosted Version (for CHEAP) online without registration, duration hours minute second in high quality. This video was added by user Theo in Tech 26 September 2024, don't forget to share it with your friends and acquaintances, it has been viewed on our site 1,724 once and liked it 51 people.